Beispiel #1
0
bool EventsManager::isKeyMousePressed() {
	bool result = _leftButton || _rightButton || isKeyPending();
	debounceLeft();
	zeroKeys();

	return result;
}
Beispiel #2
0
bool EventsManager::isKeyMousePressed() {
	bool result = _leftButton || _rightButton || isKeyPending();
	debounceMouse();
	clearEvents();

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

	return false;
}