diff --git a/src/Tools/Text.gd b/src/Tools/Text.gd index 41c67fe..3e17fcf 100644 --- a/src/Tools/Text.gd +++ b/src/Tools/Text.gd @@ -94,7 +94,7 @@ func text_to_pixels() -> void: VisualServer.free_rid(canvas) VisualServer.free_rid(ci_rid) viewport_texture.convert(Image.FORMAT_RGBA8) - print(viewport_texture.get_size()) + if !viewport_texture.is_empty(): Global.canvas.handle_undo("Draw") current_cel.unlock() @@ -159,3 +159,11 @@ func textedit_get_max_line(_texte : TextEdit) -> int: max_line = i return max_line + + +func _on_OutlineColorPickerButton_color_changed(color : Color) -> void: + font.outline_color = color + + +func _on_OutlineSpinBox_value_changed(value : int) -> void: + font.outline_size = value diff --git a/src/Tools/Text.tscn b/src/Tools/Text.tscn index 6ed8c31..fefcdfb 100644 --- a/src/Tools/Text.tscn +++ b/src/Tools/Text.tscn @@ -69,8 +69,37 @@ access = 2 filters = PoolStringArray( "*.ttf", "*.otf" ) current_dir = "/Users/Overloaded/Documents/#Orama Stuff/Pixelorama/#Main Repos/Pixelorama" current_path = "/Users/Overloaded/Documents/#Orama Stuff/Pixelorama/#Main Repos/Pixelorama/" + +[node name="OutlineLabel" type="Label" parent="." index="10"] +margin_top = 130.0 +margin_right = 116.0 +margin_bottom = 144.0 +text = "Outline:" +align = 1 + +[node name="OutlineContainer" type="HBoxContainer" parent="." index="11"] +margin_top = 148.0 +margin_right = 116.0 +margin_bottom = 172.0 +alignment = 1 + +[node name="OutlineColorPickerButton" type="ColorPickerButton" parent="OutlineContainer" index="0"] +margin_left = 7.0 +margin_right = 31.0 +margin_bottom = 24.0 +rect_min_size = Vector2( 24, 0 ) +mouse_default_cursor_shape = 2 +color = Color( 1, 1, 1, 1 ) + +[node name="OutlineSpinBox" type="SpinBox" parent="OutlineContainer" index="1"] +margin_left = 35.0 +margin_right = 109.0 +margin_bottom = 24.0 +mouse_default_cursor_shape = 2 [connection signal="item_selected" from="FontOptionButton" to="." method="_on_FontOptionButton_item_selected"] [connection signal="value_changed" from="TextSizeSpinBox" to="." method="_on_TextSizeSpinBox_value_changed"] [connection signal="pressed" from="LoadFontButton" to="." method="_on_LoadFontButton_pressed"] [connection signal="files_selected" from="FontFileDialog" to="." method="_on_FontFileDialog_files_selected"] [connection signal="popup_hide" from="FontFileDialog" to="." method="_on_FontFileDialog_popup_hide"] +[connection signal="color_changed" from="OutlineContainer/OutlineColorPickerButton" to="." method="_on_OutlineColorPickerButton_color_changed"] +[connection signal="value_changed" from="OutlineContainer/OutlineSpinBox" to="." method="_on_OutlineSpinBox_value_changed"]