mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-19 01:29:49 +00:00
Image preferences
This commit is contained in:
parent
a4886a2ee7
commit
cd3814736d
|
@ -37,12 +37,13 @@ size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/ScrollContainer"]
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 282.0
|
margin_bottom = 554.0
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="Languages" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
[node name="Languages" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||||
|
editor/display_folded = true
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 282.0
|
margin_bottom = 310.0
|
||||||
|
|
||||||
[node name="Language Options" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Language Options" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
|
@ -88,46 +89,46 @@ mouse_default_cursor_shape = 2
|
||||||
text = "Français [fr]"
|
text = "Français [fr]"
|
||||||
|
|
||||||
[node name="Italian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Italian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 144.0
|
|
||||||
margin_right = 205.0
|
|
||||||
margin_bottom = 168.0
|
|
||||||
mouse_default_cursor_shape = 2
|
|
||||||
text = "Italian [it]"
|
|
||||||
|
|
||||||
[node name="Polish" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
|
||||||
margin_top = 172.0
|
margin_top = 172.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 196.0
|
margin_bottom = 196.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
text = "Polski [pl]"
|
text = "Italian [it]"
|
||||||
|
|
||||||
[node name="Brazilian Portuguese" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Polish" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 200.0
|
margin_top = 200.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 224.0
|
margin_bottom = 224.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
text = "Português Brasileiro [pt_BR]"
|
text = "Polski [pl]"
|
||||||
|
|
||||||
[node name="Russian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Brazilian Portuguese" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 228.0
|
margin_top = 228.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 252.0
|
margin_bottom = 252.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
|
text = "Português Brasileiro [pt_BR]"
|
||||||
|
|
||||||
|
[node name="Russian" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
|
margin_top = 256.0
|
||||||
|
margin_right = 205.0
|
||||||
|
margin_bottom = 280.0
|
||||||
|
mouse_default_cursor_shape = 2
|
||||||
text = "Русский [ru]"
|
text = "Русский [ru]"
|
||||||
|
|
||||||
[node name="Traditional Chinese" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
[node name="Traditional Chinese" type="CheckBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Languages"]
|
||||||
margin_top = 256.0
|
margin_top = 284.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 282.0
|
margin_bottom = 310.0
|
||||||
mouse_default_cursor_shape = 2
|
mouse_default_cursor_shape = 2
|
||||||
custom_fonts/font = ExtResource( 3 )
|
custom_fonts/font = ExtResource( 3 )
|
||||||
text = "繁體中文 [zh_TW]"
|
text = "繁體中文 [zh_TW]"
|
||||||
|
|
||||||
[node name="Themes" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
[node name="Themes" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||||
visible = false
|
editor/display_folded = true
|
||||||
margin_top = 286.0
|
margin_top = 314.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 454.0
|
margin_bottom = 482.0
|
||||||
|
|
||||||
[node name="Theme Options" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
[node name="Theme Options" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Themes"]
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
|
@ -171,21 +172,20 @@ mouse_default_cursor_shape = 2
|
||||||
text = "Light"
|
text = "Light"
|
||||||
|
|
||||||
[node name="Grid&Guides" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
[node name="Grid&Guides" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||||
visible = false
|
margin_top = 486.0
|
||||||
margin_top = 458.0
|
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 576.0
|
margin_bottom = 618.0
|
||||||
|
|
||||||
[node name="GridOptionsLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"]
|
[node name="GridOptionsLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"]
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 14.0
|
margin_bottom = 28.0
|
||||||
rect_min_size = Vector2( 0, 28 )
|
rect_min_size = Vector2( 0, 28 )
|
||||||
text = "Grid options"
|
text = "Grid options"
|
||||||
|
|
||||||
[node name="GridOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"]
|
[node name="GridOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"]
|
||||||
margin_top = 18.0
|
margin_top = 32.0
|
||||||
margin_right = 205.0
|
margin_right = 205.0
|
||||||
margin_bottom = 118.0
|
margin_bottom = 132.0
|
||||||
custom_constants/vseparation = 4
|
custom_constants/vseparation = 4
|
||||||
custom_constants/hseparation = 4
|
custom_constants/hseparation = 4
|
||||||
columns = 2
|
columns = 2
|
||||||
|
@ -247,6 +247,69 @@ margin_right = 156.0
|
||||||
margin_bottom = 100.0
|
margin_bottom = 100.0
|
||||||
rect_min_size = Vector2( 64, 20 )
|
rect_min_size = Vector2( 64, 20 )
|
||||||
color = Color( 0.63, 0.13, 0.94, 1 )
|
color = Color( 0.63, 0.13, 0.94, 1 )
|
||||||
|
|
||||||
|
[node name="Image" type="VBoxContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer"]
|
||||||
|
margin_top = 486.0
|
||||||
|
margin_right = 205.0
|
||||||
|
margin_bottom = 618.0
|
||||||
|
|
||||||
|
[node name="ImageOptionsLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image"]
|
||||||
|
margin_right = 205.0
|
||||||
|
margin_bottom = 28.0
|
||||||
|
rect_min_size = Vector2( 0, 28 )
|
||||||
|
text = "Image options"
|
||||||
|
|
||||||
|
[node name="ImageOptions" type="GridContainer" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image"]
|
||||||
|
margin_top = 32.0
|
||||||
|
margin_right = 205.0
|
||||||
|
margin_bottom = 132.0
|
||||||
|
custom_constants/vseparation = 4
|
||||||
|
custom_constants/hseparation = 4
|
||||||
|
columns = 2
|
||||||
|
|
||||||
|
[node name="DefaultWidthLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 92.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Default width:"
|
||||||
|
|
||||||
|
[node name="ImageDefaultWidth" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_left = 82.0
|
||||||
|
margin_right = 156.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
min_value = 1.0
|
||||||
|
max_value = 16384.0
|
||||||
|
value = 32.0
|
||||||
|
suffix = "px"
|
||||||
|
|
||||||
|
[node name="DefaultHeightLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 96.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Default height:"
|
||||||
|
|
||||||
|
[node name="ImageDefaultHeight" type="SpinBox" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_left = 82.0
|
||||||
|
margin_right = 156.0
|
||||||
|
margin_bottom = 24.0
|
||||||
|
min_value = 1.0
|
||||||
|
max_value = 16384.0
|
||||||
|
value = 32.0
|
||||||
|
suffix = "px"
|
||||||
|
|
||||||
|
[node name="DefaultBackgroundLabel" type="Label" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_top = 5.0
|
||||||
|
margin_right = 96.0
|
||||||
|
margin_bottom = 19.0
|
||||||
|
text = "Default background:"
|
||||||
|
|
||||||
|
[node name="DefaultBackground" type="ColorPickerButton" parent="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions"]
|
||||||
|
margin_left = 82.0
|
||||||
|
margin_top = 56.0
|
||||||
|
margin_right = 156.0
|
||||||
|
margin_bottom = 76.0
|
||||||
|
rect_min_size = Vector2( 64, 20 )
|
||||||
|
color = Color( 0, 0, 0, 0 )
|
||||||
[connection signal="about_to_show" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
[connection signal="about_to_show" from="." to="." method="_on_PreferencesDialog_about_to_show"]
|
||||||
[connection signal="popup_hide" from="." to="." method="_on_PreferencesDialog_popup_hide"]
|
[connection signal="popup_hide" from="." to="." method="_on_PreferencesDialog_popup_hide"]
|
||||||
[connection signal="item_selected" from="HSplitContainer/Tree" to="." method="_on_Tree_item_selected"]
|
[connection signal="item_selected" from="HSplitContainer/Tree" to="." method="_on_Tree_item_selected"]
|
||||||
|
@ -254,3 +317,6 @@ color = Color( 0.63, 0.13, 0.94, 1 )
|
||||||
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridHeightValue" to="." method="_on_GridHeightValue_value_changed"]
|
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridHeightValue" to="." method="_on_GridHeightValue_value_changed"]
|
||||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridColor" to="." method="_on_GridColor_color_changed"]
|
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GridColor" to="." method="_on_GridColor_color_changed"]
|
||||||
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GuideColor" to="." method="_on_GuideColor_color_changed"]
|
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides/GridOptions/GuideColor" to="." method="_on_GuideColor_color_changed"]
|
||||||
|
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultWidth" to="." method="_on_ImageDefaultWidth_value_changed"]
|
||||||
|
[connection signal="value_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/ImageDefaultHeight" to="." method="_on_ImageDefaultHeight_value_changed"]
|
||||||
|
[connection signal="color_changed" from="HSplitContainer/ScrollContainer/VBoxContainer/Image/ImageOptions/DefaultBackground" to="." method="_on_DefaultBackground_color_changed"]
|
||||||
|
|
|
@ -5,6 +5,7 @@ onready var right_side : VBoxContainer = $HSplitContainer/ScrollContainer/VBoxCo
|
||||||
onready var languages = $HSplitContainer/ScrollContainer/VBoxContainer/Languages
|
onready var languages = $HSplitContainer/ScrollContainer/VBoxContainer/Languages
|
||||||
onready var themes = $HSplitContainer/ScrollContainer/VBoxContainer/Themes
|
onready var themes = $HSplitContainer/ScrollContainer/VBoxContainer/Themes
|
||||||
onready var grid_guides = $"HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"
|
onready var grid_guides = $"HSplitContainer/ScrollContainer/VBoxContainer/Grid&Guides"
|
||||||
|
onready var image = $HSplitContainer/ScrollContainer/VBoxContainer/Image
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
for child in languages.get_children():
|
for child in languages.get_children():
|
||||||
|
@ -28,6 +29,7 @@ func _on_PreferencesDialog_about_to_show() -> void:
|
||||||
var language_button := tree.create_item(root)
|
var language_button := tree.create_item(root)
|
||||||
var theme_button := tree.create_item(root)
|
var theme_button := tree.create_item(root)
|
||||||
var grid_button := tree.create_item(root)
|
var grid_button := tree.create_item(root)
|
||||||
|
var image_button := tree.create_item(root)
|
||||||
|
|
||||||
language_button.set_text(0, " " + tr("Language"))
|
language_button.set_text(0, " " + tr("Language"))
|
||||||
# We use metadata to avoid being affected by translations
|
# We use metadata to avoid being affected by translations
|
||||||
|
@ -37,6 +39,8 @@ func _on_PreferencesDialog_about_to_show() -> void:
|
||||||
theme_button.set_metadata(0, "Themes")
|
theme_button.set_metadata(0, "Themes")
|
||||||
grid_button.set_text(0, " " + tr("Guides & Grid"))
|
grid_button.set_text(0, " " + tr("Guides & Grid"))
|
||||||
grid_button.set_metadata(0, "Guides & Grid")
|
grid_button.set_metadata(0, "Guides & Grid")
|
||||||
|
image_button.set_text(0, " " + tr("Image"))
|
||||||
|
image_button.set_metadata(0, "Image")
|
||||||
|
|
||||||
|
|
||||||
func _on_PreferencesDialog_popup_hide() -> void:
|
func _on_PreferencesDialog_popup_hide() -> void:
|
||||||
|
@ -52,6 +56,8 @@ func _on_Tree_item_selected() -> void:
|
||||||
themes.visible = true
|
themes.visible = true
|
||||||
elif "Guides & Grid" in selected:
|
elif "Guides & Grid" in selected:
|
||||||
grid_guides.visible = true
|
grid_guides.visible = true
|
||||||
|
elif "Image" in selected:
|
||||||
|
image.visible = true
|
||||||
|
|
||||||
func _on_Language_pressed(button : Button) -> void:
|
func _on_Language_pressed(button : Button) -> void:
|
||||||
var index := 0
|
var index := 0
|
||||||
|
@ -188,3 +194,12 @@ func _on_GuideColor_color_changed(color : Color) -> void:
|
||||||
for guide in canvas.get_children():
|
for guide in canvas.get_children():
|
||||||
if guide is Guide:
|
if guide is Guide:
|
||||||
guide.default_color = color
|
guide.default_color = color
|
||||||
|
|
||||||
|
func _on_ImageDefaultWidth_value_changed(value: float) -> void:
|
||||||
|
Global.default_image_width = value
|
||||||
|
|
||||||
|
func _on_ImageDefaultHeight_value_changed(value: float) -> void:
|
||||||
|
Global.default_image_height = value
|
||||||
|
|
||||||
|
func _on_DefaultBackground_color_changed(color: Color) -> void:
|
||||||
|
Global.default_background = color
|
||||||
|
|
|
@ -24,6 +24,12 @@ var image_clipboard : Image
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
var theme_type := "Dark"
|
var theme_type := "Dark"
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
|
var default_image_width := 32
|
||||||
|
# warning-ignore:unused_class_variable
|
||||||
|
var default_image_height := 32
|
||||||
|
# warning-ignore:unused_class_variable
|
||||||
|
var default_background := Color(0, 0, 0, 0)
|
||||||
|
# warning-ignore:unused_class_variable
|
||||||
var grid_width := 1
|
var grid_width := 1
|
||||||
# warning-ignore:unused_class_variable
|
# warning-ignore:unused_class_variable
|
||||||
var grid_height := 1
|
var grid_height := 1
|
||||||
|
|
|
@ -45,12 +45,12 @@ _global_script_class_icons={
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Pixelorama"
|
config/name="Pixelorama"
|
||||||
config/description="A free & open-source 2D sprite editor"
|
|
||||||
run/main_scene="res://Main.tscn"
|
run/main_scene="res://Main.tscn"
|
||||||
run/low_processor_mode=true
|
run/low_processor_mode=true
|
||||||
boot_splash/image="res://splash.png"
|
boot_splash/image="res://splash.png"
|
||||||
boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
|
boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 )
|
||||||
config/icon="res://icon.png"
|
config/icon="res://icon.png"
|
||||||
|
config/description="A free & open-source 2D sprite editor"
|
||||||
config/Version="v0.6.1"
|
config/Version="v0.6.1"
|
||||||
|
|
||||||
[autoload]
|
[autoload]
|
||||||
|
|
Loading…
Reference in a new issue