aboutsummaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-03-12 21:27:29 +0200
committerPerttu Ahola <celeron55@gmail.com>2012-03-12 21:27:29 +0200
commit2c9bb06516418b99c1eac957cfae9d84c9bef954 (patch)
tree8794a1a4b32aeb57f91f8444eead28bed1579b8a /src/game.cpp
parent18c4a901018f3487825ee6ab30d014d9795b2750 (diff)
downloadminetest-2c9bb06516418b99c1eac957cfae9d84c9bef954.tar.gz
minetest-2c9bb06516418b99c1eac957cfae9d84c9bef954.tar.bz2
minetest-2c9bb06516418b99c1eac957cfae9d84c9bef954.zip
Make finish quicktune and leave it unused (as intended)
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/game.cpp b/src/game.cpp
index ebf5028b7..465e83ea5 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -52,6 +52,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "tile.h" // For TextureSource
#include "logoutputbuffer.h"
#include "subgame.h"
+#include "quicktune_shortcutter.h"
/*
Setting this to 1 enables a special camera mode that forces
@@ -676,9 +677,7 @@ void the_game(
s32 hotbar_imagesize = 48;
// The color of the sky
-
//video::SColor skycolor = video::SColor(255,140,186,250);
-
video::SColor bgcolor_bright = video::SColor(255,170,200,230);
/*
@@ -699,6 +698,9 @@ void the_game(
// Add chat log output for errors to be shown in chat
LogOutputBuffer chat_log_error_buf(LMT_ERROR);
+ // Create UI for modifying quicktune values
+ QuicktuneShortcutter quicktune;
+
/*
Create server.
SharedPtr will delete it when it goes out of scope.
@@ -1542,6 +1544,23 @@ void the_game(
+ itos(range_new));
statustext_time = 0;
}
+
+ // Handle QuicktuneShortcutter
+ if(input->wasKeyDown(getKeySetting("keymap_quicktune_next")))
+ quicktune.next();
+ if(input->wasKeyDown(getKeySetting("keymap_quicktune_prev")))
+ quicktune.prev();
+ if(input->wasKeyDown(getKeySetting("keymap_quicktune_inc")))
+ quicktune.inc();
+ if(input->wasKeyDown(getKeySetting("keymap_quicktune_dec")))
+ quicktune.dec();
+ {
+ std::string msg = quicktune.getMessage();
+ if(msg != ""){
+ statustext = narrow_to_wide(msg);
+ statustext_time = 0;
+ }
+ }
// Item selection with mouse wheel
u16 new_playeritem = client.getPlayerItem();