Ejemplo n.º 1
0
bool EventsManager::isKeyMousePressed() {
	bool result = _leftButton || _rightButton || isKeyPending();
	debounceLeft();
	zeroKeys();

	return result;
}
Ejemplo n.º 2
0
bool EventsManager::isKeyMousePressed() {
	bool result = _leftButton || _rightButton || isKeyPending();
	debounceMouse();
	clearEvents();

	return result;
}
Ejemplo n.º 3
0
bool EventsManager::wait(uint numFrames, bool interruptable) {
	while (!_vm->shouldQuit() && timeElapsed() < numFrames) {
		pollEventsAndWait();
		if (interruptable && (_leftButton || _rightButton || isKeyPending()))
			return true;
	}

	return false;
}