Ejemplo n.º 1
0
void TitleState::update() {
	if (input.upPressed() || input.downPressed()) {
		// move cursor
		if (cursor.getSelection() == CONTINUE) {
			cursor.setSelection(NEW);
		} else {
			cursor.setSelection(CONTINUE);
		}
	}

	if (input.getConfirm()) {
		// select option
		if (cursor.getSelection() == NEW) {
			MenuState *ms = new MenuState();
			stateManager->pushState(ms);
			ms->pushMenu(new NewMenu());
		} else {
			// load in party data from some file
			printf("TODO: Continue :)\n");
		}
	}

	// input handled
	input.resetAll();
}