mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 16:34:06 +00:00
Use script values from enum for clicked objects (#688)
This commit is contained in:

committed by
GitHub

parent
ba5bc46c0c
commit
e1135d9c1d
@@ -1,6 +1,7 @@
|
||||
#include "infocenterdoor.h"
|
||||
|
||||
#include "infocenterstate.h"
|
||||
#include "infodoor_actions.h"
|
||||
#include "jukebox.h"
|
||||
#include "jukebox_actions.h"
|
||||
#include "legocontrolmanager.h"
|
||||
@@ -96,22 +97,22 @@ MxLong InfocenterDoor::HandleClick(LegoControlManagerEvent& p_param)
|
||||
DeleteObjects(&m_atom, 500, 510);
|
||||
|
||||
switch (p_param.GetClickedObjectId()) {
|
||||
case 1:
|
||||
case InfodoorScript::c_LeftArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_infoscor;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
result = 1;
|
||||
break;
|
||||
case 2:
|
||||
case InfodoorScript::c_RightArrow_Ctl:
|
||||
m_destLocation = LegoGameState::e_elevbott;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
result = 1;
|
||||
break;
|
||||
case 3:
|
||||
case InfodoorScript::c_Info_Ctl:
|
||||
m_destLocation = LegoGameState::e_infomain;
|
||||
TransitionManager()->StartTransition(MxTransitionManager::e_mosaic, 50, FALSE, FALSE);
|
||||
result = 1;
|
||||
break;
|
||||
case 4:
|
||||
case InfodoorScript::c_Door_Ctl:
|
||||
if (GameState()->GetActorId()) {
|
||||
InfocenterState* state = (InfocenterState*) GameState()->GetState("InfocenterState");
|
||||
if (state->HasRegistered()) {
|
||||
|
Reference in New Issue
Block a user