优化项目架构

This commit is contained in:
2025-09-15 19:10:37 +08:00
parent 4119ed3445
commit 26b856d74e
1361 changed files with 4 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
extends Control
@onready var http_texture_rect = $VBoxContainer/ImageContainer/HTTPTextureRect
@onready var url_input = $VBoxContainer/HBoxContainer/URLInput
@onready var load_url_button = $VBoxContainer/HBoxContainer/LoadURLButton
@onready var qq_input = $VBoxContainer/HBoxContainer2/QQInput
@onready var load_qq_button = $VBoxContainer/HBoxContainer2/LoadQQButton
@onready var status_label = $VBoxContainer/StatusLabel
func _ready():
# 设置默认URL和QQ号
url_input.text = "https://picsum.photos/200"
qq_input.text = "3205788256"
# 连接按钮信号
load_url_button.pressed.connect(_on_load_url_button_pressed)
load_qq_button.pressed.connect(_on_load_qq_button_pressed)
# 连接HTTP纹理矩形的信号
http_texture_rect.loading_started.connect(_on_loading_started)
http_texture_rect.loading_finished.connect(_on_loading_finished)
func _on_load_url_button_pressed():
var url = url_input.text.strip_edges()
if url.is_empty():
status_label.text = "状态: URL不能为空"
return
http_texture_rect.load_from_url(url)
func _on_load_qq_button_pressed():
var qq_number = qq_input.text.strip_edges()
if qq_number.is_empty() or not qq_number.is_valid_int():
status_label.text = "状态: 无效的QQ号"
return
http_texture_rect.load_qq_avatar(qq_number)
func _on_loading_started():
status_label.text = "状态: 正在加载..."
func _on_loading_finished(success: bool):
if success:
status_label.text = "状态: 加载成功"
else:
status_label.text = "状态: 加载失败"

View File

@@ -0,0 +1 @@
uid://cgylg6qxwg1f0

View File

@@ -0,0 +1,76 @@
[gd_scene load_steps=3 format=3 uid="uid://dyh0q82ytbk3v"]
[ext_resource type="Script" uid="uid://cgylg6qxwg1f0" path="res://Test/HTTPTextureRectDemo.gd" id="1_vgcbi"]
[ext_resource type="Script" uid="uid://0d2j5m6j2ema" path="res://Components/HTTPTextureRect.gd" id="2_pujh8"]
[node name="HTTPTextureRectDemo" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_vgcbi")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
alignment = 1
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "HTTP图像加载演示"
horizontal_alignment = 1
[node name="ImageContainer" type="CenterContainer" parent="VBoxContainer"]
layout_mode = 2
size_flags_vertical = 3
[node name="HTTPTextureRect" type="TextureRect" parent="VBoxContainer/ImageContainer"]
custom_minimum_size = Vector2(200, 200)
layout_mode = 2
stretch_mode = 5
script = ExtResource("2_pujh8")
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="URLLabel" type="Label" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "URL:"
[node name="URLInput" type="LineEdit" parent="VBoxContainer/HBoxContainer"]
custom_minimum_size = Vector2(300, 0)
layout_mode = 2
placeholder_text = "输入HTTP图像URL"
[node name="LoadURLButton" type="Button" parent="VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "加载图像"
[node name="HBoxContainer2" type="HBoxContainer" parent="VBoxContainer"]
layout_mode = 2
alignment = 1
[node name="QQLabel" type="Label" parent="VBoxContainer/HBoxContainer2"]
layout_mode = 2
text = "QQ号:"
[node name="QQInput" type="LineEdit" parent="VBoxContainer/HBoxContainer2"]
custom_minimum_size = Vector2(200, 0)
layout_mode = 2
placeholder_text = "输入QQ号"
[node name="LoadQQButton" type="Button" parent="VBoxContainer/HBoxContainer2"]
layout_mode = 2
text = "加载QQ头像"
[node name="StatusLabel" type="Label" parent="VBoxContainer"]
layout_mode = 2
text = "状态: 等待加载"
horizontal_alignment = 1

View File

@@ -0,0 +1 @@
{"2048":{"best_score":2056,"current_score":2056,"games_played":4.0,"highest_tile":128.0,"total_moves":515.0},"global":{"last_played":"2025-08-26T19:02:30"},"pushbox":{"best_moves_per_level":{"1":4.0,"2.0":13.0},"current_level":1.0,"levels_completed":3.0,"max_level_reached":1.0,"total_moves":56.0}}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,91 @@
"farm_name": "虚空农场",
"user_name": "2221023030",
"player_name": "虚空领主",
"user_password": "wangpeng666",
"last_login_time": "2025年06月09日12时38分55秒",
"total_login_time": "0时45分49秒",
"farm_name": "天帝阁",
"user_name": "2253536500",
"player_name": "小朋友不哭",
"user_password": "a1567923",
"last_login_time": "2025年06月10日09时10分35秒",
"total_login_time": "1时4分20秒",
"farm_name": "神经病院",
"user_name": "2427948832",
"player_name": "唐大伟",
"user_password": "mylc205823",
"last_login_time": "2025年06月29日23时35分03秒",
"total_login_time": "5时45分12秒",
"farm_name": "嘻嘻",
"user_name": "2634726358",
"player_name": "哈哈",
"user_password": "wxt20050712",
"last_login_time": "2025年05月25日19时22分59秒",
"total_login_time": "0时8分43秒",
"farm_name": "杨亮的家",
"user_name": "2671387804",
"player_name": "杨亮的主人",
"user_password": "woshiyangliang",
"last_login_time": "2025年05月25日21时45分45秒",
"total_login_time": "0时16分13秒",
"farm_name": "丿Dream丨天辰",
"user_name": "2809548669",
"player_name": "丿Dream丨天辰",
"user_password": "asd123456",
"last_login_time": "2025年05月25日22时06分21秒",
"total_login_time": "0时0分15秒",
"farm_name": "llsjjz的农村",
"user_name": "2968204579",
"player_name": "llsjjz",
"user_password": "llsjjz0920",
"last_login_time": "2025年06月13日18时57分26秒",
"total_login_time": "0时6分57秒",
"farm_name": "niuma",
"user_name": "2973419538",
"player_name": "niuma",
"user_password": "247896",
"last_login_time": "2025年06月19日09时27分49秒",
"total_login_time": "3时35分6秒",
"farm_name": "星露谷物语",
"user_name": "3275498742",
"player_name": "黎贤泽",
"user_password": "327549",
"last_login_time": "2025年06月13日12时45分01秒",
"total_login_time": "0时7分34秒",
"farm_name": "困困的鼠鼠",
"user_name": "3346964708",
"player_name": "OVO",
"user_password": "123456",
"last_login_time": "2025年06月29日22时48分26秒",
"total_login_time": "0时8分48秒",
"farm_name": "帅气大蟑螂",
"user_name": "3491961863",
"player_name": "帅气大蟑螂",
"user_password": "yyf198763",
"last_login_time": "2025年06月09日07时07分11秒",
"total_login_time": "0时3分43秒",
"farm_name": "yuqi的农场",
"user_name": "3961448694",
"player_name": "yuqi",
"user_password": "x123456",
"last_login_time": "2025年06月28日20时54分03秒",
"total_login_time": "0时35分48秒",
"farm_name": "joker xue",
"user_name": "839151204",
"player_name": "上上谦",
"user_password": "Asxx4522",
"last_login_time": "2025年06月08日22时26分51秒",
"total_login_time": "0时8分30秒",