From 2c9bb06516418b99c1eac957cfae9d84c9bef954 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Mon, 12 Mar 2012 21:27:29 +0200 Subject: Make finish quicktune and leave it unused (as intended) --- src/game.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/game.cpp') 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(); -- cgit v1.2.3