History

removed _mouse{X,Y}

Atlante45 committed 11 years ago

Commit ee124f51 parent 469c9582 files · +3 −20Browse files

Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all

Unified · Split

interface/src/Application.cpp+1−16
@@ -165,8 +165,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 164 unmodified lines
165 _scaleMirror(1.0f),165 _scaleMirror(1.0f),
166 _rotateMirror(0.0f),166 _rotateMirror(0.0f),
167 _raiseMirror(0.0f),167 _raiseMirror(0.0f),
168 _mouseX(0),
169 _mouseY(0),
170 _lastMouseMove(usecTimestampNow()),168 _lastMouseMove(usecTimestampNow()),
171 _lastMouseMoveWasSimulated(false),169 _lastMouseMoveWasSimulated(false),
172 _mouseHidden(false),170 _mouseHidden(false),
@@ -1282,9 +1280,6 @@ void Application::mouseMoveEvent(QMouseEvent* event, unsigned int deviceID) { · 1109 unmodified lines
1282 _mouseHidden = false;1280 _mouseHidden = false;
1283 _seenMouseMove = true;1281 _seenMouseMove = true;
1284 }1282 }
1285
1286 _mouseX = event->x();
1287 _mouseY = event->y();
1288}1283}
1289 1284
1290void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) {1285void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) {
@@ -1302,8 +1297,6 @@ void Application::mousePressEvent(QMouseEvent* event, unsigned int deviceID) { · 11 unmodified lines
1302 1297
1303 if (activeWindow() == _window) {1298 if (activeWindow() == _window) {
1304 if (event->button() == Qt::LeftButton) {1299 if (event->button() == Qt::LeftButton) {
1305 _mouseX = event->x();
1306 _mouseY = event->y();
1307 _mouseDragStartedX = getTrueMouseX();1300 _mouseDragStartedX = getTrueMouseX();
1308 _mouseDragStartedY = getTrueMouseY();1301 _mouseDragStartedY = getTrueMouseY();
1309 _mousePressed = true;1302 _mousePressed = true;
@@ -1346,8 +1339,6 @@ void Application::mouseReleaseEvent(QMouseEvent* event, unsigned int deviceID) { · 36 unmodified lines
1346 1339
1347 if (activeWindow() == _window) {1340 if (activeWindow() == _window) {
1348 if (event->button() == Qt::LeftButton) {1341 if (event->button() == Qt::LeftButton) {
1349 _mouseX = event->x();
1350 _mouseY = event->y();
1351 _mousePressed = false;1342 _mousePressed = false;
1352 1343
1353 if (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && mouseOnScreen()) {1344 if (Menu::getInstance()->isOptionChecked(MenuOption::Stats) && mouseOnScreen()) {
@@ -1940,9 +1931,6 @@ void Application::init() { · 586 unmodified lines
1940 _voxelShader.init();1931 _voxelShader.init();
1941 _pointShader.init();1932 _pointShader.init();
1942 1933
1943 _mouseX = _glWidget->width() / 2;
1944 _mouseY = _glWidget->height() / 2;
1945
1946 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager1934 // TODO: move _myAvatar out of Application. Move relevant code to MyAvataar or AvatarManager
1947 _avatarManager.init();1935 _avatarManager.init();
1948 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);1936 _myCamera.setMode(CAMERA_MODE_FIRST_PERSON);
@@ -3557,9 +3545,6 @@ void Application::deleteVoxelAt(const VoxelDetail& voxel) { · 1608 unmodified lines
3557}3545}
3558 3546
3559void Application::resetSensors() {3547void Application::resetSensors() {
3560 _mouseX = _glWidget->width() / 2;
3561 _mouseY = _glWidget->height() / 2;
3562
3563 _faceshift.reset();3548 _faceshift.reset();
3564 _visage.reset();3549 _visage.reset();
3565 _dde.reset();3550 _dde.reset();
@@ -3572,7 +3557,7 @@ void Application::resetSensors() { · 6 unmodified lines
3572 QScreen* currentScreen = _window->windowHandle()->screen();3557 QScreen* currentScreen = _window->windowHandle()->screen();
3573 QWindow* mainWindow = _window->windowHandle();3558 QWindow* mainWindow = _window->windowHandle();
3574 QPoint windowCenter = mainWindow->geometry().center();3559 QPoint windowCenter = mainWindow->geometry().center();
3575 QCursor::setPos(currentScreen, windowCenter);3560 _glWidget->cursor().setPos(currentScreen, windowCenter);
3576 3561
3577 _myAvatar->reset();3562 _myAvatar->reset();
3578 3563

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t