summaryrefslogtreecommitdiff
path: root/src/gui/window.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-29 20:41:14 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2004-12-29 20:41:14 +0000
commit7cf46d715e08b8a355ef9ea7be5421a2710d65fc (patch)
tree7aa0166030af099fd82b2d080229497d466009aa /src/gui/window.cpp
parent9ddc6e0d5208820a374f3bc9b9c5678e013535b2 (diff)
downloadmana-7cf46d715e08b8a355ef9ea7be5421a2710d65fc.tar.gz
mana-7cf46d715e08b8a355ef9ea7be5421a2710d65fc.tar.bz2
mana-7cf46d715e08b8a355ef9ea7be5421a2710d65fc.tar.xz
mana-7cf46d715e08b8a355ef9ea7be5421a2710d65fc.zip
Ported the npc text dialog and some other small updates.
Diffstat (limited to 'src/gui/window.cpp')
-rw-r--r--src/gui/window.cpp27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 4d386071..632ad303 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -172,9 +172,6 @@ void Window::add(Widget *w, int x, int y)
void Window::mousePress(int mx, int my, int button)
{
- int x = this->getDimension().x;
- int y = this->getDimension().y;
-
mouseDown = true;
mousePX = mx;
@@ -199,24 +196,16 @@ void Window::mouseMotion(int mx, int my)
y = y - (mousePY - my);
// Keep guichan window inside window
- if (x < 0)
- x = 0;
- if (y < 0)
- y = 0;
- if (x + winWidth > 799)
- x = 799 - winWidth;
- if (y + winHeight > 599)
- y = 599 - winHeight;
+ if (x < 0) x = 0;
+ if (y < 0) y = 0;
+ if (x + winWidth > 799) x = 799 - winWidth;
+ if (y + winHeight > 599) y = 599 - winHeight;
// Snap window to edges
- if (x < snapSize)
- x = 0;
- if (y < snapSize)
- y = 0;
- if (x + winWidth + snapSize > 799)
- x = 799 - winWidth;
- if (y + winHeight + snapSize > 599)
- y = 599 - winHeight;
+ if (x < snapSize) x = 0;
+ if (y < snapSize) y = 0;
+ if (x + winWidth + snapSize > 799) x = 799 - winWidth;
+ if (y + winHeight + snapSize > 599) y = 599 - winHeight;
this->setPosition(x, y);
}