大更新,太多了,具体进游戏查看详细更新内容

反正很多
This commit is contained in:
2025-05-27 11:09:09 +08:00
parent a1e71a6a79
commit 8215cfa3ee
382 changed files with 13838 additions and 2974 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

10
Test/name.md Normal file
View File

@@ -0,0 +1,10 @@
1. **Sprout Farm** - 强调萌芽和成长的主题。
2. **Blossom Acres** - 带有一种繁荣和丰收的感觉。
3. **Seedling Valley** - 体现出种子发芽和成长的意象。
4. **Blooming Fields** - 描绘出一片生机勃勃的田野。
5. **Harvest Haven** - 突出丰收和宁静的避风港。
6. **Green Sprouts** - 强调绿色和生态的主题。
7. **Budding Grove** - 表现出萌芽和新生的活力。
8. **Sprout Sanctuary** - 描述一个充满生命力的避难所。
9. **Thrive Farmstead** - 强调繁荣和成长。
10. **Sprout Haven** - 结合萌芽和避风港的概念。