Definition at line 18 of file Pedometer.h.
Public Member Functions | |
Pedometer (LevelStatus *status, Level *level) | |
virtual | ~Pedometer () |
virtual const char * | getName () const |
void | runSelected () |
Start selected button. | |
virtual void | drawOn (SDL_Surface *screen) |
void | receiveString (const StringMsg *msg) |
Handle incoming message. | |
Protected Member Functions | |
virtual void | own_initState () |
Display menu and play menu music. | |
virtual void | own_updateState () |
virtual void | own_pauseState () |
virtual void | own_resumeState () |
virtual void | own_cleanState () |
|
Definition at line 26 of file Pedometer.cpp. 00027 { 00028 m_level = new_level; 00029 m_status = status; 00030 m_solution = m_status->readSolvedMoves(); 00031 m_meterPhase = 0; 00032 m_bg = NULL; 00033 00034 prepareBg(); 00035 prepareRack(); 00036 00037 m_numbers = ResImagePack::loadImage( 00038 Path::dataReadPath("images/menu/numbers.png")); 00039 00040 takeHandler(new PedoInput(this)); 00041 registerDrawable(m_bg); 00042 registerDrawable(m_rack); 00043 registerDrawable(this); 00044 }
|
|
Definition at line 46 of file Pedometer.cpp. 00047 { 00048 if (m_level) { 00049 delete m_level; 00050 } 00051 SDL_FreeSurface(m_numbers); 00052 delete m_rack; 00053 delete m_bg; 00054 }
|
|
Implements Drawable. Definition at line 181 of file Pedometer.cpp. 00182 { 00183 drawNumbers(screen, m_solution.size()); 00184 }
|
|
Implements INamed. Definition at line 50 of file Pedometer.h. 00050 { return "state_pedometer"; };
|
|
Implements GameState. Definition at line 46 of file Pedometer.h. 00046 {}
|
|
Display menu and play menu music.
Implements GameState. Definition at line 107 of file Pedometer.cpp. 00108 { 00109 registerWatcher("lang"); 00110 own_resumeState(); 00111 }
|
|
Implements GameState. Definition at line 44 of file Pedometer.h. 00044 {}
|
|
Implements GameState. Definition at line 45 of file Pedometer.h. 00045 {}
|
|
Implements GameState. Definition at line 114 of file Pedometer.cpp. 00115 { 00116 watchCursor(); 00117 }
|
|
Handle incoming message. Messages:
Reimplemented from BaseListener. Definition at line 237 of file Pedometer.cpp. 00238 { 00239 if (msg->equalsName("param_changed")) { 00240 std::string param = msg->getValue(); 00241 if ("lang" == param) { 00242 prepareBg(); 00243 } 00244 else { 00245 throw UnknownMsgException(msg); 00246 } 00247 } 00248 else { 00249 throw UnknownMsgException(msg); 00250 } 00251 }
|
|
Start selected button.
Definition at line 143 of file Pedometer.cpp. 00144 { 00145 if (m_activeMask == m_maskRun) { 00146 runLevel(); 00147 } 00148 else if (m_activeMask == m_maskReplay) { 00149 runReplay(); 00150 } 00151 else { 00152 quitState(); 00153 } 00154 }
|