Changeset 49:2f52c296803c in xplra for src/plugin
- Timestamp:
- 02/16/13 09:52:01 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/plugin/src/xplra
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/plugin/src/xplra/MessageWindow.cc
r48 r49 78 78 showForced(false), 79 79 hideTime(0.0), 80 clickedX(-1), 81 clickedY(-1), 82 clickedLeft(-1), 83 clickedTop(-1), 84 clickedRight(-1), 85 clickedBottom(-1), 80 86 duration(0.0) 81 87 { … … 172 178 clickedX = x; 173 179 clickedY = y; 180 clickedLeft = left; 181 clickedTop = top; 182 clickedRight = right; 183 clickedBottom = bottom; 174 184 } else if (mouse==xplm_MouseDrag) { 175 185 int xDiff = x - clickedX; 176 186 177 187 if (mouseMode==MOUSE_MOVE) { 178 int newLeft = left + xDiff;179 int newRight = right + xDiff;188 int newLeft = clickedLeft + xDiff; 189 int newRight = clickedRight + xDiff; 180 190 181 191 int screenWidth = XPLMGetDatai(widthDataRef); … … 186 196 187 197 int yDiff = y - clickedY; 188 int newTop = top + yDiff;189 int newBottom = bottom + yDiff;198 int newTop = clickedTop + yDiff; 199 int newBottom = clickedBottom + yDiff; 190 200 191 201 int screenHeight = XPLMGetDatai(heightDataRef); … … 195 205 } 196 206 } else if (mouseMode==MOUSE_RESIZE_LEFT) { 197 int newLeft = left + xDiff;207 int newLeft = clickedLeft + xDiff; 198 208 if (newLeft>=0 && (right-newLeft)>=minimalWidth) { 199 209 left = newLeft; 200 210 } 201 211 } else if (mouseMode==MOUSE_RESIZE_RIGHT) { 202 int newRight = right + xDiff;212 int newRight = clickedRight + xDiff; 203 213 int screenWidth = XPLMGetDatai(widthDataRef); 204 214 if (newRight<screenWidth && (newRight-left)>=minimalWidth) { … … 209 219 XPLMSetWindowGeometry(windowID, left, top, right, bottom); 210 220 211 clickedX = x;212 clickedY = y;221 // clickedX = x; 222 // clickedY = y; 213 223 } 214 224 -
src/plugin/src/xplra/MessageWindow.h
r48 r49 156 156 157 157 /** 158 * The left coordinate of the window when it was clicked. 159 */ 160 int clickedLeft; 161 162 /** 163 * The top coordinate of the window when it was clicked. 164 */ 165 int clickedTop; 166 167 /** 168 * The right coordinate of the window when it was clicked. 169 */ 170 int clickedRight; 171 172 /** 173 * The bottom coordinate of the window when it was clicked. 174 */ 175 int clickedBottom; 176 177 /** 158 178 * The mutex protecting some of the data structures that are used 159 179 * from both the simulator loop and the server thread.
Note:
See TracChangeset
for help on using the changeset viewer.