summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-25 21:27:08 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-25 21:27:08 +0300
commitb030143a03ab3d65225f8c2351469b2e8daa0e94 (patch)
treed94c785b3820b3c85990c6164d32c87b29447a24 /src
parent0ae262d137e24c44064f59102ff6b72b19c60b71 (diff)
downloadplus-b030143a03ab3d65225f8c2351469b2e8daa0e94.tar.gz
plus-b030143a03ab3d65225f8c2351469b2e8daa0e94.tar.bz2
plus-b030143a03ab3d65225f8c2351469b2e8daa0e94.tar.xz
plus-b030143a03ab3d65225f8c2351469b2e8daa0e94.zip
Move chat command /present into actions.
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp10
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/commands.cpp10
-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, 28 insertions, 14 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 1ec9f03c7..103248aa8 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -252,4 +252,14 @@ impHandler(chatEnemy)
return true;
}
+impHandler0(present)
+{
+ if (chatWindow)
+ {
+ chatWindow->doPresent();
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index c978cb57b..bd9a7148c 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -36,6 +36,7 @@ namespace Actions
decHandler(chatBlackList);
decHandler(chatEnemy);
decHandler(chatErase);
+ decHandler(present);
} // namespace Actions
#undef decHandler
diff --git a/src/commands.cpp b/src/commands.cpp
index b2e1e6eee..dbe27e8be 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -251,16 +251,6 @@ static void outStringNormal(ChatTab *const tab,
}
}
-impHandler0(present)
-{
- if (chatWindow)
- {
- chatWindow->doPresent();
- return true;
- }
- return false;
-}
-
impHandler0(quit)
{
// quit();
diff --git a/src/commands.h b/src/commands.h
index 91b55ccca..14923761f 100644
--- a/src/commands.h
+++ b/src/commands.h
@@ -51,7 +51,6 @@ struct CommandInfo final
namespace Commands
{
- decHandler(present);
decHandler(quit);
decHandler(showAll);
decHandler(move);
@@ -119,8 +118,7 @@ namespace Commands
enum
{
- COMMAND_PRESENT = 0,
- COMMAND_QUIT,
+ COMMAND_QUIT = 0,
COMMAND_ALL,
COMMAND_MOVE,
COMMAND_TARGET,
@@ -187,7 +185,6 @@ enum
static const CommandInfo commands[] =
{
- {"present", &Commands::present, -1, false},
{"quit", &Commands::quit, -1, false},
{"all", &Commands::showAll, -1, false},
{"move", &Commands::move, -1, true},
diff --git a/src/input/inputaction.h b/src/input/inputaction.h
index dacd2a2da..e9813d3d8 100644
--- a/src/input/inputaction.h
+++ b/src/input/inputaction.h
@@ -365,6 +365,7 @@ namespace InputAction
PARTY,
ME,
TOGGLE,
+ PRESENT,
TOTAL
};
} // namespace InputAction
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 289490723..ff7b3bf6e 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -3054,6 +3054,15 @@ static const InputActionData inputActionData[InputAction::TOTAL] = {
InputAction::NO_VALUE, 50,
InputCondition::INGAME,
"toggle",
+ false},
+ {"keyPresent",
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ InputType::UNKNOWN, InputAction::NO_VALUE,
+ Input::GRP_DEFAULT,
+ &Actions::present,
+ InputAction::NO_VALUE, 50,
+ InputCondition::INGAME,
+ "present",
false}
};
diff --git a/src/input/pages/other.cpp b/src/input/pages/other.cpp
index b36badd8e..46a1eb286 100644
--- a/src/input/pages/other.cpp
+++ b/src/input/pages/other.cpp
@@ -226,6 +226,12 @@ SetupActionData setupActionDataOther[] =
"",
},
{
+ // TRANSLATORS: input action name
+ N_("Print visible players in chat"),
+ InputAction::PRESENT,
+ "",
+ },
+ {
"",
InputAction::NO_VALUE,
""