Changeset 7906 in orxonox.OLD
- Timestamp:
- May 27, 2006, 2:53:30 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gui/src/lib/gui/gl_gui/glgui_cursor.cc
r7905 r7906 76 76 if (this->movement != Vector2D()) 77 77 { 78 if (this->getAbsCoor2D().x < 0.0 ) 79 movement.x = -this->getAbsCoor2D().x; 80 if (this->getAbsCoor2D().x > this->_maxBorders.x) 81 movement.x = (this->_maxBorders.x-this->getAbsCoor2D().x); 82 if (this->getAbsCoor2D().y < 0.0 ) 83 movement.y = -this->getAbsCoor2D().y; 84 if (this->getAbsCoor2D().y > this->_maxBorders.y) 85 movement.y = (this->_maxBorders.y-this->getAbsCoor2D().y); 78 newPos += movement; 79 // reposition the cursor. 80 if (newPos.x < 0.0f ) 81 newPos.x = 0.0f; 82 if (newPos.x > this->_maxBorders.x) 83 newPos.x = this->_maxBorders.x; 84 if (newPos.y < 0.0f ) 85 newPos.y = 0.0f; 86 if (newPos.y > this->_maxBorders.y) 87 newPos.y = this->_maxBorders.y; 86 88 87 newPos += movement;88 89 89 this->setAbsCoor 2D(newPos);90 this->setAbsCoorSoft2D(newPos, 10); 90 91 movement = Vector2D(); 91 92 } … … 115 116 break; 116 117 case EV_MOUSE_MOTION: 117 // newPos = Vector2D(event.x, event.y);118 118 movement += Vector2D((float)event.xRel * _mouseSensitivity, (float)event.yRel * _mouseSensitivity); 119 movement.debug();120 119 break; 121 120
Note: See TracChangeset
for help on using the changeset viewer.