J :
* Input fix. * A lot of code cleaning spread across a lot of files.
This commit is contained in:
@@ -17,22 +17,23 @@ int ActionLayer::unstopableRenderInProgress(){
|
||||
}
|
||||
|
||||
|
||||
void ActionLayer::CheckUserInput(float dt){
|
||||
bool ActionLayer::CheckUserInput(u32 key){
|
||||
if (menuObject){
|
||||
abilitiesMenu->Update(dt);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
for (int i=0;i<mCount;i++){
|
||||
if (mObjects[i]!=NULL){
|
||||
ActionElement * currentAction = (ActionElement *)mObjects[i];
|
||||
currentAction->CheckUserInput(dt);
|
||||
if (currentAction->CheckUserInput(key)) return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
void ActionLayer::Update(float dt){
|
||||
if (menuObject){
|
||||
abilitiesMenu->Update(dt);
|
||||
return;
|
||||
}
|
||||
modal = 0;
|
||||
@@ -157,17 +158,6 @@ int ActionLayer::reactToClick(MTGCardInstance * card){
|
||||
}
|
||||
|
||||
|
||||
int ActionLayer::isModal(){
|
||||
if (modal) return 1;
|
||||
if (menuObject) return 1;
|
||||
for (int i=0; i<mCount; i++){
|
||||
ActionElement * currentAction = (ActionElement *)mObjects[i];
|
||||
if (currentAction->modal) return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void ActionLayer::setMenuObject(Targetable * object){
|
||||
menuObject = object;
|
||||
if (abilitiesMenu){
|
||||
|
||||
Reference in New Issue
Block a user