* Input fix.
* A lot of code cleaning spread across a lot of files.
This commit is contained in:
jean.chalard
2008-11-24 12:11:16 +00:00
parent 3721247bee
commit 3518166189
28 changed files with 405 additions and 438 deletions

View File

@@ -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){