Sprites.Media.Shader.Tool

The shader editor's Tools window: a Tools group with the tool selector (only Move for now) and a Windows group whose buttons open the Layer, Layers, Parameters, Globals and Info panels. It reuses the sprite editor's shared tool parts and shows no tool controls of its own; the Move tool has its own window while selected, and each panel has its own window while its flag is true.

Sprites.Media.Shader.Tool

Sprites.Media.Shader.Tool.Window Void

Sprites.Media.Shader.Tool.Window(selectedToolName, layerVisible, layersVisible, paramsVisible, globalsVisible, infoVisible)

The Tools window: an always-present slim floating window docked to the stage's top left, with no close button and no resize. It holds the Tools group, the canvas tool selector, and the Windows group, the panel openers. selectedToolName is the chosen canvas tool; layerVisible, layersVisible, paramsVisible, globalsVisible and infoVisible are the five panel flags.

InputTypeDescription
selectedToolNameSprites.Reactive.ValueThe chosen canvas tool; the selector sets it, the editor reads it.
layerVisibleSprites.Reactive.ValueThe Layer panel's visible flag; the Layer button sets it true.
layersVisibleSprites.Reactive.ValueThe Layers panel's visible flag; the Layers button sets it true.
paramsVisibleSprites.Reactive.ValueThe Parameters panel's visible flag; the Parameters button sets it true.
globalsVisibleSprites.Reactive.ValueThe Globals panel's visible flag; the Globals button sets it true.
infoVisibleSprites.Reactive.ValueThe Info panel's visible flag; the Info button sets it true.

Returns nothing.

const selectedToolName = Sprites.Reactive.Value('move');
const layerVisible = Sprites.Reactive.Value(false);
const layersVisible = Sprites.Reactive.Value(false);
const paramsVisible = Sprites.Reactive.Value(false);
const globalsVisible = Sprites.Reactive.Value(false);
const infoVisible = Sprites.Reactive.Value(false);
// the live window docks to the body overlay, so here we show its two groups inline.
Sprites.Ui.Content.Area(() => {
  Sprites.Media.Sprite.Tool.Labelled('Tools', () => {
    Sprites.Media.Shader.Tool.Selector(selectedToolName);
  });
  Sprites.Media.Sprite.Tool.Labelled('Windows', () => {
    Sprites.Media.Shader.Tool.Windows(layerVisible, layersVisible, paramsVisible, globalsVisible, infoVisible);
  });
});
The Tools window's two groups shown inline: the Tools group (Move only) and the Windows group of panel openers. In the editor these sit inside a floating window docked to the stage.

Sprites.Media.Shader.Tool.Selector Void

Sprites.Media.Shader.Tool.Selector(selectedToolName)

The canvas tool selector: one option per canvas tool. Only Move exists for now, panning and zooming the view. Picking sets selectedToolName, which the editor reads to choose which tool window shows. The panel windows open from the Windows group, so they are not here.

InputTypeDescription
selectedToolNameSprites.Reactive.ValueThe chosen canvas tool; picking an option sets it.

Returns nothing.

const selectedToolName = Sprites.Reactive.Value('move');
Sprites.Media.Shader.Tool.Selector(selectedToolName);
The tool selector holds one option per canvas tool; only Move exists for now.

Sprites.Media.Shader.Tool.Windows Void

Sprites.Media.Shader.Tool.Windows(layerVisible, layersVisible, paramsVisible, globalsVisible, infoVisible)

The Windows buttons: one secondary button per panel window, Layer, Layers, Parameters, Globals and Info, each opening its window on a click by setting its visible flag true. They turn nothing off; a panel window carries its own close button, and any number may be open at once.

InputTypeDescription
layerVisibleSprites.Reactive.ValueThe Layer panel's visible flag; the Layer button sets it true.
layersVisibleSprites.Reactive.ValueThe Layers panel's visible flag; the Layers button sets it true.
paramsVisibleSprites.Reactive.ValueThe Parameters panel's visible flag; the Parameters button sets it true.
globalsVisibleSprites.Reactive.ValueThe Globals panel's visible flag; the Globals button sets it true.
infoVisibleSprites.Reactive.ValueThe Info panel's visible flag; the Info button sets it true.

Returns nothing.

const layerVisible = Sprites.Reactive.Value(false);
const layersVisible = Sprites.Reactive.Value(false);
const paramsVisible = Sprites.Reactive.Value(false);
const globalsVisible = Sprites.Reactive.Value(false);
const infoVisible = Sprites.Reactive.Value(false);
Sprites.Media.Shader.Tool.Windows(layerVisible, layersVisible, paramsVisible, globalsVisible, infoVisible);
The Windows group: one secondary button per panel, each setting its flag true to open the panel.