aboutsummaryrefslogtreecommitdiff
path: root/src/guiPauseMenu.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2010-12-22 16:30:23 +0200
committerPerttu Ahola <celeron55@gmail.com>2010-12-22 16:30:23 +0200
commit3de176cc587c4e0601c3c3f5a049e30db6bd2c17 (patch)
tree0a85d68c29e1354acda46e0c4e46e80a6f891039 /src/guiPauseMenu.cpp
parent2e41a5e304d9c35ece851b8a65482bca8784b582 (diff)
downloadminetest-3de176cc587c4e0601c3c3f5a049e30db6bd2c17.tar.gz
minetest-3de176cc587c4e0601c3c3f5a049e30db6bd2c17.tar.bz2
minetest-3de176cc587c4e0601c3c3f5a049e30db6bd2c17.zip
crafting system!
Diffstat (limited to 'src/guiPauseMenu.cpp')
-rw-r--r--src/guiPauseMenu.cpp49
1 files changed, 47 insertions, 2 deletions
diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp
index 73e406e18..b8f0473e8 100644
--- a/src/guiPauseMenu.cpp
+++ b/src/guiPauseMenu.cpp
@@ -22,6 +22,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "guiPauseMenu.h"
#include "debug.h"
+#include "serialization.h"
GUIPauseMenu::GUIPauseMenu(gui::IGUIEnvironment* env,
gui::IGUIElement* parent, s32 id,
@@ -49,6 +50,9 @@ void GUIPauseMenu::resizeGui()
return;
m_screensize_old = screensize;
+ /*
+ Remove stuff
+ */
{
gui::IGUIElement *e = getElementFromId(256);
if(e != NULL)
@@ -59,11 +63,21 @@ void GUIPauseMenu::resizeGui()
if(e != NULL)
e->remove();
}
+ {
+ gui::IGUIElement *e = getElementFromId(258);
+ if(e != NULL)
+ e->remove();
+ }
+ {
+ gui::IGUIElement *e = getElementFromId(259);
+ if(e != NULL)
+ e->remove();
+ }
core::rect<s32> rect(
- screensize.X/2 - 560/2,
+ screensize.X/2 - 580/2,
screensize.Y/2 - 300/2,
- screensize.X/2 + 560/2,
+ screensize.X/2 + 580/2,
screensize.Y/2 + 300/2
);
@@ -72,6 +86,9 @@ void GUIPauseMenu::resizeGui()
v2s32 size = rect.getSize();
+ /*
+ Add stuff
+ */
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2-25);
@@ -82,6 +99,34 @@ void GUIPauseMenu::resizeGui()
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
Environment->addButton(rect, this, 257, L"Exit");
}
+ {
+ core::rect<s32> rect(0, 0, 180, 220);
+ rect = rect + v2s32(size.X/2 + 90, size.Y/2-rect.getHeight()/2);
+ const wchar_t *text =
+ L"Keys:\n"
+ L"- WASD: Walk\n"
+ L"- Mouse left: dig blocks\n"
+ L"- Mouse right: place blocks\n"
+ L"- Mouse wheel: select item\n"
+ L"- R: Toggle viewing all loaded chunks\n"
+ L"- I: Inventory menu\n"
+ L"- ESC: This menu\n"
+ L"\n"
+ L"To generate a new map, remove the map directory.\n";
+ Environment->addStaticText(text, rect, false, true, this, 258);
+ }
+ {
+ core::rect<s32> rect(0, 0, 180, 220);
+ rect = rect + v2s32(size.X/2 - 90 - rect.getWidth(), size.Y/2-rect.getHeight()/2);
+ wchar_t text[200];
+ swprintf(text, 200,
+ L"Minetest-c55\n"
+ L"SER_FMT_VER_HIGHEST=%i",
+ (int)SER_FMT_VER_HIGHEST
+ );
+
+ Environment->addStaticText(text, rect, false, true, this, 259);
+ }
}
void GUIPauseMenu::draw()