aboutsummaryrefslogtreecommitdiff
path: root/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut
diff options
context:
space:
mode:
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut')
-rw-r--r--Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut36
1 files changed, 34 insertions, 2 deletions
diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut
index 2c12f7960..73e45831d 100644
--- a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut
+++ b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut
@@ -137,11 +137,43 @@ void function NorthstarMasterServerAuthDialog()
dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR"
dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis"
dialogData.message = "#AUTHENTICATION_AGREEMENT_DIALOG_TEXT"
- AddDialogButton( dialogData, "#YES", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN ) } )
- AddDialogButton( dialogData, "#NO", void function() { SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN ) } )
+ AddDialogButton( dialogData, "#YES", NorthstarMasterServerAuthDialogAgree )
+ AddDialogButton( dialogData, "#NO", NorthstarMasterServerAuthDialogDisagree )
OpenDialog( dialogData )
}
+void function NorthstarMasterServerAuthDialogAgree()
+{
+ int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" )
+ SetConVarInt( "ns_has_agreed_to_send_token", NS_AGREED_TO_SEND_TOKEN )
+
+ if ( oldValue != 0 && oldValue != NS_AGREED_TO_SEND_TOKEN )
+ {
+ DialogData dialogData
+ dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR"
+ dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis"
+ dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART"
+ AddDialogButton( dialogData, "#OK" )
+ OpenDialog( dialogData )
+ }
+}
+
+void function NorthstarMasterServerAuthDialogDisagree()
+{
+ int oldValue = GetConVarInt( "ns_has_agreed_to_send_token" )
+ SetConVarInt( "ns_has_agreed_to_send_token", NS_DISAGREED_TO_SEND_TOKEN )
+
+ if ( oldValue != 0 && oldValue != NS_DISAGREED_TO_SEND_TOKEN )
+ {
+ DialogData dialogData
+ dialogData.header = "#DIALOG_TITLE_INSTALLED_NORTHSTAR"
+ dialogData.image = $"rui/menu/fd_menu/upgrade_northstar_chassis"
+ dialogData.message = "#AUTHENTICATION_AGREEMENT_RESTART"
+ AddDialogButton( dialogData, "#OK" )
+ OpenDialog( dialogData )
+ }
+}
+
void function ActivatePanel( var panel )
{
Assert( panel != null )