feat: update 2.1.9
This commit is contained in:
@@ -10,6 +10,7 @@ extends Control
|
||||
@onready var google_button := %GoogleButton as Button
|
||||
@onready var apple_button := %AppleButton as Button
|
||||
@onready var facebook_button := %FacebookButton as Button
|
||||
@onready var steam_button := %SteamButton as Button
|
||||
@onready var status_label := %StatusLabel as Label
|
||||
@onready var loading_spinner := %LoadingSpinner as TextureProgressBar
|
||||
|
||||
@@ -65,6 +66,7 @@ func _connect_signals() -> void:
|
||||
google_button.pressed.connect(_on_google_pressed)
|
||||
apple_button.pressed.connect(_on_apple_pressed)
|
||||
facebook_button.pressed.connect(_on_facebook_pressed)
|
||||
steam_button.pressed.connect(_on_steam_pressed)
|
||||
|
||||
# Registration buttons
|
||||
register_button.pressed.connect(_on_register_pressed)
|
||||
@@ -99,15 +101,18 @@ func _setup_ui() -> void:
|
||||
_configure_social_buttons()
|
||||
|
||||
func _configure_social_buttons() -> void:
|
||||
# Google - available on all platforms
|
||||
google_button.visible = true
|
||||
# Google - hidden until API is configured
|
||||
google_button.visible = false
|
||||
|
||||
# Apple - iOS and macOS only (or hide if not configured)
|
||||
var os := OS.get_name()
|
||||
apple_button.visible = os in ["iOS", "macOS"]
|
||||
|
||||
# Facebook - available on all platforms
|
||||
facebook_button.visible = true
|
||||
# Facebook - hidden until API is configured
|
||||
facebook_button.visible = false
|
||||
|
||||
# Steam - show when GodotSteam GDExtension is available
|
||||
steam_button.visible = ClassDB.class_exists("Steam")
|
||||
|
||||
# =============================================================================
|
||||
# Panel Switching
|
||||
@@ -190,6 +195,13 @@ func _on_facebook_pressed() -> void:
|
||||
# When you have the access token from Facebook SDK:
|
||||
# AuthManager.login_with_facebook(access_token)
|
||||
|
||||
func _on_steam_pressed() -> void:
|
||||
if is_loading:
|
||||
return
|
||||
|
||||
# Steam login uses Steamworks auth ticket
|
||||
AuthManager.login_with_steam()
|
||||
|
||||
|
||||
|
||||
func _on_server_option_selected(index: int) -> void:
|
||||
@@ -421,6 +433,7 @@ func _set_inputs_enabled(enabled: bool) -> void:
|
||||
google_button.disabled = not enabled
|
||||
apple_button.disabled = not enabled
|
||||
facebook_button.disabled = not enabled
|
||||
steam_button.disabled = not enabled
|
||||
email_input.editable = enabled
|
||||
password_input.editable = enabled
|
||||
reg_email_input.editable = enabled
|
||||
|
||||
Reference in New Issue
Block a user