summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-25 12:54:39 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-25 12:54:39 +0300
commit4c0d3dc62399e35c288cb82dfbf3f8811328f06c (patch)
tree24db2449750712363aa59c5b20807976a90f0771 /src
parente5ac29f35d9a0ede9d1263ab1bb7c20568dbdd67 (diff)
downloadmanaverse-4c0d3dc62399e35c288cb82dfbf3f8811328f06c.tar.gz
manaverse-4c0d3dc62399e35c288cb82dfbf3f8811328f06c.tar.bz2
manaverse-4c0d3dc62399e35c288cb82dfbf3f8811328f06c.tar.xz
manaverse-4c0d3dc62399e35c288cb82dfbf3f8811328f06c.zip
Move chat command /cleanfonts into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/actions.cpp12
-rw-r--r--src/actions/actions.h1
-rw-r--r--src/commands.cpp12
-rw-r--r--src/commands.h5
-rw-r--r--src/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h9
-rw-r--r--src/input/pages/other.cpp6
7 files changed, 30 insertions, 16 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index ae9a21b76..188a46ea1 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -556,4 +556,16 @@ impHandler0(cleanGraphics)
return true;
}
+impHandler0(cleanFonts)
+{
+ if (gui)
+ gui->clearFonts();
+ if (debugChatTab)
+ {
+ // TRANSLATORS: clear fonts cache message
+ debugChatTab->chatLog(_("Cache cleaned"));
+ }
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/actions.h b/src/actions/actions.h
index 39017c33a..9b9c148b8 100644
--- a/src/actions/actions.h
+++ b/src/actions/actions.h
@@ -58,6 +58,7 @@ namespace Actions
decHandler(where);
decHandler(who);
decHandler(cleanGraphics);
+ decHandler(cleanFonts);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index 3d8f94b39..ed90a9d56 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -251,18 +251,6 @@ static void outStringNormal(ChatTab *const tab,
}
}
-impHandler0(cleanFonts)
-{
- if (gui)
- gui->clearFonts();
- if (debugChatTab)
- {
- // TRANSLATORS: clear fonts cache message
- debugChatTab->chatLog(_("Cache cleaned"));
- }
- return true;
-}
-
impHandler(createParty)
{
if (!event.tab)
diff --git a/src/commands.h b/src/commands.h
index 507eb2dec..fceff7fe1 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -51,7 +51,6 @@ struct CommandInfo final
namespace Commands
{
- decHandler(cleanFonts);
decHandler(createParty);
decHandler(createGuild);
decHandler(party);
@@ -125,8 +124,7 @@ namespace Commands
enum
{
- COMMAND_CLEANFONTS = 0,
- COMMAND_CREATEPARTY,
+ COMMAND_CREATEPARTY = 0,
COMMAND_CREATEGUILD,
COMMAND_PARTY,
COMMAND_ME,
@@ -199,7 +197,6 @@ enum
static const CommandInfo commands[] =
{
- {"cleanfonts", &Commands::cleanFonts, -1, false},
{"createparty", &Commands::createParty, -1, true},
{"createguild", &Commands::createGuild, -1, true},
{"party", &Commands::party, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index 73e3bb2c7..68c0483d1 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -359,6 +359,7 @@ namespace InputAction
ENEMY,
ERASE,
CLEAN_GRAPHICS,
+ CLEAN_FONTS,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 5b740c61f..f8d8c944f 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3000,6 +3000,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"cleangraphics",
+ false},
+ {"keyCleanFonts",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::cleanFonts,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "cleanfonts",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index c12a24232..b36badd8e 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -220,6 +220,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Clean cached fonts"),
+ InputAction::CLEAN_FONTS,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""