| 244 | } |
| 245 | |
| 246 | void CGumpScreenGame::OnLeftMouseButtonUp() |
| 247 | { |
| 248 | int screenX, screenY; |
| 249 | GetDisplaySize(&screenX, &screenY); |
| 250 | screenX -= 20; |
| 251 | screenY -= 60; |
| 252 | |
| 253 | CPoint2Di offset = g_MouseManager.LeftDroppedOffset(); |
| 254 | |
| 255 | if (g_PressedObject.LeftObject == m_Items) //resizer |
| 256 | { |
| 257 | g_ConfigManager.GameWindowWidth = g_ConfigManager.GameWindowWidth + offset.X; |
| 258 | g_ConfigManager.GameWindowHeight = g_ConfigManager.GameWindowHeight + offset.Y; |
| 259 | |
| 260 | if (g_ConfigManager.GameWindowWidth < 640) |
| 261 | { |
| 262 | g_ConfigManager.GameWindowWidth = 640; |
| 263 | } |
| 264 | |
| 265 | if (g_ConfigManager.GameWindowWidth >= screenX) |
| 266 | { |
| 267 | g_ConfigManager.GameWindowWidth = screenX; |
| 268 | } |
| 269 | |
| 270 | if (g_ConfigManager.GameWindowHeight < 480) |
| 271 | { |
| 272 | g_ConfigManager.GameWindowHeight = 480; |
| 273 | } |
| 274 | |
| 275 | if (g_ConfigManager.GameWindowHeight >= screenY) |
| 276 | { |
| 277 | g_ConfigManager.GameWindowHeight = screenY; |
| 278 | } |
| 279 | |
| 280 | g_Weather.Generate(); |
| 281 | |
| 282 | if (g_Config.ClientVersion >= CV_200) |
| 283 | { |
| 284 | CPacketGameWindowSize().Send(); |
| 285 | } |
| 286 | } |
| 287 | else //scope |
| 288 | { |
| 289 | g_ConfigManager.GameWindowX = g_ConfigManager.GameWindowX + offset.X; |
| 290 | g_ConfigManager.GameWindowY = g_ConfigManager.GameWindowY + offset.Y; |
| 291 | |
| 292 | if (g_ConfigManager.GameWindowX < 1) |
| 293 | { |
| 294 | g_ConfigManager.GameWindowX = 0; |
| 295 | } |
| 296 | |
| 297 | if (g_ConfigManager.GameWindowY < 1) |
| 298 | { |
| 299 | g_ConfigManager.GameWindowY = 0; |
| 300 | } |
| 301 | |
| 302 | if (g_ConfigManager.GameWindowX + g_ConfigManager.GameWindowWidth > |
| 303 | g_GameWindow.GetSize().Width) |
nothing calls this directly
no test coverage detected