Commit 89d8b59
committed
Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.
Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.
If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.
Changelog: Try to improve UI responsiveness under low framerates.1 parent b25bc87 commit 89d8b59
4 files changed
+48
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
320 | 325 | | |
321 | 326 | | |
322 | 327 | | |
| 328 | + | |
| 329 | + | |
323 | 330 | | |
324 | 331 | | |
325 | 332 | | |
| |||
355 | 362 | | |
356 | 363 | | |
357 | 364 | | |
| 365 | + | |
| 366 | + | |
358 | 367 | | |
359 | 368 | | |
360 | 369 | | |
| |||
489 | 498 | | |
490 | 499 | | |
491 | 500 | | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
492 | 511 | | |
493 | 512 | | |
494 | 513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
184 | 185 | | |
185 | 186 | | |
186 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1451 | 1451 | | |
1452 | 1452 | | |
1453 | 1453 | | |
| 1454 | + | |
| 1455 | + | |
1454 | 1456 | | |
1455 | 1457 | | |
1456 | | - | |
1457 | 1458 | | |
1458 | 1459 | | |
1459 | 1460 | | |
| 1461 | + | |
| 1462 | + | |
1460 | 1463 | | |
1461 | 1464 | | |
1462 | 1465 | | |
1463 | 1466 | | |
| 1467 | + | |
| 1468 | + | |
1464 | 1469 | | |
1465 | 1470 | | |
1466 | 1471 | | |
1467 | 1472 | | |
1468 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
1469 | 1476 | | |
1470 | 1477 | | |
1471 | 1478 | | |
1472 | 1479 | | |
| 1480 | + | |
| 1481 | + | |
1473 | 1482 | | |
1474 | 1483 | | |
1475 | 1484 | | |
1476 | 1485 | | |
1477 | 1486 | | |
1478 | 1487 | | |
1479 | 1488 | | |
1480 | | - | |
1481 | | - | |
1482 | 1489 | | |
1483 | 1490 | | |
1484 | 1491 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
395 | 405 | | |
396 | 406 | | |
397 | 407 | | |
| |||
431 | 441 | | |
432 | 442 | | |
433 | 443 | | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
434 | 447 | | |
435 | 448 | | |
436 | 449 | | |
| |||
0 commit comments