diff options
Diffstat (limited to 'Northstar.Client/mod/scripts/vscripts/ui')
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/menu_main.nut | 36 | ||||
-rw-r--r-- | Northstar.Client/mod/scripts/vscripts/ui/panel_mainmenu.nut | 3 |
2 files changed, 36 insertions, 3 deletions
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 ) |