SpriteCounterAction (hwx.gui)

A type of SpriteAction to display numbers.



Public Methods

classmethod get (cls, name)

destroy (self)

onCommand (self)

onToggle (self, on)

toggle (self, on=None)

Property Details

property value

Counter value to be displayed above the sprite action.

Method Details

classmethod get(cls, name)

Returns the named action from defined in active profile.

param name

Action name.

type name



Deletes this and all its children.

Warning, make sure to remove the action from the ui before destroying or this will crash!


Calls command callback method when an Action is clicked.

onToggle(self, on)

Acts when an Action is toggled.

  • If is coupled to dialog it will show or hide the dialog.

  • If is coupled to a context it will get in and out the context.

  • If is coupled to callback it will run the callback with state or not.

param on

Determines whether to toggle on or off.

type on


toggle(self, on=None)

Simulate clicking the action.

param on

Pass True/False to ensure you are toggling on or off. None flips the state.

type on

bool | None