1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

CreateNewImage now remembers the last created canvas size - Closes #178

The default image width, height and fill color are being used only when the program first launches. After that, if the user creates an image with changed settings, these settings are being kept.
This commit is contained in:
OverloadedOrama 2020-07-15 03:25:59 +03:00
parent c6ccbd4868
commit ea717cfea7
4 changed files with 5 additions and 13 deletions

View file

@ -37,6 +37,7 @@ Darshan Phaldesai (luiq54), Igor Santarek (jegor377), rob-a-bolton, Kinwailo
- Pixelorama now remembers the selected colors, tools and their options when it's closed and re-opened. ([#281](https://github.com/Orama-Interactive/Pixelorama/pull/281))
- Drawing brushes with mirror also mirrors the images of the brushes themselves. ([#281](https://github.com/Orama-Interactive/Pixelorama/pull/281))
- When making a new palette or importing one and its name already exists, Pixelorama will add a number to its name. For example, "Palette_Name" would become "Palette_Name (2)", "Palette_Name (3)", etc.
- The "create new image" dialog now remembers the last created canvas size. The default image settings are being used only when Pixelorama first launches. ([#178](https://github.com/Orama-Interactive/Pixelorama/issues/178))
- Language and theme checkboxes are now radio buttons.
- The Blue theme has more similar margins and seperations with the rest of the themes.

View file

@ -53,7 +53,11 @@ var TStrings ={
func _ready() -> void:
width_value.value = Global.default_image_width
height_value.value = Global.default_image_height
fill_color_node.color = Global.default_fill_color
fill_color_node.get_picker().presets_visible = false
ratio_box.connect("pressed", self, "_on_RatioCheckBox_toggled", [ratio_box.pressed])
templates_options.connect("item_selected", self, "_on_TemplatesOptions_item_selected")
@ -84,17 +88,6 @@ func _on_CreateNewImage_confirmed() -> void:
Global.canvas.camera_zoom()
func _on_CreateNewImage_about_to_show() -> void:
width_value.value = Global.default_image_width
height_value.value = Global.default_image_height
fill_color_node.color = Global.default_fill_color
templates_options.selected = Templates.TDefault
ratio_box.pressed = false
for spin_box in [width_value, height_value]:
if spin_box.is_connected("value_changed", self, "_on_SizeValue_value_changed"):
spin_box.disconnect("value_changed", self, "_on_SizeValue_value_changed")
var aspect_ratio: float
func _on_RatioCheckBox_toggled(_button_pressed: bool) -> void:

View file

@ -119,5 +119,4 @@ margin_bottom = 128.0
rect_min_size = Vector2( 64, 20 )
mouse_default_cursor_shape = 2
color = Color( 0, 0, 0, 0 )
[connection signal="about_to_show" from="." to="." method="_on_CreateNewImage_about_to_show"]
[connection signal="confirmed" from="." to="." method="_on_CreateNewImage_confirmed"]

View file

@ -196,7 +196,6 @@ func add_brush() -> void:
dir.list_dir_begin()
var curr_file := dir.get_next()
while curr_file != "":
print(curr_file)
if curr_file.begins_with("%") and brush_name in curr_file:
random_brushes.append(curr_file)
curr_file = dir.get_next()