tuxemon.event.conditions.button_pressed module

class tuxemon.event.conditions.button_pressed.ButtonPressedCondition[source]

Bases: EventCondition

Check to see if a particular key was pressed.

Currently only “K_RETURN” is supported.

Script usage

is button_pressed <button>
Script parameters:

button – A button/intention key (E.g. “K_RETURN”).

name: ClassVar[str] = 'button_pressed'
test(session, condition)[source]

Check to see if a particular key was pressed.

Parameters:
  • session (Session) – The session object

  • condition (MapCondition) – The map condition object.

Returns:

Whether the key was pressed or not.

Return type:

bool