Exemplo n.º 1
0
void startMenu::runMenu() {
	Clock clock;
	while (_window.isOpen()) {
		float time = clock.getElapsedTime().asMicroseconds() / 800;
		clock.restart();
		if (menuControl()) return;
		if (_ButtFocus == start) { _start.setFocus(true); _options.setFocus(false); _autors.setFocus(false); _quit.setFocus(false); }
		if (_ButtFocus == option) { _start.setFocus(false); _options.setFocus(true); _autors.setFocus(false); _quit.setFocus(false); }
		if (_ButtFocus == autors) { _start.setFocus(false); _options.setFocus(false); _autors.setFocus(true); _quit.setFocus(false); }
		if (_ButtFocus == quit) { _start.setFocus(false); _options.setFocus(false); _autors.setFocus(false); _quit.setFocus(true); }
		_window.clear();
		update(time);
		_window.display();
	}
}
Exemplo n.º 2
0
void  Interface::display()
{
  std::stringstream num;

  if (SDL_BlitSurface(back_sprt, NULL, screen, NULL) < 0)
    throw errGraphic ("Blit Surface");
  displayInput();
  scrollControl();
  menuControl();
  displayKitchenMenu(0);
  if (kitchensData.size() != 0)
    displayKitchenList(0);
  displayKitchenMenu(1);
  if (kitchensData.size() != 0)
    displayKitchenList(1);
  SDL_UpdateRect(screen, 0, 0, screen->w, screen->h);
}
Exemplo n.º 3
0
void startMenu::handleInput()
{
	menuControl();
}