diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-27 12:32:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-27 12:32:16 +0300 |
commit | 7c87b2ac8e01307e603bd85420f8d10724a296e6 (patch) | |
tree | a653847183daa2bcb64f90d37893f549a2bcb6df /src | |
parent | eade4818db87cc41e4c014688e5ee0d15ede6912 (diff) | |
download | manaverse-7c87b2ac8e01307e603bd85420f8d10724a296e6.tar.gz manaverse-7c87b2ac8e01307e603bd85420f8d10724a296e6.tar.bz2 manaverse-7c87b2ac8e01307e603bd85420f8d10724a296e6.tar.xz manaverse-7c87b2ac8e01307e603bd85420f8d10724a296e6.zip |
Move chat command /dumpgl into actions.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/actions.cpp | 15 | ||||
-rw-r--r-- | src/actions/actions.h | 1 | ||||
-rw-r--r-- | src/commands.cpp | 14 | ||||
-rw-r--r-- | src/commands.h | 5 | ||||
-rw-r--r-- | src/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 9 | ||||
-rw-r--r-- | src/input/pages/other.cpp | 6 |
7 files changed, 33 insertions, 18 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 6d62f9770..9f3259c09 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -25,6 +25,7 @@ #include "dropshortcut.h" #include "emoteshortcut.h" #include "game.h" +#include "graphicsmanager.h" #include "guild.h" #include "itemshortcut.h" #include "soundmanager.h" @@ -971,4 +972,18 @@ impHandler0(dumpOGL) return true; } +#ifdef USE_OPENGL +impHandler(dumpGL) +{ + std::string str = graphicsManager.getGLVersion(); + outStringNormal(event.tab, str, str); + return true; +} +#else +impHandler0(dumpGL) +{ + return true; +} +#endif + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 4f8affb95..4aaa8b199 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -76,6 +76,7 @@ namespace Actions decHandler(dumpEnvironment); decHandler(dumpTests); decHandler(dumpOGL); + decHandler(dumpGL); } // namespace Actions #undef decHandler diff --git a/src/commands.cpp b/src/commands.cpp index 3dd1477df..02697c7ab 100644 --- a/src/commands.cpp +++ b/src/commands.cpp @@ -420,20 +420,6 @@ impHandler(dumpMods) return true; } -#ifdef USE_OPENGL -impHandler(dumpGL) -{ - std::string str = graphicsManager.getGLVersion(); - outStringNormal(event.tab, str, str); - return true; -} -#else -impHandler0(dumpGL) -{ - return true; -} -#endif - impHandler0(debugSpawn) { int cnt = atoi(event.args.c_str()); diff --git a/src/commands.h b/src/commands.h index 0a499bc5e..6c209f4a4 100644 --- a/src/commands.h +++ b/src/commands.h @@ -54,7 +54,6 @@ namespace Commands decHandler(hack); decHandler(url); decHandler(open); - decHandler(dumpGL); decHandler(dumpMods); decHandler(execute); decHandler(testsdlfont); @@ -79,8 +78,7 @@ namespace Commands enum { - COMMAND_DUMPGL = 0, - COMMAND_DUMPMODS, + COMMAND_DUMPMODS = 0, COMMAND_URL, COMMAND_OPEN, COMMAND_EXECUTE, @@ -106,7 +104,6 @@ enum static const CommandInfo commands[] = { - {"dumpgl", &Commands::dumpGL, -1, false}, {"dumpmods", &Commands::dumpMods, -1, false}, {"url", &Commands::url, -1, true}, {"open", &Commands::open, -1, true}, diff --git a/src/input/inputaction.h b/src/input/inputaction.h index d372699ef..928b1d5b9 100644 --- a/src/input/inputaction.h +++ b/src/input/inputaction.h @@ -402,6 +402,7 @@ namespace InputAction DUMP_ENVIRONMENT, DUMP_TESTS, DUMP_OGL, + DUMP_GL, TOTAL }; } // namespace InputAction diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 0eb445c53..eb430ddfa 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -3387,6 +3387,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = { InputAction::NO_VALUE, 50, InputCondition::INGAME, "dumpogl", + false}, + {"keyDumpGL", + InputType::UNKNOWN, InputAction::NO_VALUE, + InputType::UNKNOWN, InputAction::NO_VALUE, + Input::GRP_DEFAULT, + &Actions::dumpGL, + InputAction::NO_VALUE, 50, + InputCondition::INGAME, + "dumpgl", false} }; diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp index 338f947c4..4ade43d61 100644 --- a/src/input/pages/other.cpp +++ b/src/input/pages/other.cpp @@ -305,6 +305,12 @@ SetupActionData setupActionDataOther[] = }, { // TRANSLATORS: input action name + N_("Print OpenGL version in chat"), + InputAction::DUMP_GL, + "", + }, + { + // TRANSLATORS: input action name N_("Dump environments into log"), InputAction::DUMP_ENVIRONMENT, "", |