Number fields without trailing zeros (#172): Keyboard

admin committed 2026-09-19 14:29:01 +02:00
1 parent b79ed36b43
commit ff256e8b92
1 file changed
+6 -5
+6 -5
@@ -7,10 +7,11 @@ the picked keys, `Ctrl+V` paste them at the playhead (while keys are copied this
there, so an image is pasted from another tab), `Ctrl`+drag duplicate keys · `Tab` / `Shift+Tab` cycle fields · lists: `↑`/`↓` move,
`←`/`→` fold, `Enter` activates · number
fields: drag to scrub (`Shift` x10, `Alt` x0.1, snapping to the grid of that increment, so a
step-1 field lands on whole numbers), `↑`/`↓` step, shown with three decimals (`ui/math.ts`,
`NUMBER_DECIMALS`) so a fractional value never reads as a whole number — except where the
value is integral by nature (frame rectangles, the slice dialog, a camera's view size, font
size, the key-repeat milliseconds, the index and count ports of list and text nodes), which set
`NumberField`'s `decimals: 0` and show plain whole numbers · viewport: wheel zooms,
step-1 field lands on whole numbers), `↑`/`↓` step, shown with at most three decimals and without trailing zeros
(`100`, `0.5`, `9.091`; `ui/math.ts`, `NUMBER_DECIMALS`, the same in the inspector, the graph
and every tab), the value itself is kept at that precision — fields that are integral by nature
(frame rectangles, the slice dialog, a camera's view size, font size, the key-repeat
milliseconds, the index and count ports of list and text nodes) set `NumberField`'s
`decimals: 0` and round to whole numbers · viewport: wheel zooms,
middle-drag or `Shift`+drag pans, drag on empty space rubber-bands, `Ctrl`/`Shift`-click toggles an
object in the selection (hierarchy rows too) · tilemap panel: holding `Alt` switches to Pick – a click takes that cell's tile from the active layer – and releasing it brings back the tool before ([Tilemaps](Tilemaps)).