* Change the name of debug.h into config.h and use the new RESPATH define.
This commit is contained in:
jean.chalard
2008-12-25 16:28:03 +00:00
parent 161da1d3cb
commit 3e9ff2b580
61 changed files with 191 additions and 178 deletions

View File

@@ -1,11 +1,11 @@
#include "../include/debug.h"
#include "../include/config.h"
#include "../include/GuiLayers.h"
#include "../include/Player.h"
GuiLayer::GuiLayer(int id, GameObserver* _game):JGuiController(id, NULL){
game = _game;
modal = 0;
hasFocus = 0;
hasFocus = false;
}
GuiLayer::~GuiLayer(){
@@ -121,21 +121,22 @@ void GuiLayers::Update(float dt, Player * currentPlayer){
for (i=0; i<nbitems; i++){
if (!isAI){
if (0 != key)
{
objects[i]->hasFocus = 1;
if (objects[i]->CheckUserInput(key))
break;
}
if (objects[i]->CheckUserInput(key))
break;
}
}
}
for (++i; i<nbitems; ++i) objects[i]->hasFocus = 0;
if (isAI){
if (isAI)
currentPlayer->Act(dt);
}
}
void GuiLayers::Render(){
bool focusMakesItThrough = true;
for (int i = 0; i < nbitems; ++i)
{
objects[i]->hasFocus = focusMakesItThrough;
if (objects[i]->modal) focusMakesItThrough = false;
}
for (int i=nbitems-1; i>=0; i--){
objects[i]->Render();
}