forked from datawhale/whale-town-front
fix: 修复交互与通知板问题
- 修复Z轴逻辑调整精灵与物品的排序 - 渲染前强制 content_container.modulate.a = 1.0,避免内容区被透明度状态卡住导致看起来空白
This commit is contained in:
@@ -43,16 +43,13 @@ func _ready():
|
||||
$CenterContainer/PanelContainer/VBoxContainer/Header/RightContainer/CloseButton.pressed.connect(_on_close_pressed)
|
||||
prev_btn.pressed.connect(_on_prev_pressed)
|
||||
next_btn.pressed.connect(_on_next_pressed)
|
||||
|
||||
# Network Integration - Use direct callback for better error handling
|
||||
# Short timeout (2.0s) so mock data appears quickly if server is down
|
||||
NetworkManager.get_request("/notices", _on_notices_response, 2.0)
|
||||
|
||||
# Initial Setup (with generic "Loading" state)
|
||||
|
||||
# Local-only setup: use built-in pages directly, no network dependency.
|
||||
mock_pages = pages.duplicate(true)
|
||||
pages = [{"text": "[center]Loading notices...[/center]", "image_color": Color(0.9, 0.9, 0.9)}]
|
||||
current_page = 0
|
||||
content_container.modulate.a = 1.0
|
||||
_setup_dots()
|
||||
_update_ui(false)
|
||||
_update_ui(false)
|
||||
|
||||
func _exit_tree():
|
||||
_restore_chat_ui_mouse_input()
|
||||
@@ -73,7 +70,8 @@ func _on_notices_response(success: bool, data: Dictionary, _error_info: Dictiona
|
||||
|
||||
current_page = 0
|
||||
_setup_dots()
|
||||
_update_ui(true)
|
||||
content_container.modulate.a = 1.0
|
||||
_update_ui(false)
|
||||
|
||||
|
||||
func _setup_dots():
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://rdmro1jxs6ga"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://c227m0okmjt2t" path="res://scenes/prefabs/ui/NoticeDialog.gd" id="1_script"]
|
||||
[ext_resource type="Script" uid="uid://c227m0okmjt2t" path="res://scenes/ui/NoticeDialog.gd" id="1_script"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_rounded"]
|
||||
bg_color = Color(0.95, 0.95, 0.95, 1)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://d8mam0n1a3b5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://cohijfo0yeo34" path="res://scenes/ui/WelcomeDialog.gd" id="1_vs5b1"]
|
||||
[ext_resource type="Script" uid="uid://cohijfo0yeo34" path="res://scenes/prefabs/ui/WelcomeDialog.gd" id="1_vs5b1"]
|
||||
[ext_resource type="Texture2D" uid="uid://v7loa3smfkrd" path="res://assets/materials/WelcomeBoard.png" id="2_dy5hw"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_card"]
|
||||
|
||||
Reference in New Issue
Block a user