* Initializes the state and its child elements. This is * used for settings that have to be reset every time the * state is returned to focus (eg. palettes), so can't * just be put in the constructor (remember there's a stack * of states, so they can be created once while being * repeatedly switched back into focus). */
| 116 | * repeatedly switched back into focus). |
| 117 | */ |
| 118 | void State::init() |
| 119 | { |
| 120 | _game->getScreen()->setPalette(_palette); |
| 121 | _game->getCursor()->setPalette(_palette); |
| 122 | _game->getCursor()->draw(); |
| 123 | _game->getFpsCounter()->setPalette(_palette); |
| 124 | _game->getFpsCounter()->draw(); |
| 125 | if (_game->getResourcePack() != 0) |
| 126 | { |
| 127 | _game->getResourcePack()->setPalette(_palette); |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | /** |
| 132 | * Runs any code the state needs to keep updating every |
nothing calls this directly
no test coverage detected