aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-29 22:34:58 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 22:34:58 +0200
commitb2c905d80006e77bed15ae830901551e650d3bbf (patch)
tree9ae261fadf2f70db605f5835af496f4d72343c21 /src
parent4bcff65ad08db0aba80505602ea2a4844b7c3ea4 (diff)
downloadminetest-b2c905d80006e77bed15ae830901551e650d3bbf.tar.gz
minetest-b2c905d80006e77bed15ae830901551e650d3bbf.tar.bz2
minetest-b2c905d80006e77bed15ae830901551e650d3bbf.zip
Tune main menu a bit and show version number in there
Diffstat (limited to 'src')
-rw-r--r--src/guiMainMenu.cpp28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 43ec85c8a..5c6104ca3 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -185,15 +185,23 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
v2s32 size_client = size - v2s32(40, 0);
changeCtype("");
+
+ // Version
+ {
+ core::rect<s32> rect(0, 0, 300, 30);
+ rect += topleft_client + v2s32(-36, 0);
+ Environment->addStaticText(narrow_to_wide(VERSION_STRING).c_str(),
+ rect, false, true, this, -1);
+ }
+ // CLIENT
{
core::rect<s32> rect(0, 0, 20, 125);
- rect += topleft_client + v2s32(-15, 60);
+ rect += topleft_client + v2s32(-15, 80);
const wchar_t *text = L"C\nL\nI\nE\nN\nT";
//gui::IGUIStaticText *t =
Environment->addStaticText(text, rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
-
// Nickname + password
{
core::rect<s32> rect(0, 0, 110, 20);
@@ -295,28 +303,28 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Server section
*/
- v2s32 topleft_server(40, 250);
+ v2s32 topleft_server(40, 290);
v2s32 size_server = size - v2s32(40, 0);
+ // SERVER
{
core::rect<s32> rect(0, 0, 20, 125);
- rect += topleft_server + v2s32(-15, 40);
+ rect += topleft_server + v2s32(-15, 15);
const wchar_t *text = L"S\nE\nR\nV\nE\nR";
//gui::IGUIStaticText *t =
Environment->addStaticText(text, rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
-
// Server parameters
{
core::rect<s32> rect(0, 0, 250, 30);
- rect += topleft_server + v2s32(35, 30);
+ rect += topleft_server + v2s32(35, 20);
Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB,
wgettext("Creative Mode"));
}
{
core::rect<s32> rect(0, 0, 250, 30);
- rect += topleft_server + v2s32(35, 60);
+ rect += topleft_server + v2s32(35, 40);
Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB,
wgettext("Enable Damage"));
}
@@ -324,7 +332,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 130, 30);
//rect += topleft_server + v2s32(size_server.X-40-130, 100+25);
- rect += topleft_server + v2s32(40, 100+25);
+ rect += topleft_server + v2s32(40, 90);
Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON,
wgettext("Delete map"));
}
@@ -344,13 +352,13 @@ void GUIMainMenu::drawMenu()
video::SColor bgcolor(140,0,0,0);
{
- core::rect<s32> rect(0, 0, 620, 230);
+ core::rect<s32> rect(0, 0, 620, 270);
rect += AbsoluteRect.UpperLeftCorner;
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
}
{
- core::rect<s32> rect(0, 250, 620, 430);
+ core::rect<s32> rect(0, 290, 620, 430);
rect += AbsoluteRect.UpperLeftCorner;
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
}