Task info item

This commit is contained in:
Flash 2025-12-10 00:11:39 +08:00
parent 04ce9036cc
commit c3b7b7913c
8 changed files with 290 additions and 129 deletions

View File

@ -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"

BIN
res_src/message_file-0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

View File

@ -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

View File

@ -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发送给对"

View File

@ -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<TextureRect>("H1/TextureRect");
_lbl = GetNode<Label>("H1/V1/H2/Label");
_pb = GetNode<ProgressBar>("H1/V1/ProgressBar");
_btn = GetNode<Button>("H1/CC/Button");
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
}

View File

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

View File

@ -0,0 +1,88 @@
[gd_scene load_steps=6 format=3 uid="uid://cf6b1t8pujosf"]
[ext_resource type="FontFile" uid="uid://b36k051ivdyik" path="res://resources/Font/GenSenRounded2-B.ttc" id="1_bly24"]
[ext_resource type="FontFile" uid="uid://dx3xrb5ewup4g" path="res://resources/Font/GenSenRounded2-M.ttc" id="2_dccb5"]
[ext_resource type="FontFile" uid="uid://cexdvv8qg3x01" path="res://resources/Font/文泉驿点阵正黑.TTF" id="4_sj1p0"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6243c"]
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
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_02kya"]
content_margin_top = 2.0
content_margin_bottom = 4.0
bg_color = Color(0.13725491, 0.20784314, 0.27058825, 1)
corner_radius_top_left = 4
corner_radius_top_right = 4
corner_radius_bottom_right = 4
corner_radius_bottom_left = 4
[node name="PanelContainer" type="PanelContainer"]
offset_right = 128.0
offset_bottom = 161.0
theme_override_styles/panel = SubResource("StyleBoxFlat_6243c")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("1_bly24")
theme_override_styles/normal = SubResource("StyleBoxFlat_02kya")
text = "日志"
horizontal_alignment = 1
vertical_alignment = 2
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer"]
custom_minimum_size = Vector2(300, 100)
layout_mode = 2
size_flags_vertical = 3
draw_focus_border = true
horizontal_scroll_mode = 0
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/ScrollContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
theme_override_fonts/font = ExtResource("2_dccb5")
theme_override_font_sizes/font_size = 14
text = "ASCV发送给对"
[node name="Button2" type="Button" parent="VBoxContainer/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="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "ASCV发送给对"
[node name="Button4" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "ASCV发送给对"
[node name="Button5" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "ASCV发送给对"
[node name="Button6" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "ASCV发送给对"
[node name="Button7" type="Button" parent="VBoxContainer/ScrollContainer/VBoxContainer"]
layout_mode = 2
text = "ASCV发送给对"

View File

@ -0,0 +1,126 @@
[gd_scene load_steps=9 format=3 uid="uid://be878nlt2ev0j"]
[ext_resource type="Script" uid="uid://c0il3my2egqm8" path="res://scenes/ui-elements/TaskInfoItem.cs" id="1_8s2w1"]
[ext_resource type="Texture2D" uid="uid://cefbdtvinowsp" path="res://res_src/message_file-0.png" id="1_w5erq"]
[ext_resource type="FontFile" uid="uid://dx3xrb5ewup4g" path="res://resources/Font/GenSenRounded2-M.ttc" id="2_8s2w1"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_7cj6f"]
content_margin_left = 5.0
content_margin_right = 8.0
bg_color = Color(0.93333334, 0.93333334, 0.93333334, 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 = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
shadow_size = 2
shadow_offset = Vector2(1, 1)
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_aaq5d"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_w5erq"]
content_margin_left = 1.0
content_margin_top = 1.0
content_margin_right = 1.0
content_margin_bottom = 1.0
bg_color = Color(0.16470589, 0.23137255, 0.3019608, 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 = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8s2w1"]
bg_color = Color(0.8039216, 0.827451, 0.8392157, 1)
border_width_left = 1
border_width_top = 1
border_width_right = 1
border_width_bottom = 1
border_color = Color(0.8, 0.8, 0.8, 0)
corner_radius_top_left = 2
corner_radius_top_right = 2
corner_radius_bottom_right = 2
corner_radius_bottom_left = 2
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_h34y6"]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0.6, 0.6, 0.6, 0)
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 = 5
corner_radius_top_right = 5
corner_radius_bottom_right = 5
corner_radius_bottom_left = 5
[node name="TaskInfoItem" type="PanelContainer"]
custom_minimum_size = Vector2(320, 50)
offset_right = 307.0
offset_bottom = 50.0
theme_override_styles/panel = SubResource("StyleBoxFlat_7cj6f")
script = ExtResource("1_8s2w1")
[node name="H1" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="H1"]
layout_mode = 2
texture = ExtResource("1_w5erq")
stretch_mode = 3
[node name="Panel2" type="Panel" parent="H1"]
custom_minimum_size = Vector2(5, 0)
layout_mode = 2
theme_override_styles/panel = SubResource("StyleBoxEmpty_aaq5d")
[node name="V1" type="VBoxContainer" parent="H1"]
layout_mode = 2
alignment = 1
[node name="H2" type="HBoxContainer" parent="H1/V1"]
layout_mode = 2
[node name="Label" type="Label" parent="H1/V1/H2"]
layout_mode = 2
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_fonts/font = ExtResource("2_8s2w1")
theme_override_font_sizes/font_size = 14
text = "A 类期刊 - 001 (50%)"
[node name="ProgressBar" type="ProgressBar" parent="H1/V1"]
custom_minimum_size = Vector2(200, 12)
layout_mode = 2
theme_override_styles/background = SubResource("StyleBoxFlat_w5erq")
theme_override_styles/fill = SubResource("StyleBoxFlat_8s2w1")
value = 50.0
show_percentage = false
[node name="Panel" type="Panel" parent="H1"]
custom_minimum_size = Vector2(10, 0)
layout_mode = 2
size_flags_horizontal = 3
theme_override_styles/panel = SubResource("StyleBoxEmpty_aaq5d")
[node name="CC" type="CenterContainer" parent="H1"]
layout_mode = 2
[node name="Button" type="Button" parent="H1/CC"]
layout_mode = 2
theme_override_colors/font_color = Color(0.06666667, 0.06666667, 0.06666667, 1)
theme_override_fonts/font = ExtResource("2_8s2w1")
theme_override_font_sizes/font_size = 16
theme_override_styles/normal = SubResource("StyleBoxFlat_h34y6")
text = "详情"