mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Tune main menu a bit and show version number in there
This commit is contained in:
parent
4bcff65ad0
commit
b2c905d800
@ -185,15 +185,23 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
|
|||||||
v2s32 size_client = size - v2s32(40, 0);
|
v2s32 size_client = size - v2s32(40, 0);
|
||||||
|
|
||||||
changeCtype("");
|
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);
|
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";
|
const wchar_t *text = L"C\nL\nI\nE\nN\nT";
|
||||||
//gui::IGUIStaticText *t =
|
//gui::IGUIStaticText *t =
|
||||||
Environment->addStaticText(text, rect, false, true, this, -1);
|
Environment->addStaticText(text, rect, false, true, this, -1);
|
||||||
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
|
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nickname + password
|
// Nickname + password
|
||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 0, 110, 20);
|
core::rect<s32> rect(0, 0, 110, 20);
|
||||||
@ -295,28 +303,28 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
|
|||||||
Server section
|
Server section
|
||||||
*/
|
*/
|
||||||
|
|
||||||
v2s32 topleft_server(40, 250);
|
v2s32 topleft_server(40, 290);
|
||||||
v2s32 size_server = size - v2s32(40, 0);
|
v2s32 size_server = size - v2s32(40, 0);
|
||||||
|
|
||||||
|
// SERVER
|
||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 0, 20, 125);
|
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";
|
const wchar_t *text = L"S\nE\nR\nV\nE\nR";
|
||||||
//gui::IGUIStaticText *t =
|
//gui::IGUIStaticText *t =
|
||||||
Environment->addStaticText(text, rect, false, true, this, -1);
|
Environment->addStaticText(text, rect, false, true, this, -1);
|
||||||
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
|
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Server parameters
|
// Server parameters
|
||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 0, 250, 30);
|
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,
|
Environment->addCheckBox(creative_mode, rect, this, GUI_ID_CREATIVE_CB,
|
||||||
wgettext("Creative Mode"));
|
wgettext("Creative Mode"));
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 0, 250, 30);
|
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,
|
Environment->addCheckBox(enable_damage, rect, this, GUI_ID_DAMAGE_CB,
|
||||||
wgettext("Enable Damage"));
|
wgettext("Enable Damage"));
|
||||||
}
|
}
|
||||||
@ -324,7 +332,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
|
|||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 0, 130, 30);
|
core::rect<s32> rect(0, 0, 130, 30);
|
||||||
//rect += topleft_server + v2s32(size_server.X-40-130, 100+25);
|
//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,
|
Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON,
|
||||||
wgettext("Delete map"));
|
wgettext("Delete map"));
|
||||||
}
|
}
|
||||||
@ -344,13 +352,13 @@ void GUIMainMenu::drawMenu()
|
|||||||
video::SColor bgcolor(140,0,0,0);
|
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;
|
rect += AbsoluteRect.UpperLeftCorner;
|
||||||
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
|
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
core::rect<s32> rect(0, 250, 620, 430);
|
core::rect<s32> rect(0, 290, 620, 430);
|
||||||
rect += AbsoluteRect.UpperLeftCorner;
|
rect += AbsoluteRect.UpperLeftCorner;
|
||||||
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
|
driver->draw2DRectangle(bgcolor, rect, &AbsoluteClippingRect);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user