<select>, <option>

This commit is contained in:
Face
2025-07-25 17:49:32 +03:00
parent 1435ec6f94
commit 558bb2fc1b
11 changed files with 141 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
[gd_resource type="Theme" load_steps=42 format=3 uid="uid://bn6rbmdy60lhr"]
[gd_resource type="Theme" load_steps=44 format=3 uid="uid://bn6rbmdy60lhr"]
[ext_resource type="Texture2D" uid="uid://dn4dxn8hkrd64" path="res://Assets/Icons/checkbox.svg" id="1_75mhk"]
[ext_resource type="Texture2D" uid="uid://b6ucuyluuw43" path="res://Assets/Icons/checkbox_pressed_grayscale.svg" id="2_2abar"]
@@ -91,6 +91,21 @@ corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_hcg1v"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_imqxn"]
content_margin_left = 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 = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_luhv8"]
content_margin_left = 15.0
content_margin_top = 15.0
@@ -196,9 +211,20 @@ LineEdit/colors/font_placeholder_color = Color(0, 0, 0, 0.6)
LineEdit/styles/focus = SubResource("StyleBoxFlat_jecr6")
LineEdit/styles/normal = SubResource("StyleBoxFlat_75mhk")
LineEdit/styles/read_only = null
OptionButton/colors/font_color = Color(0, 0, 0, 1)
OptionButton/colors/font_focus_color = Color(0, 0, 0, 1)
OptionButton/colors/font_hover_color = Color(0, 0, 0, 1)
OptionButton/colors/font_hover_pressed_color = Color(0, 0, 0, 1)
OptionButton/colors/font_pressed_color = Color(0, 0, 0, 1)
OptionButton/styles/focus = SubResource("StyleBoxEmpty_hcg1v")
OptionButton/styles/hover = SubResource("StyleBoxFlat_imqxn")
OptionButton/styles/normal = SubResource("StyleBoxFlat_75mhk")
OptionButton/styles/pressed = SubResource("StyleBoxFlat_jecr6")
PopupMenu/colors/font_color = Color(1, 1, 1, 1)
PopupMenu/colors/font_hover_color = Color(0.817522, 0.817521, 0.817521, 1)
PopupMenu/colors/font_hover_color = Color(1, 1, 1, 1)
PopupMenu/constants/h_separation = 8
PopupMenu/constants/icon_max_width = 24
PopupMenu/constants/item_start_padding = 4
PopupMenu/icons/checked = ExtResource("10_luhv8")
PopupMenu/icons/checked_disabled = ExtResource("11_i42bf")
PopupMenu/icons/radio_checked = ExtResource("12_4akvr")

View File

@@ -6,7 +6,7 @@
[ext_resource type="Texture2D" uid="uid://c7u7a1u1v04bx" path="res://Scenes/Styles/TabGradientDefault.tres" id="3_q3baj"]
[ext_resource type="StyleBox" uid="uid://bx3sgro1ageff" path="res://Scenes/Styles/TabDefault.tres" id="4_ib6pj"]
[ext_resource type="Texture2D" uid="uid://dglkjumm1q4lo" path="res://Assets/Icons/23x23-empty.svg" id="5_ib6pj"]
[ext_resource type="Texture2D" uid="uid://70k6bw18rsri" path="res://icon.svg" id="6_ib6pj"]
[ext_resource type="Texture2D" uid="uid://bslojb4cmwnvn" path="res://icon.svg" id="6_ib6pj"]
[ext_resource type="StyleBox" uid="uid://dn8exdnk8tjce" path="res://Scenes/Styles/CloseButtonHover.tres" id="6_pisds"]
[ext_resource type="StyleBox" uid="uid://dn6r16retee3l" path="res://Scenes/Styles/CloseButtonNormal.tres" id="7_1ohlo"]

23
Scenes/Tags/option.tscn Normal file
View File

@@ -0,0 +1,23 @@
[gd_scene load_steps=3 format=3 uid="uid://bopt1234568aa"]
[ext_resource type="Script" uid="uid://ps8duq0aw3tu" path="res://Scripts/Tags/li.gd" id="1_option"]
[ext_resource type="Theme" uid="uid://bn6rbmdy60lhr" path="res://Scenes/Styles/BrowserText.tres" id="2_theme"]
[node name="Option" type="Control"]
layout_mode = 3
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
script = ExtResource("1_option")
[node name="RichTextLabel" type="RichTextLabel" parent="."]
layout_mode = 2
size_flags_horizontal = 3
focus_mode = 2
mouse_default_cursor_shape = 1
theme = ExtResource("2_theme")
theme_override_colors/default_color = Color(0, 0, 0, 1)
bbcode_enabled = true
text = "Placeholder"
fit_content = true
selection_enabled = true

20
Scenes/Tags/select.tscn Normal file
View File

@@ -0,0 +1,20 @@
[gd_scene load_steps=3 format=3 uid="uid://bsel1234568aa"]
[ext_resource type="Script" uid="uid://bmu8q4rm1wopd" path="res://Scripts/Tags/select.gd" id="1_select"]
[ext_resource type="Theme" uid="uid://bn6rbmdy60lhr" path="res://Scenes/Styles/BrowserText.tres" id="2_xq313"]
[node name="Select" type="Control"]
layout_mode = 3
anchors_preset = 10
anchor_right = 1.0
grow_horizontal = 2
size_flags_horizontal = 3
size_flags_vertical = 0
script = ExtResource("1_select")
[node name="OptionButton" type="OptionButton" parent="."]
layout_mode = 0
offset_right = 161.0
offset_bottom = 32.0
mouse_default_cursor_shape = 2
theme = ExtResource("2_xq313")