extends Control ## #257: Loading screen overlay — blocks input during save/load round-trip. ## Shown when LOAD_GAME fires; hidden when save_result arrives (success or failure). ## Full-screen, dark overlay with centered status text. const BG_COLOR := Color(0.0, 0.0, 0.0, 0.75) const TEXT_COLOR := Color("#c8d0e0") const FONT_SIZE := 18 var _label: Label = null func _ready() -> void: visible = false mouse_filter = Control.MOUSE_FILTER_STOP set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) _build_ui() func _build_ui() -> void: var bg := ColorRect.new() bg.color = BG_COLOR bg.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) bg.mouse_filter = Control.MOUSE_FILTER_IGNORE add_child(bg) _label = Label.new() _label.text = UIStrings.get_text("notifications.loading") _label.add_theme_font_size_override("font_size", FONT_SIZE) _label.add_theme_color_override("font_color", TEXT_COLOR) _label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER _label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER _label.set_anchors_and_offsets_preset(Control.PRESET_FULL_RECT) _label.mouse_filter = Control.MOUSE_FILTER_IGNORE add_child(_label) func show_loading() -> void: visible = true ## Hide the loading overlay. success=false is reserved for future failure-state UI. func hide_loading(success: bool = true) -> void: visible = false