=============================
SpriteCounterAction (hwx.gui)
=============================

A type of SpriteAction to display numbers.

Inherits:
  - :ref:`SpriteAction (hwx.gui)`

----------
Properties
----------

  +--------+
  | value_ |
  +--------+

--------------
Public Methods
--------------

  +------------------------------+
  | classmethod get_ (cls, name) |
  +------------------------------+
  | onCommand_ (self)            |
  +------------------------------+
  | onToggle_ (self, on)         |
  +------------------------------+
  | toggle_ (self, on=None)      |
  +------------------------------+

----------------
Property Details
----------------

.. _value:
.. property:: value

Counter value to be displayed above the sprite action.
    

--------------
Method Details
--------------

.. _get:
.. classmethod:: get(cls, name)

Returns the named action from defined in active profile.

:param name: Action name.
:type name: str


.. _onCommand:
.. method:: onCommand(self)

Calls command callback method when an Action is clicked.

.. _onToggle:
.. method:: 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: bool


.. _toggle:
.. method:: 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