mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 22:28:56 +00:00
(svn r559) Minor simplification
This commit is contained in:
parent
53116247c3
commit
3df0ff7854
6
window.c
6
window.c
@ -806,10 +806,8 @@ bool HandleWindowDragging()
|
|||||||
int v_bottom = v->top + v->height;
|
int v_bottom = v->top + v->height;
|
||||||
int v_right = v->left + v->width;
|
int v_right = v->left + v->width;
|
||||||
if (ny + t->top >= v->top && ny + t->top < v_bottom) {
|
if (ny + t->top >= v->top && ny + t->top < v_bottom) {
|
||||||
if (v->left < 13 && nx + t->left < v->left) {
|
if ((v->left < 13 && nx + t->left < v->left) ||
|
||||||
ny = v_bottom;
|
(v_right > _screen.width - 13 && nx + t->right > v_right)) {
|
||||||
} else if (v_right > _screen.width - 13 &&
|
|
||||||
nx + t->right > v_right) {
|
|
||||||
ny = v_bottom;
|
ny = v_bottom;
|
||||||
} else {
|
} else {
|
||||||
if (nx + t->left > v->left - 13 &&
|
if (nx + t->left > v->left - 13 &&
|
||||||
|
Loading…
Reference in New Issue
Block a user