From 0fa8c57650daa9351f4cc4a153f7642001c7ce05 Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Fri, 24 Dec 2021 00:34:47 +0000 Subject: last minute changes before release probably --- .../mod/scripts/vscripts/ui/menu_main.nut | 36 ++++++++++++++++++++-- .../mod/scripts/vscripts/ui/panel_mainmenu.nut | 3 +- 2 files changed, 36 insertions(+), 3 deletions(-) (limited to 'Northstar.Client/mod/scripts') diff --git a/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut b/Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut index 2c12f796..73e45831 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 ) diff --git a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut index ffd9bc80..7c81149c 100644 --- a/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut +++ b/Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut @@ -879,7 +879,8 @@ void function SpotlightButton_Activate( var button ) } else { - if ( link.find( "https://discord.gg" ) == 0 ) + // discord links don't work in origin overlay + if ( link.find( "https://discord.gg" ) == 0 || link == "https://northstar.tf/discord" ) LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_FORCEEXTERNAL ) else LaunchExternalWebBrowser( link, WEBBROWSER_FLAG_MUTEGAME ) -- cgit v1.2.3