From 19b0b306fe112e930edbc0f1ed91ccff95feffcf Mon Sep 17 00:00:00 2001 From: "wagic.the.homebrew@gmail.com" Date: Sun, 31 May 2009 09:42:08 +0000 Subject: [PATCH] Erwan - stats are computed only at startup now, to avoid useless computation ingame --- projects/mtg/include/TextScroller.h | 2 +- projects/mtg/src/GameStateMenu.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/projects/mtg/include/TextScroller.h b/projects/mtg/include/TextScroller.h index f3c8f6fc5..293fdfdb6 100644 --- a/projects/mtg/include/TextScroller.h +++ b/projects/mtg/include/TextScroller.h @@ -8,7 +8,7 @@ class JLBFont; using namespace std; class TextScroller: public JGuiObject{ -private: +protected: string mText; string tempText; JLBFont * mFont; diff --git a/projects/mtg/src/GameStateMenu.cpp b/projects/mtg/src/GameStateMenu.cpp index 102146ff8..b344327db 100644 --- a/projects/mtg/src/GameStateMenu.cpp +++ b/projects/mtg/src/GameStateMenu.cpp @@ -123,7 +123,7 @@ void GameStateMenu::Create() currentState = MENU_STATE_MAJOR_LOADING_CARDS | MENU_STATE_MINOR_NONE; scroller = NEW TextScroller(GameApp::CommonRes->GetJLBFont(Constants::MAIN_FONT), SCREEN_WIDTH/2 - 100 , SCREEN_HEIGHT-15,200); - + scrollerSet = 0; } @@ -168,7 +168,7 @@ void GameStateMenu::Start(){ hasChosenGameType = 1; if (GameOptions::GetInstance()->values[OPTIONS_MOMIR_MODE_UNLOCKED].getIntValue()) hasChosenGameType =0; - scrollerSet = 0; + } @@ -230,6 +230,8 @@ void GameStateMenu::fillScroller(){ scroller->Add("Need more cards? Go to http://wololo.net/wagic"); + scroller->Add("These stats will be updated next time you run Wagic"); + scrollerSet = 1; scroller->setRandom(); }