aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-09 20:28:55 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-10 11:28:13 +0200
commit8c01ad8a9da86fc76bc9a180ccab10ede726625a (patch)
treef4921c84c11f8286f8324314bd60f33388747660 /src
parentf60a5ec08fd9c1138d924911847140c6e3dd8fb5 (diff)
downloadminetest-8c01ad8a9da86fc76bc9a180ccab10ede726625a.tar.gz
minetest-8c01ad8a9da86fc76bc9a180ccab10ede726625a.tar.bz2
minetest-8c01ad8a9da86fc76bc9a180ccab10ede726625a.zip
ClientActiveObject::debugInfoText()
Diffstat (limited to 'src')
-rw-r--r--src/clientobject.h1
-rw-r--r--src/game.cpp8
2 files changed, 7 insertions, 2 deletions
diff --git a/src/clientobject.h b/src/clientobject.h
index 946858404..2d0089bcf 100644
--- a/src/clientobject.h
+++ b/src/clientobject.h
@@ -65,6 +65,7 @@ public:
virtual void processMessage(const std::string &data){}
virtual std::string infoText() {return "";}
+ virtual std::string debugInfoText() {return "";}
/*
This takes the return value of
diff --git a/src/game.cpp b/src/game.cpp
index d5a733c60..d39b5b7ba 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -959,7 +959,7 @@ void the_game(
// Object infos are shown in this
gui::IGUIStaticText *guitext_info = guienv->addStaticText(
L"",
- core::rect<s32>(0,0,400,text_height+5) + v2s32(100,200),
+ core::rect<s32>(0,0,400,text_height*5+5) + v2s32(100,200),
false, false);
// Status text (displays info when showing and hiding GUI stuff, etc.)
@@ -2069,6 +2069,10 @@ void the_game(
{
infotext = narrow_to_wide(selected_object->infoText());
+ if(infotext == L"" && show_debug){
+ infotext = narrow_to_wide(selected_object->debugInfoText());
+ }
+
//if(input->getLeftClicked())
if(input->getLeftState())
{
@@ -2292,7 +2296,7 @@ void the_game(
{
guitext_info->setText(infotext.c_str());
- guitext_info->setVisible(show_hud);
+ guitext_info->setVisible(show_hud && g_menumgr.menuCount() == 0);
}
{