Example #1
0
	bool MultiPlayerMenu::onInput(const InputEvent &event) {
		if(event.keyDown(InputKey::esc)) {
			setVisible(false);
			return true;
		}

		return false;
	}
Example #2
0
	bool HudConsole::onInput(const InputEvent &event) {
		if(event.keyDown('`') || (event.mouseButtonDown(InputButton::left) && !isMouseOver(event))) {
			setVisible(false);
			return true;
		}
		if(isVisible() && event.key() >= 32 && event.key() <= 127)
			return true;
		
		//TODO: fixme

		return false;
	}