diff --git a/README.md b/README.md index 36f16b6..d17f317 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ TODO: 9. **Required** attribute for inputs 10. Installer should register **gurt://** as a valid protocol thru the registry. 11. < input type=**datetime** />, essentially a type "date" but with a vertical separator, then `mm | ss | FORMAT` layout for time. +12. **< table >** component. [🔗 Related Godot proposal](https://github.com/godotengine/godot-proposals/issues/97) Issues: 1. **< br />** counts as 1 element in **WebsiteContainer**, therefore despite being (0,0) in size, it counts as double in spacing diff --git a/Scenes/Styles/BrowserText.tres b/Scenes/Styles/BrowserText.tres index bb4b543..7d6c026 100644 --- a/Scenes/Styles/BrowserText.tres +++ b/Scenes/Styles/BrowserText.tres @@ -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") diff --git a/Scenes/Tab.tscn b/Scenes/Tab.tscn index 5a06534..7aa7bd5 100644 --- a/Scenes/Tab.tscn +++ b/Scenes/Tab.tscn @@ -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"] diff --git a/Scenes/Tags/option.tscn b/Scenes/Tags/option.tscn new file mode 100644 index 0000000..6ee40b1 --- /dev/null +++ b/Scenes/Tags/option.tscn @@ -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 diff --git a/Scenes/Tags/select.tscn b/Scenes/Tags/select.tscn new file mode 100644 index 0000000..7203742 --- /dev/null +++ b/Scenes/Tags/select.tscn @@ -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") diff --git a/Scripts/Tags/option.gd b/Scripts/Tags/option.gd new file mode 100644 index 0000000..2f49a14 --- /dev/null +++ b/Scripts/Tags/option.gd @@ -0,0 +1,10 @@ +extends Control + +func init(element: HTMLParser.HTMLElement) -> void: + # This is mainly for cases where + + + + + +
Name: @@ -463,6 +473,12 @@ func create_element_node(element: HTMLParser.HTMLElement) -> Control: "li": node = LI.instantiate() node.init(element) + "select": + node = SELECT.instantiate() + node.init(element) + "option": + node = OPTION.instantiate() + node.init(element) _: return null diff --git a/icon.svg.import b/icon.svg.import index 62ed273..7c15aba 100644 --- a/icon.svg.import +++ b/icon.svg.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://70k6bw18rsri" +uid="uid://bslojb4cmwnvn" path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex" metadata={ "vram_texture": false