Exemplo n.º 1
0
void Input::reset()
{
	iMouseR = Vec2s::ZERO;

	Vec2s wndSize((short)mainApp->getWindow()->getSize().x, (short)mainApp->getWindow()->getSize().y); 
	Vec2s absPos = wndSize / 2;
	setMousePosAbs(absPos);
	
	for(size_t i = 0; i < Mouse::ButtonCount; i++) {
		iMouseTime[i] = 0;
		iMouseTimeSet[i] = 0;
		bMouseButton[i] = bOldMouseButton[i] = false;
		iOldNumClick[i] = 0;
	}

	iKeyId=-1;

	for(int i = 0; i < Keyboard::KeyCount; i++)
	{
		keysStates[i]=0;
	}

	EERIEMouseButton = 0;

	iWheelDir = 0;
}
Exemplo n.º 2
0
void Input::centerMouse() {
	setMousePosAbs(Vec2s(mainApp->getWindow()->getSize() / s32(2)));
}