From c6b59dc449f4a39247b65d7800d04057f2f26be6 Mon Sep 17 00:00:00 2001 From: BotchedRPR <68894028+BotchedRPR@users.noreply.github.com> Date: Wed, 1 Jun 2022 14:17:24 +0200 Subject: Display Northstar version on title screen (#346) * Create main.menu for showing NS version on title screen * Display Northstar version on main menu. Pulling data from Northstar.Custom, now the version of Northstar is displayed on the main menu, above the Respawn logo. * Get version data from Northstar.Client instead of Northstar.Custom * formatted main.menu --- .../mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut (limited to 'Northstar.Client/mod/scripts/vscripts/ui') diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut new file mode 100644 index 000000000..6dbafde96 --- /dev/null +++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_ns_setversionlabel.nut @@ -0,0 +1,10 @@ +untyped +global function NS_SetVersionLabel + +void function NS_SetVersionLabel() +{ + var mainMenu = GetMenu( "MainMenu" ) //Gets main menu element + var versionLabel = GetElementsByClassname( mainMenu, "nsVersionClass" )[0] //Gets the label from the mainMenu element. + Hud_SetText( versionLabel, "v" + NSGetModVersionByModName("Northstar.Client")) //Sets the label text (Getting Northstar version from Northstar.Client) +} + -- cgit v1.2.3