aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut19
1 files changed, 19 insertions, 0 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut b/Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut
new file mode 100644
index 000000000..1866f0563
--- /dev/null
+++ b/Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut
@@ -0,0 +1,19 @@
+global function PrependControllerPrompts
+
+// Returns the string that gets turned into a controller prompt image in the front-end
+string function ControllerButtonToStr( int buttonID )
+{
+ switch (buttonID)
+ {
+ case BUTTON_Y:
+ return "%[Y_BUTTON|]%"
+ case BUTTON_X:
+ return "%[X_BUTTON|]%"
+ }
+ unreachable
+}
+
+string function PrependControllerPrompts( int buttonID, string localizationKey )
+{
+ return ControllerButtonToStr( buttonID ) + " " + Localize(localizationKey)
+}