diff --git a/project.godot b/project.godot index 7569a38..074b69b 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="最强导师" -run/main_scene="uid://db2qcx61nc0q4" +run/main_scene="uid://be878nlt2ev0j" config/features=PackedStringArray("4.5", "C#", "GL Compatibility") config/icon="res://icon.svg" diff --git a/res_src/message_file-0.png b/res_src/message_file-0.png new file mode 100644 index 0000000..d0f9f7e Binary files /dev/null and b/res_src/message_file-0.png differ diff --git a/res_src/message_file-0.png.import b/res_src/message_file-0.png.import new file mode 100644 index 0000000..9814e7d --- /dev/null +++ b/res_src/message_file-0.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cefbdtvinowsp" +path="res://.godot/imported/message_file-0.png-0f5e941a643607a17e3980a728e6cc6c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://res_src/message_file-0.png" +dest_files=["res://.godot/imported/message_file-0.png-0f5e941a643607a17e3980a728e6cc6c.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/scenes/log_panel.tscn b/scenes/log_panel.tscn deleted file mode 100644 index c40f114..0000000 --- a/scenes/log_panel.tscn +++ /dev/null @@ -1,128 +0,0 @@ -[gd_scene load_steps=12 format=3 uid="uid://cf6b1t8pujosf"] - -[ext_resource type="Texture2D" uid="uid://dskyby1ou2spq" path="res://res_src/transparent-8px.png" id="1_4tp53"] -[ext_resource type="Texture2D" uid="uid://bilmun5leavcp" path="res://res_src/scroll-bar-bg.png" id="2_t4qyh"] -[ext_resource type="FontFile" uid="uid://1xg1ofw27hbp" path="res://resources/Font/unifont-17.0.03.otf" id="3_lalyk"] -[ext_resource type="FontFile" uid="uid://cexdvv8qg3x01" path="res://resources/Font/文泉驿点阵正黑.TTF" id="4_sj1p0"] - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_iyx0m"] -bg_color = Color(0.296, 0.54800004, 0.8, 1) -border_width_left = 1 -border_width_right = 1 -border_color = Color(0.8, 0.8, 0.8, 0) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_bl13t"] -bg_color = Color(0.48000002, 0.64000005, 0.8, 1) -border_width_left = 1 -border_width_right = 1 -border_color = Color(0.8, 0.8, 0.8, 0) - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_74lek"] -bg_color = Color(0.9, 0.9, 0.9, 1) -border_width_left = 1 -border_width_right = 1 -border_color = Color(0.8, 0.8, 0.8, 0) - -[sub_resource type="StyleBoxTexture" id="StyleBoxTexture_bl13t"] -texture = ExtResource("2_t4qyh") -texture_margin_left = 2.0 -texture_margin_top = 2.0 -texture_margin_right = 2.0 -texture_margin_bottom = 2.0 -axis_stretch_horizontal = 1 -axis_stretch_vertical = 1 - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_j5jx5"] -content_margin_left = 4.0 -content_margin_top = 4.0 -content_margin_right = 4.0 -content_margin_bottom = 4.0 -bg_color = Color(1, 1, 1, 0.75) -draw_center = false -border_width_left = 2 -border_width_top = 2 -border_width_right = 2 -border_width_bottom = 2 -corner_radius_top_left = 3 -corner_radius_top_right = 3 -corner_radius_bottom_right = 3 -corner_radius_bottom_left = 3 -corner_detail = 5 -expand_margin_left = 2.0 -expand_margin_top = 2.0 -expand_margin_right = 2.0 -expand_margin_bottom = 2.0 - -[sub_resource type="Theme" id="Theme_ij1v8"] -default_font = ExtResource("3_lalyk") -default_font_size = 12 -VScrollBar/icons/decrement = ExtResource("1_4tp53") -VScrollBar/icons/increment = ExtResource("1_4tp53") -VScrollBar/styles/grabber = SubResource("StyleBoxFlat_iyx0m") -VScrollBar/styles/grabber_highlight = SubResource("StyleBoxFlat_bl13t") -VScrollBar/styles/grabber_pressed = SubResource("StyleBoxFlat_74lek") -VScrollBar/styles/scroll = SubResource("StyleBoxTexture_bl13t") -VScrollBar/styles/scroll_focus = SubResource("StyleBoxFlat_j5jx5") - -[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_lpvoh"] -content_margin_left = 3.0 -content_margin_top = 3.0 -content_margin_right = 3.0 -content_margin_bottom = 3.0 -bg_color = Color(0.2, 0.36862746, 0.53333336, 1) -border_width_left = 1 -border_width_top = 1 -border_width_right = 1 -border_width_bottom = 1 -border_color = Color(0, 0, 0, 1) -corner_radius_top_left = 4 -corner_radius_top_right = 4 -corner_radius_bottom_right = 4 -corner_radius_bottom_left = 4 -anti_aliasing = false - -[node name="Node2D" type="Control"] -layout_mode = 3 -anchors_preset = 0 - -[node name="ScrollContainer" type="ScrollContainer" parent="."] -layout_mode = 0 -offset_right = 170.0 -offset_bottom = 108.0 -theme = SubResource("Theme_ij1v8") -theme_override_styles/panel = SubResource("StyleBoxFlat_lpvoh") -draw_focus_border = true -horizontal_scroll_mode = 0 - -[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"] -layout_mode = 2 - -[node name="Button" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" - -[node name="Button2" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -theme_override_fonts/font = ExtResource("4_sj1p0") -theme_override_font_sizes/font_size = 12 -text = "ASCV发送给对" - -[node name="Button3" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" - -[node name="Button4" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" - -[node name="Button5" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" - -[node name="Button6" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" - -[node name="Button7" type="Button" parent="ScrollContainer/VBoxContainer"] -layout_mode = 2 -text = "ASCV发送给对" diff --git a/scenes/ui-elements/TaskInfoItem.cs b/scenes/ui-elements/TaskInfoItem.cs new file mode 100644 index 0000000..a26c1e9 --- /dev/null +++ b/scenes/ui-elements/TaskInfoItem.cs @@ -0,0 +1,34 @@ +using Godot; +using System; + +public partial class TaskInfoItem : PanelContainer +{ + [Export] + public Texture2D Icon {get; set;} + + [Export] + public string LabelText {get; set;} + + [Export] + public float Progress {get; set;} + + public Guid Id {get; set;} + + private TextureRect _tr; + private Label _lbl; + private ProgressBar _pb; + private Button _btn; + + // Called when the node enters the scene tree for the first time. + public override void _Ready() { + _tr = GetNode("H1/TextureRect"); + _lbl = GetNode