Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2011-08-28 10:20:15 +0000
committerStijn Buys <ingar@osirion.org>2011-08-28 10:20:15 +0000
commit1158e624c9daf10b08643b59bcb36dcc1d2caad8 (patch)
treef0498ff6d8ec877354d79287386d18f794250971 /src/client/mainmenu.cc
parent14b2372f1a74198ec4f485f9665ef0acc27ae5e3 (diff)
Removed unnecessary class.
Diffstat (limited to 'src/client/mainmenu.cc')
-rw-r--r--src/client/mainmenu.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/client/mainmenu.cc b/src/client/mainmenu.cc
index 5d1706d..6a4f97a 100644
--- a/src/client/mainmenu.cc
+++ b/src/client/mainmenu.cc
@@ -6,6 +6,7 @@
#include "client/mainmenu.h"
#include "ui/paint.h"
+#include "ui/ui.h"
namespace client
{
@@ -41,6 +42,16 @@ void MainMenu::hide()
ui::Widget::hide();
}
+void MainMenu::resize()
+{
+ // resize and reposition all child windows
+ const float smallmargin = ui::UI::elementsize.height();
+ for (ui::Widget::Children::iterator child = children().begin(); child != children().end(); ++child) {
+ (*child)->set_size(width() - smallmargin * 2, height() - smallmargin * 4);
+ (*child)->set_location(smallmargin, smallmargin * 2);
+ }
+}
+
void MainMenu::draw_background()
{
// we override draw_background instead of adding a ui::Bitmap child