Deploy browser pre-alpha
This commit is contained in:
@@ -14,9 +14,21 @@ var current_screen_name := ""
|
||||
func _ready() -> void:
|
||||
Style.apply_app_theme(self)
|
||||
_build_ui()
|
||||
resized.connect(_update_responsive_layout)
|
||||
_update_responsive_layout()
|
||||
show_screen("selection" if AuthState.is_logged_in else "login", "exam")
|
||||
|
||||
|
||||
func _update_responsive_layout() -> void:
|
||||
if header_stats != null:
|
||||
header_stats.visible = size.x >= 900.0
|
||||
if app_menu != null:
|
||||
app_menu.custom_minimum_size.x = minf(340.0, maxf(280.0, size.x - 32.0))
|
||||
if app_menu.visible:
|
||||
app_menu.size = app_menu.custom_minimum_size
|
||||
app_menu.position = (get_viewport_rect().size - app_menu.size) * 0.5
|
||||
|
||||
|
||||
func show_screen(screen_name: String, payload: Variant = null) -> void:
|
||||
_close_app_menu()
|
||||
for child in $Root/Screens.get_children():
|
||||
|
||||
Reference in New Issue
Block a user