summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-08-18 21:47:34 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-08-18 21:47:34 +0000
commit44cf0fd601f9f3f0bb51871dfe7b5645090f41e0 (patch)
treef0a7055847d8ad776801448f16b5dbb65ab48a61
parent7982a54c295a8aaf5b4c855a4face377ba189d39 (diff)
downloadmana-client-44cf0fd601f9f3f0bb51871dfe7b5645090f41e0.tar.gz
mana-client-44cf0fd601f9f3f0bb51871dfe7b5645090f41e0.tar.bz2
mana-client-44cf0fd601f9f3f0bb51871dfe7b5645090f41e0.tar.xz
mana-client-44cf0fd601f9f3f0bb51871dfe7b5645090f41e0.zip
*Temporary* fix to the resize code. But I'll be avenged by asking for adding resize code in guichan itself ;)
-rw-r--r--src/gui/window.cpp34
-rw-r--r--src/gui/window.h1
2 files changed, 1 insertions, 34 deletions
diff --git a/src/gui/window.cpp b/src/gui/window.cpp
index 7aca26f6..f59e6438 100644
--- a/src/gui/window.cpp
+++ b/src/gui/window.cpp
@@ -247,6 +247,7 @@ void Window::mousePress(int x, int y, int button)
// border, and is a candidate for a resize.
if (isResizable() && button == 1 &&
getGripDimension().isPointInRect(x, y) &&
+ !getContentDimension().isPointInRect(x, y) &&
hasMouse() &&
!(mMouseDrag && y > (int)getPadding()))
{
@@ -257,39 +258,6 @@ void Window::mousePress(int x, int y, int button)
}
}
-void Window::mouseOut()
-{
-
-/* Doesn't seem to help, maybe somebody will have an idea based on this...
-
- // If the mouse is a little bit too quick,
- // Throw it back to the window area when resizing.
- // Or else the resizing will stop.
- if ( mMouseResize && isResizable() )
- {
- // Get the Win old dimension
- gcn::Rectangle newDim = getDimension();
- int mouseX, mouseY;
- SDL_GetMouseState(&mouseX, &mouseY);
- // And update it to put the mouse in the middle of the grip image
- newDim.width = mouseX - newDim.x + (resizeGrip->getWidth() / 2);
- newDim.height = mouseY - newDim.y + (resizeGrip->getHeight() / 2);
-
- // Set the new window and content dimensions
- mMouseYOffset += newDim.height - getHeight();
- mMouseXOffset += newDim.width - getWidth();
- setDimension(newDim);
-
- if (mContent != NULL)
- {
- mContent->setDimension(getContentDimension());
- }
-
- }
-
-*/
-}
-
void Window::mouseMotion(int x, int y)
{
if (mMouseDrag || mMouseResize)
diff --git a/src/gui/window.h b/src/gui/window.h
index 1bdac52c..18da6cdb 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -152,7 +152,6 @@ class Window : public gcn::Window, public ConfigListener
void mousePress(int x, int y, int button);
void mouseMotion(int mx, int my);
void mouseRelease(int x, int y, int button);
- void mouseOut();
/**
* Called when an config option changes.