diff options
author | Ira Rice <irarice@gmail.com> | 2009-03-11 18:06:30 -0600 |
---|---|---|
committer | Ira Rice <irarice@gmail.com> | 2009-03-11 18:06:30 -0600 |
commit | c2ae6d9cea9fc3d861e73d4cf7eca5284519758e (patch) | |
tree | e52abe836ff96446ec3109cf7c273dd7ee35c1e8 /src/gui/menuwindow.cpp | |
parent | 6b538196a799525d8ad4bf5cb5affe87745d4242 (diff) | |
download | mana-c2ae6d9cea9fc3d861e73d4cf7eca5284519758e.tar.gz mana-c2ae6d9cea9fc3d861e73d4cf7eca5284519758e.tar.bz2 mana-c2ae6d9cea9fc3d861e73d4cf7eca5284519758e.tar.xz mana-c2ae6d9cea9fc3d861e73d4cf7eca5284519758e.zip |
Added a new Popup class, which overall is functionally similar to the
Window class, but stripped down to the bare essential functionality to
just draw and position them. This means no resizing, no close buttons,
no ability to move them, etc. This should help reduce the overhead in
drawing speech bubbles, as well as other popup type dialogs, but is also
not a drop in replacement for the Window class as well.
Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/menuwindow.cpp')
-rw-r--r-- | src/gui/menuwindow.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index 8a695865..e1be908b 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -26,7 +26,9 @@ #include "button.h" #include "menuwindow.h" -#include "windowcontainer.h" +#include "window.h" + +#include "../graphics.h" #include "../utils/gettext.h" @@ -50,13 +52,8 @@ namespace { } MenuWindow::MenuWindow(): - Window("") + Popup("Menu") { - setResizable(false); - setWindowName("Menu"); - setMovable(false); - setTitleBarHeight(0); - // Buttons static const char *buttonNames[] = { @@ -81,7 +78,7 @@ MenuWindow::MenuWindow(): h = btn->getHeight(); } - setPosition(windowContainer->getWidth() - x - 3, 3); + setPosition(graphics->getWidth() - x - 3, 3); setContentSize(x - 3, h); } |