Sprites.Media.Binary.Tool.Move
The binary editor's Move tool window: the start address the view begins at, as a two way number, and a Reset button that snaps the window back to the top. It mirrors the map and text editors' Move windows, reusing the shared Sprites.Media.Sprite window parts, and owns its live rect, so it returns to where it was dragged. The tool selector and the Tools window live in Sprites.Media.Binary.Tool.
Sprites.Media.Binary.Tool.Move.Window Void
Sprites.Media.Binary.Tool.Move.Window(visible, startAddress, resetView)
The Move window: the start address the view begins at, as a two way number, and a Reset button that snaps the window back to the top. It is shown while the Move tool is active and has no close button.
| Input | Type | Description |
|---|---|---|
visible | Value | The show flag, true while the Move tool is active. |
startAddress | Value | The two way start address the view begins at. |
resetView | Value | The command the Reset button runs to snap back to the top. |
Returns nothing.
const startAddress = Sprites.Reactive.Value(0);
const resetView = Sprites.Reactive.Reverse(() => {
Sprites.Reactive.Set(startAddress, 0);
});
Sprites.Ui.Content.Area(() => {
Sprites.Media.Sprite.Tool.Labelled('Start address', () => {
Sprites.Ui.Input.Number(startAddress, 0, Sprites.Media.Binary.MaxLength);
});
Sprites.Ui.Button.Group.Column(() => {
Sprites.Ui.Button.Act(resetView, () => {
Sprites.Ui.Button.Secondary();
Sprites.Ui.Dom.Text('Reset');
});
});
});