Add code components 366-385; ScrollArea Follow, editor sync
A terminal with history, a Go-colored code block, a log viewer that follows, a hex viewer, a memory map, a JSON tree, a line diff, a GAME OVER crash screen, an FPS meter, profiler bars, breakpoints, variables, command history, a shortcut list, a debug grid, a pixel editor that exports string art, a palette editor, a sprite sheet, a glyph map and a 6502 register view. layout.ScrollArea takes Follow, and ChatLog now uses it. data.TreeNode takes a Value drawn in its Slot. pixel gains Has, and Sprite.Art writes MustSprite art. pixel.Editor takes the caller's value at each input event, so a value changed between frames is never typed onto.
This commit is contained in:
42 files changed
+3415
-37
No files matched your search
@@ -39,6 +39,12 @@ func loadFont(b []byte) *font {
|
||||
return &font{ascent: int(b[4]), descent: int(b[5]), n: n, index: b[10 : 10+8*n], data: b}
|
||||
}
|
||||
|
||||
// Has reports whether the font draws r, not tofu.
|
||||
func Has(r rune) bool {
|
||||
_, ok := font12.find(r)
|
||||
return ok
|
||||
}
|
||||
|
||||
func (f *font) find(r rune) (glyph, bool) {
|
||||
lo, hi := 0, f.n
|
||||
for lo < hi {
|
||||
|
||||
Reference in new issue
Block a user