aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-19 02:23:57 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2022-01-19 02:23:57 +0000
commitdda0f0240c1a19eeb321d362e751b397a63996ec (patch)
treeb2c270fd94d5897639a1a1ad17b3c3e777833325 /Northstar.Client/mod/scripts/vscripts/ui/controller_prompts.nut
parent917da6226d0aa62717f4ec2abe644589dd8e0e42 (diff)
parent190349255d45ae88f7b6d2ad872a5df15699d97a (diff)
downloadNorthstarMods-dda0f0240c1a19eeb321d362e751b397a63996ec.tar.gz
NorthstarMods-dda0f0240c1a19eeb321d362e751b397a63996ec.zip
Merge branch 'main' of https://github.com/R2Northstar/NorthstarMods
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)
+}