From f91b55672af754be86bfa9bfb8f0aaebb1547741 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 22 Jan 2025 03:51:07 +0200 Subject: [PATCH] Add icons for the text tool's options, and make horizontal alignment work Note that due to limitations with the TextEdit node, horizontal alignment cannot be previewed until the text has been placed in the canvas. This will be fixed once https://github.com/godotengine/godot-proposals/issues/7352 is implemented. Icons made by @Erevoid. --- assets/graphics/tools/cursors/text.png | Bin 218 -> 180 bytes assets/graphics/tools/text.png | Bin 246 -> 163 bytes .../tools/text_options/allign_center.png | Bin 0 -> 136 bytes .../text_options/allign_center.png.import | 34 +++ .../tools/text_options/allign_fill.png | Bin 0 -> 126 bytes .../tools/text_options/allign_fill.png.import | 34 +++ .../tools/text_options/allign_left.png | Bin 0 -> 135 bytes .../tools/text_options/allign_left.png.import | 34 +++ .../tools/text_options/allign_right.png | Bin 0 -> 133 bytes .../text_options/allign_right.png.import | 34 +++ .../text_options/antialiasing_grayscale.png | Bin 0 -> 199 bytes .../antialiasing_grayscale.png.import | 34 +++ .../tools/text_options/antialiasing_lcd.png | Bin 0 -> 212 bytes .../text_options/antialiasing_lcd.png.import | 34 +++ .../tools/text_options/antialiasing_off.png | Bin 0 -> 226 bytes .../text_options/antialiasing_off.png.import | 34 +++ assets/graphics/tools/text_options/bold.png | Bin 0 -> 191 bytes .../tools/text_options/bold.png.import | 34 +++ assets/graphics/tools/text_options/italic.png | Bin 0 -> 169 bytes .../tools/text_options/italic.png.import | 34 +++ src/Tools/UtilityTools/Text.gd | 53 +++-- src/Tools/UtilityTools/Text.tscn | 216 ++++++++++++++---- 22 files changed, 506 insertions(+), 69 deletions(-) create mode 100644 assets/graphics/tools/text_options/allign_center.png create mode 100644 assets/graphics/tools/text_options/allign_center.png.import create mode 100644 assets/graphics/tools/text_options/allign_fill.png create mode 100644 assets/graphics/tools/text_options/allign_fill.png.import create mode 100644 assets/graphics/tools/text_options/allign_left.png create mode 100644 assets/graphics/tools/text_options/allign_left.png.import create mode 100644 assets/graphics/tools/text_options/allign_right.png create mode 100644 assets/graphics/tools/text_options/allign_right.png.import create mode 100644 assets/graphics/tools/text_options/antialiasing_grayscale.png create mode 100644 assets/graphics/tools/text_options/antialiasing_grayscale.png.import create mode 100644 assets/graphics/tools/text_options/antialiasing_lcd.png create mode 100644 assets/graphics/tools/text_options/antialiasing_lcd.png.import create mode 100644 assets/graphics/tools/text_options/antialiasing_off.png create mode 100644 assets/graphics/tools/text_options/antialiasing_off.png.import create mode 100644 assets/graphics/tools/text_options/bold.png create mode 100644 assets/graphics/tools/text_options/bold.png.import create mode 100644 assets/graphics/tools/text_options/italic.png create mode 100644 assets/graphics/tools/text_options/italic.png.import diff --git a/assets/graphics/tools/cursors/text.png b/assets/graphics/tools/cursors/text.png index db3403d84b730d5cec54e168b079f8c8b8ff5a65..69acea30f49d3ef00c7d4dc5073febe45c51c190 100644 GIT binary patch delta 139 zcmV;60CfM_0ki>-F@J7JL_t(IjqR1O4uCKSL^;#{|79EuYK01^)QKCqG(3(Q0Cb5d zM>roMV&)t!aB#O2nxQu6s3a44|0Y<*ujq9%2Hu?@=>nDR8{Sn zh)5Q*{g6Xfe8J2lVOiKS?-e8A3Oy8#=nyqc{L-@2sW76-?kQqRIT|;n^O;|3+!%A8 zgtm>@#+xNzOS2PA1rD(fH6+d^pgnGAtg`z+l=L_t(IjqQ{%4gett1eeSG|I2H06p|xuqBMr7OoS0E7AV5} zK$1s@E8W8GfksWfQl!#Vx){EX8CDA0=Lw1zDo) bWcL;Wro9{{v7c-$00000NkvXXu0mjf5veiE delta 205 zcmV;;05boh0rmlqF@La0L_t(IjkT0P62u?~1cy}q|7G`rS+l}0Y$_ZBwk<&oc?^;> zl9LL?7(3t0%C$$eu|wKXfy3}quvYcJ9s3F#_Sh2uv6hYJ4^yofIJI30fW%rd{uwXH zIs=!sOCb)Ye=Z?dyAh8*H&IjYio7FbN8-UNJLEPqwmMbJ^N(jvLT4j%debgjf94o0sW!TCp)c+TBbcDuR|`00000NkvXX Hu0mjf^;KK- diff --git a/assets/graphics/tools/text_options/allign_center.png b/assets/graphics/tools/text_options/allign_center.png new file mode 100644 index 0000000000000000000000000000000000000000..c8cde6739ce6a9c97c9419eef4c5fb5f96ce7488 GIT binary patch literal 136 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|oIG6|Lo9mV zPB!FYP~c&*{Qp1wPLI{BGKG)F_{kQO1CTg0Gh$z>FVdQ&MBb@0DrS7l>h($ literal 0 HcmV?d00001 diff --git a/assets/graphics/tools/text_options/allign_fill.png.import b/assets/graphics/tools/text_options/allign_fill.png.import new file mode 100644 index 000000000..2abbfde0d --- /dev/null +++ b/assets/graphics/tools/text_options/allign_fill.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cb6op8ekb24jq" +path="res://.godot/imported/allign_fill.png-9791b429c0d8e9e328a9d1549acd4f29.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tools/text_options/allign_fill.png" +dest_files=["res://.godot/imported/allign_fill.png-9791b429c0d8e9e328a9d1549acd4f29.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/graphics/tools/text_options/allign_left.png b/assets/graphics/tools/text_options/allign_left.png new file mode 100644 index 0000000000000000000000000000000000000000..75631137e26e19758c53259c2e3e1c13e02821f0 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|96eneLo9mV zPB!FXP~c%M{`dcUp|Co8X1hba?wtusf`mOLzopr0Dzb(SpWb4 literal 0 HcmV?d00001 diff --git a/assets/graphics/tools/text_options/allign_left.png.import b/assets/graphics/tools/text_options/allign_left.png.import new file mode 100644 index 000000000..5541ba2ab --- /dev/null +++ b/assets/graphics/tools/text_options/allign_left.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dvwgfoajkwkbt" +path="res://.godot/imported/allign_left.png-7a3dee7ab825721445d69bbfe7ed3b6f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tools/text_options/allign_left.png" +dest_files=["res://.godot/imported/allign_left.png-7a3dee7ab825721445d69bbfe7ed3b6f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/graphics/tools/text_options/allign_right.png b/assets/graphics/tools/text_options/allign_right.png new file mode 100644 index 0000000000000000000000000000000000000000..917da16c90bade7990f015dd36ffde1f3b155b69 GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|>^)r^Lo9mV zPB!FXP!KpA_5c6#UAs7oWSP?JHZ4(~xS;_x`H#h_jvPn1)G0; gzdw|n>E6zG_>qW6HP614K%*EuUHx3vIVCg!00g8im;e9( literal 0 HcmV?d00001 diff --git a/assets/graphics/tools/text_options/allign_right.png.import b/assets/graphics/tools/text_options/allign_right.png.import new file mode 100644 index 000000000..f3e17366e --- /dev/null +++ b/assets/graphics/tools/text_options/allign_right.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://crgq05c1i6p67" +path="res://.godot/imported/allign_right.png-0f178439ce2624cdc338c3ebf507e30f.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tools/text_options/allign_right.png" +dest_files=["res://.godot/imported/allign_right.png-0f178439ce2624cdc338c3ebf507e30f.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/graphics/tools/text_options/antialiasing_grayscale.png b/assets/graphics/tools/text_options/antialiasing_grayscale.png new file mode 100644 index 0000000000000000000000000000000000000000..fd8a43c792e06fab842e1206992d322d0ee32cb1 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|8a-VcLo9ml zP6^~{FyL_(e_x;eccS8~Et+AhpSL=G7rK?3T(h=xdNe<~2S3xxNKPB4&3k!M)p$}4 zhiYxz_8`#ETjr|%sRNRH3@f$>zc~~$+56F|Mlav!iwor&7JC}6oas{_Iz#e8*bcR& x(qB$Y4r|q&FW~+9&H1YTi__W4^L%HUEqU-gbjt?4N}yvHJYD@<);T3K0RZrxN(=x1 literal 0 HcmV?d00001 diff --git a/assets/graphics/tools/text_options/antialiasing_grayscale.png.import b/assets/graphics/tools/text_options/antialiasing_grayscale.png.import new file mode 100644 index 000000000..4f41f5aaa --- /dev/null +++ b/assets/graphics/tools/text_options/antialiasing_grayscale.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dgkjy5utwxfs0" +path="res://.godot/imported/antialiasing_grayscale.png-f3fee5777d46da7008986e88858dfd30.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tools/text_options/antialiasing_grayscale.png" +dest_files=["res://.godot/imported/antialiasing_grayscale.png-f3fee5777d46da7008986e88858dfd30.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/graphics/tools/text_options/antialiasing_lcd.png b/assets/graphics/tools/text_options/antialiasing_lcd.png new file mode 100644 index 0000000000000000000000000000000000000000..6f11eaa582089818665862cf59cd001be7a92909 GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|`aE46Lo9ml zhIk4!7;t3&`9J?_l6A*Ihv?E{cQyzdQd(Nm``6`)yr7d5$BvC^3st_pG0^lr)N!V3 zMzZc?Rz`=vdVfo@_1fIEPR`h0b33A7OL@>uL+M)LL4z>3nO&a6iB4`vn2 z+avB+s!Usbr=Y0es=L$T7klPEj@UHu>JRN5`C$!)drp}|PoKWE=#bv8l`0g@yWxwLONO7ZFN5=u_nU=k`JN0%*UntmpQ?2iT zc$Dm{6+CWVnGJqbM2DxGdK0#<>pHKK$nP80p56UF14CRS*9gD4w&ljz)xWImmdKI;Vst05)w$V*mgE literal 0 HcmV?d00001 diff --git a/assets/graphics/tools/text_options/bold.png.import b/assets/graphics/tools/text_options/bold.png.import new file mode 100644 index 000000000..829ce3d42 --- /dev/null +++ b/assets/graphics/tools/text_options/bold.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dcs2c1qvc0a6c" +path="res://.godot/imported/bold.png-9f104d93235546acd30785edaefaf7ce.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/graphics/tools/text_options/bold.png" +dest_files=["res://.godot/imported/bold.png-9f104d93235546acd30785edaefaf7ce.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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/assets/graphics/tools/text_options/italic.png b/assets/graphics/tools/text_options/italic.png new file mode 100644 index 0000000000000000000000000000000000000000..1ff66ffa0169a8cf19201ea264d2845ed40568c1 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|l097yG1x$H*q25dfu ST;hP%F?hQAxvX void: @@ -55,6 +46,8 @@ func _ready() -> void: for f_name in font_names: font_option_button.add_item(f_name) Tools.color_changed.connect(_on_color_changed) + horizontal_alignment_group.pressed.connect(_on_horizontal_alignment_button_pressed) + anti_aliasing_group.pressed.connect(_on_antialiasing_button_pressed) super._ready() @@ -141,7 +134,9 @@ func text_to_pixels() -> void: var font_ascent := font.get_ascent(text_size) var pos := Vector2(0, font_ascent + text_edit.get_theme_constant(&"line_spacing")) pos += text_edit.position - font.draw_multiline_string(ci_rid, pos, text, horizontal_alignment, -1, text_size, -1, color) + font.draw_multiline_string( + ci_rid, pos, text, horizontal_alignment, text_edit.size.x, text_size, -1, color + ) RenderingServer.viewport_set_update_mode(vp, RenderingServer.VIEWPORT_UPDATE_ONCE) RenderingServer.force_draw(false) @@ -221,16 +216,28 @@ func _on_font_option_button_item_selected(index: int) -> void: save_config() -func _on_style_option_button_item_selected(index: TextStyle) -> void: - text_style = index +func _on_bold_button_toggled(toggled_on: bool) -> void: + if toggled_on: + text_style |= BOLD_FLAG + else: + text_style &= ~BOLD_FLAG -func _on_horizontal_alignment_option_button_item_selected(index: HorizontalAlignment) -> void: - horizontal_alignment = index +func _on_italic_button_toggled(toggled_on: bool) -> void: + if toggled_on: + text_style |= ITALIC_FLAG + else: + text_style &= ~ITALIC_FLAG -func _on_antialiasing_option_button_item_selected(index: TextServer.FontAntialiasing) -> void: - antialiasing = index +func _on_horizontal_alignment_button_pressed(button: BaseButton) -> void: + @warning_ignore("int_as_enum_without_cast") + horizontal_alignment = button.get_index() + + +func _on_antialiasing_button_pressed(button: BaseButton) -> void: + @warning_ignore("int_as_enum_without_cast") + antialiasing = button.get_index() func _exit_tree() -> void: diff --git a/src/Tools/UtilityTools/Text.tscn b/src/Tools/UtilityTools/Text.tscn index 33da4afee..c6e15c928 100644 --- a/src/Tools/UtilityTools/Text.tscn +++ b/src/Tools/UtilityTools/Text.tscn @@ -1,13 +1,27 @@ -[gd_scene load_steps=6 format=3 uid="uid://bdregpkflev7u"] +[gd_scene load_steps=17 format=3 uid="uid://bdregpkflev7u"] [ext_resource type="PackedScene" uid="uid://ctfgfelg0sho8" path="res://src/Tools/BaseTool.tscn" id="1_1q6ub"] [ext_resource type="Script" path="res://src/Tools/UtilityTools/Text.gd" id="2_ql5g6"] [ext_resource type="Texture2D" uid="uid://d267xalp3p7ru" path="res://assets/graphics/misc/check_plain.png" id="3_novww"] [ext_resource type="Script" path="res://src/UI/Nodes/Sliders/ValueSlider.gd" id="3_tidsq"] [ext_resource type="Texture2D" uid="uid://bnc78807k1xjv" path="res://assets/graphics/misc/close.png" id="4_nhcnn"] +[ext_resource type="Texture2D" uid="uid://dcs2c1qvc0a6c" path="res://assets/graphics/tools/text_options/bold.png" id="6_44cpf"] +[ext_resource type="Texture2D" uid="uid://b4paoyuodyjet" path="res://assets/graphics/tools/text_options/italic.png" id="7_vnai6"] +[ext_resource type="Texture2D" uid="uid://dvwgfoajkwkbt" path="res://assets/graphics/tools/text_options/allign_left.png" id="8_krqdj"] +[ext_resource type="Texture2D" uid="uid://bw8cnv4x3bv76" path="res://assets/graphics/tools/text_options/allign_center.png" id="9_icae5"] +[ext_resource type="Texture2D" uid="uid://crgq05c1i6p67" path="res://assets/graphics/tools/text_options/allign_right.png" id="10_s8jkt"] +[ext_resource type="Texture2D" uid="uid://cb6op8ekb24jq" path="res://assets/graphics/tools/text_options/allign_fill.png" id="11_wdbj6"] +[ext_resource type="Texture2D" uid="uid://bu0lr6u0f7iva" path="res://assets/graphics/tools/text_options/antialiasing_off.png" id="12_25fng"] +[ext_resource type="Texture2D" uid="uid://dgkjy5utwxfs0" path="res://assets/graphics/tools/text_options/antialiasing_grayscale.png" id="13_y175e"] +[ext_resource type="Texture2D" uid="uid://dux65bi78pmu8" path="res://assets/graphics/tools/text_options/antialiasing_lcd.png" id="14_s8hba"] + +[sub_resource type="ButtonGroup" id="ButtonGroup_ikyyu"] + +[sub_resource type="ButtonGroup" id="ButtonGroup_jplns"] [node name="ToolOptions" instance=ExtResource("1_1q6ub")] script = ExtResource("2_ql5g6") +metadata/_edit_vertical_guides_ = [-9.0] [node name="ConfirmButtons" type="HBoxContainer" parent="." index="2"] visible = false @@ -81,63 +95,173 @@ size_flags_horizontal = 3 mouse_default_cursor_shape = 2 fit_to_longest_item = false -[node name="StyleLabel" type="Label" parent="GridContainer" index="2"] +[node name="StyleButtonContainer" type="HBoxContainer" parent="." index="5"] layout_mode = 2 -size_flags_horizontal = 3 -text = "Style:" -[node name="StyleOptionButton" type="OptionButton" parent="GridContainer" index="3"] +[node name="BoldButton" type="Button" parent="StyleButtonContainer" index="0" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) layout_mode = 2 -size_flags_horizontal = 3 mouse_default_cursor_shape = 2 -selected = 0 -item_count = 4 -popup/item_0/text = "Regular" -popup/item_1/text = "Bold" -popup/item_1/id = 1 -popup/item_2/text = "Italic" -popup/item_2/id = 2 -popup/item_3/text = "Bold Italic" -popup/item_3/id = 3 +toggle_mode = true -[node name="HorizontalAlignmentLabel" type="Label" parent="GridContainer" index="4"] -visible = false -layout_mode = 2 -size_flags_horizontal = 3 -text = "Horizontal alignment:" +[node name="TextureRect" type="TextureRect" parent="StyleButtonContainer/BoldButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("6_44cpf") +stretch_mode = 3 -[node name="HorizontalAlignmentOptionButton" type="OptionButton" parent="GridContainer" index="5"] -visible = false +[node name="ItalicButton" type="Button" parent="StyleButtonContainer" index="1" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) layout_mode = 2 -selected = 0 -item_count = 4 -popup/item_0/text = "Left" -popup/item_1/text = "Center" -popup/item_1/id = 1 -popup/item_2/text = "Right" -popup/item_2/id = 2 -popup/item_3/text = "Fill" -popup/item_3/id = 3 +mouse_default_cursor_shape = 2 +toggle_mode = true -[node name="AntialiasingLabel" type="Label" parent="GridContainer" index="6"] -layout_mode = 2 -size_flags_horizontal = 3 -text = "Antialiasing:" +[node name="TextureRect" type="TextureRect" parent="StyleButtonContainer/ItalicButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("7_vnai6") +stretch_mode = 3 -[node name="AntialiasingOptionButton" type="OptionButton" parent="GridContainer" index="7"] +[node name="HorizontalAlignmentContainer" type="HBoxContainer" parent="." index="6"] layout_mode = 2 -selected = 0 -item_count = 3 -popup/item_0/text = "None" -popup/item_1/text = "Grayscale" -popup/item_1/id = 1 -popup/item_2/text = "LCD" -popup/item_2/id = 2 + +[node name="HorizontalAlignmentLeftButton" type="Button" parent="HorizontalAlignmentContainer" index="0" groups=["UIButtons"]] +unique_name_in_owner = true +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_ikyyu") + +[node name="TextureRect" type="TextureRect" parent="HorizontalAlignmentContainer/HorizontalAlignmentLeftButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("8_krqdj") +stretch_mode = 3 + +[node name="HorizontalAlignmentLeftButton2" type="Button" parent="HorizontalAlignmentContainer" index="1" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_ikyyu") + +[node name="TextureRect" type="TextureRect" parent="HorizontalAlignmentContainer/HorizontalAlignmentLeftButton2" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("9_icae5") +stretch_mode = 3 + +[node name="HorizontalAlignmentLeftButton3" type="Button" parent="HorizontalAlignmentContainer" index="2" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_ikyyu") + +[node name="TextureRect" type="TextureRect" parent="HorizontalAlignmentContainer/HorizontalAlignmentLeftButton3" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("10_s8jkt") +stretch_mode = 3 + +[node name="HorizontalAlignmentLeftButton4" type="Button" parent="HorizontalAlignmentContainer" index="3" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_ikyyu") + +[node name="TextureRect" type="TextureRect" parent="HorizontalAlignmentContainer/HorizontalAlignmentLeftButton4" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("11_wdbj6") +stretch_mode = 3 + +[node name="AntiAliasingButtonContainer" type="HBoxContainer" parent="." index="7"] +layout_mode = 2 + +[node name="AAOffButton" type="Button" parent="AntiAliasingButtonContainer" index="0" groups=["UIButtons"]] +unique_name_in_owner = true +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_pressed = true +button_group = SubResource("ButtonGroup_jplns") + +[node name="TextureRect" type="TextureRect" parent="AntiAliasingButtonContainer/AAOffButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("12_25fng") +stretch_mode = 3 + +[node name="AAGrayscaleButton" type="Button" parent="AntiAliasingButtonContainer" index="1" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_jplns") + +[node name="TextureRect" type="TextureRect" parent="AntiAliasingButtonContainer/AAGrayscaleButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("13_y175e") +stretch_mode = 3 + +[node name="AALCDButton" type="Button" parent="AntiAliasingButtonContainer" index="2" groups=["UIButtons"]] +custom_minimum_size = Vector2(24, 24) +layout_mode = 2 +mouse_default_cursor_shape = 2 +toggle_mode = true +button_group = SubResource("ButtonGroup_jplns") + +[node name="TextureRect" type="TextureRect" parent="AntiAliasingButtonContainer/AALCDButton" index="0"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +texture = ExtResource("14_s8hba") +stretch_mode = 3 [connection signal="pressed" from="ConfirmButtons/ConfirmButton" to="." method="_on_confirm_button_pressed"] [connection signal="pressed" from="ConfirmButtons/CancelButton" to="." method="_on_cancel_button_pressed"] [connection signal="value_changed" from="TextSizeSlider" to="." method="_on_text_size_slider_value_changed"] [connection signal="item_selected" from="GridContainer/FontOptionButton" to="." method="_on_font_option_button_item_selected"] -[connection signal="item_selected" from="GridContainer/StyleOptionButton" to="." method="_on_style_option_button_item_selected"] -[connection signal="item_selected" from="GridContainer/HorizontalAlignmentOptionButton" to="." method="_on_horizontal_alignment_option_button_item_selected"] -[connection signal="item_selected" from="GridContainer/AntialiasingOptionButton" to="." method="_on_antialiasing_option_button_item_selected"] +[connection signal="toggled" from="StyleButtonContainer/BoldButton" to="." method="_on_bold_button_toggled"] +[connection signal="toggled" from="StyleButtonContainer/ItalicButton" to="." method="_on_italic_button_toggled"]