summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/actions/commands.cpp13
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/dyetool/actions/commands.cpp1
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/input/inputactionmap.h8
5 files changed, 23 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 812a9fa63..337174c25 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1049,4 +1049,17 @@ impHandler(serverConfGet)
return true;
}
+impHandler(slide)
+{
+ int x = 0;
+ int y = 0;
+
+ if (adminHandler && parse2Int(event.args, x, y))
+ {
+ adminHandler->slide(x, y);
+ return true;
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 3c8459a9d..c3102b8c0 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -89,6 +89,7 @@ namespace Actions
decHandler(serverConfSet);
decHandler(confGet);
decHandler(serverConfGet);
+ decHandler(slide);
} // namespace Actions
#undef decHandler
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
index 1820e3038..17aa14083 100644
--- a/src/dyetool/actions/commands.cpp
+++ b/src/dyetool/actions/commands.cpp
@@ -89,5 +89,6 @@ impHandlerVoid(confSet)
impHandlerVoid(serverConfSet)
impHandlerVoid(confGet)
impHandlerVoid(serverConfGet)
+impHandlerVoid(slide)
} // namespace Actions
diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h
index ccbed7386..628f70b82 100644
--- a/src/enums/input/inputaction.h
+++ b/src/enums/input/inputaction.h
@@ -604,6 +604,7 @@ enumStart(InputAction)
SERVER_CONG_GET,
CHANGE_TARGETING_TYPE,
TEST_INFO,
+ SLIDE,
TOTAL
}
enumEnd(InputAction);
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index 5d6fdc702..703913227 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -5060,13 +5060,19 @@ static const InputActionData inputActionData
| InputCondition::EMODS,
"",
UseArgs_false,
- Protected_false},
+ Protected_true},
{"keyTestInfo",
defaultAction(&Actions::testInfo),
InputCondition::INGAME,
"testinfo",
UseArgs_false,
Protected_false},
+ {"keySlide",
+ defaultAction(&Actions::slide),
+ InputCondition::INGAME,
+ "slide",
+ UseArgs_true,
+ Protected_false},
};
#undef defaultAction