ToolbarButton class
A button a module adds over the viewport: on the play toolbar after the built-in Play, Pause, Stop and Level Designer buttons, or in the column down the right (see slot).
Constructors
- ToolbarButton({required String id, required IconData icon, required String tooltip, required void onPressed(EditorScope scope), int order = 100, ToolbarSlot slot = ToolbarSlot.playToolbar, bool isEnabled(EditorScope scope)?, bool isActive(EditorScope scope)?})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- icon → IconData
-
The button's face.
final
- id → String
-
Names the button, prefixed by its module.
final
- isActive → bool Function(EditorScope scope)?
-
Whether the button is drawn lit, as a tool in use or a workspace that
is open; asked each time the toolbar is built, null for never.
final
- isEnabled → bool Function(EditorScope scope)?
-
Whether the button can be pressed, asked each time the toolbar is
built; null for always.
final
- onPressed → void Function(EditorScope scope)
-
Called when the button is pressed while enabled.
final
- order → int
-
Lower sorts first among the modules' buttons in the same slot.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- slot → ToolbarSlot
-
Where it stands: with the modules' tools on the play toolbar, or in
the column down the right under the transform tools.
final
- tooltip → String
-
Shown when the pointer rests on the button: what it does.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited