mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-02-26 07:53:58 +00:00
Allow nodes to catch revert action
This commit is contained in:
parent
d992e280cc
commit
f835f6c83c
3 changed files with 7 additions and 1 deletions
|
@ -152,7 +152,7 @@ void Avatar::bindInput()
|
|||
dsq->user.control.actionSet.importAction(this, "PrimaryAction", ACTION_PRIMARY);
|
||||
dsq->user.control.actionSet.importAction(this, "SecondaryAction", ACTION_SECONDARY);
|
||||
|
||||
dsq->user.control.actionSet.importAction(this, "Revert", MakeFunctionEvent(Avatar, revert), 0);
|
||||
dsq->user.control.actionSet.importAction(this, "Revert", ACTION_REVERT);
|
||||
|
||||
dsq->user.control.actionSet.importAction(this, "SwimUp", ACTION_SWIMUP);
|
||||
dsq->user.control.actionSet.importAction(this, "SwimDown", ACTION_SWIMDOWN);
|
||||
|
@ -4510,6 +4510,9 @@ void Avatar::action(int id, int state)
|
|||
if (id == ACTION_PRIMARY) { if (state) lmbd(); else lmbu(); }
|
||||
if (id == ACTION_SECONDARY) { if (state) rmbd(); else rmbu(); }
|
||||
|
||||
if (id == ACTION_REVERT && !state)
|
||||
revert();
|
||||
|
||||
if (id == ACTION_PRIMARY && state)// !state
|
||||
{
|
||||
if (isMiniMapCursorOkay())
|
||||
|
|
|
@ -122,6 +122,7 @@ enum AquariaActions
|
|||
ACTION_ROLL,
|
||||
|
||||
ACTION_SLOW, // currently unused
|
||||
ACTION_REVERT,
|
||||
|
||||
ACTION_ZOOMIN = 200,
|
||||
ACTION_ZOOMOUT,
|
||||
|
|
|
@ -6933,6 +6933,8 @@ void Game::bindInput()
|
|||
dsq->user.control.actionSet.importAction(this, "SongSlot9", ACTION_SONGSLOT9);
|
||||
dsq->user.control.actionSet.importAction(this, "SongSlot10", ACTION_SONGSLOT10);
|
||||
|
||||
dsq->user.control.actionSet.importAction(this, "Revert", ACTION_REVERT);
|
||||
|
||||
|
||||
if (avatar)
|
||||
avatar->bindInput();
|
||||
|
|
Loading…
Add table
Reference in a new issue