From db29c1af67f150e9dfb0f7fb807a3829777baa44 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 7 Jan 2020 17:20:25 +0200 Subject: [PATCH 01/10] Fixed crash that occured when trying to delete contents of a selection that were outside the canvas' borders --- Scripts/Canvas.gd | 4 ++-- Scripts/SelectionRectangle.gd | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index d622f6a1b..767e46f6d 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -95,7 +95,7 @@ func _input(event : InputEvent) -> void: update() sprite_changed_this_frame = false - current_pixel = get_local_mouse_position() - location + current_pixel = get_local_mouse_position() + location var mouse_pos := current_pixel var mouse_pos_floored := mouse_pos.floor() var mouse_pos_ceiled := mouse_pos.ceil() @@ -449,7 +449,7 @@ func _draw() -> void: draw_line(Vector2(location.x, y), Vector2(size.x, y), Global.grid_color, true) #Draw rectangle to indicate the pixel currently being hovered on - var mouse_pos := get_local_mouse_position() + location + var mouse_pos := current_pixel if point_in_rectangle(mouse_pos, location, location + size): mouse_pos = mouse_pos.floor() if Global.left_square_indicator_visible && Global.can_draw: diff --git a/Scripts/SelectionRectangle.gd b/Scripts/SelectionRectangle.gd index ef7a54057..63dff97cf 100644 --- a/Scripts/SelectionRectangle.gd +++ b/Scripts/SelectionRectangle.gd @@ -133,7 +133,8 @@ func _process(delta : float) -> void: Global.canvas.handle_undo("Draw") for xx in range(start_pos.x, end_pos.x): for yy in range(start_pos.y, end_pos.y): - layer.set_pixel(xx, yy, Color(0, 0, 0, 0)) + if point_in_rectangle(Vector2(xx, yy), Global.canvas.location - Vector2.ONE, Global.canvas.location + Global.canvas.size): + layer.set_pixel(xx, yy, Color(0, 0, 0, 0)) Global.canvas.handle_redo("Draw") From 7ee6e4715df7792a46619080e4b667dfeadf1346 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Tue, 7 Jan 2020 22:11:16 +0200 Subject: [PATCH 02/10] Update el.po --- Translations/el.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Translations/el.po b/Translations/el.po index fb58c6826..d3f963db9 100644 --- a/Translations/el.po +++ b/Translations/el.po @@ -228,7 +228,7 @@ msgid "Light" msgstr "Φωτεινό" msgid "Invert colors" -msgstr "Αναστροφή χρωμάτων" +msgstr "Αντιστροφή χρωμάτων" msgid "Desaturation" msgstr "Αποκορεσμός" From 99a45275ffccc82c775068ecba4359b34b4e2602 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 00:52:25 +0200 Subject: [PATCH 03/10] Closes #112 --- Scripts/Import.gd | 11 ++++++----- Scripts/Palette/PaletteContainer.gd | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Scripts/Import.gd b/Scripts/Import.gd index b2893b78e..e345d8194 100644 --- a/Scripts/Import.gd +++ b/Scripts/Import.gd @@ -72,12 +72,13 @@ func import_gpl(path : String) -> Palette: comments += line.trim_prefix('#') + '\n' pass elif line_number > 0 && line.length() >= 12: - var red : float = line.substr(0, 4).to_float() / 255.0 - var green : float = line.substr(4, 4).to_float() / 255.0 - var blue : float = line.substr(8, 4).to_float() / 255.0 - var name : String = line.substr(12, line.length() - 12) + line = line.replace("\t", " ") + var color_data : PoolStringArray = line.split(" ", false, 4) + var red : float = color_data[0].to_float() / 255.0 + var green : float = color_data[1].to_float() / 255.0 + var blue : float = color_data[2].to_float() / 255.0 var color = Color(red, green, blue) - result.add_color(color, name) + result.add_color(color, color_data[3]) line_number += 1 if result: diff --git a/Scripts/Palette/PaletteContainer.gd b/Scripts/Palette/PaletteContainer.gd index a4207089b..bb3e37f08 100644 --- a/Scripts/Palette/PaletteContainer.gd +++ b/Scripts/Palette/PaletteContainer.gd @@ -54,7 +54,7 @@ func on_palette_import_file_selected(path : String) -> void: on_palette_select(palette.name) save_palette(palette.name, palette.name + ".json") else: - Global.error_dialog.set_text("Palette named '" + palette.name + "' already exists"); + Global.error_dialog.set_text("Palette named '" + palette.name + "' already exists") Global.error_dialog.popup_centered() else: Global.error_dialog.set_text("Invalid Palette file!") From d52e1937f5d720e13fc7f33a8c1d5d42e068c094 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 01:02:38 +0200 Subject: [PATCH 04/10] Made Palette .json files more readable --- Palettes/Complementary.json | 108 ++++++++++++++++++++++- Palettes/Default.json | 136 ++++++++++++++++++++++++++++- Palettes/Monochromatic.json | 168 +++++++++++++++++++++++++++++++++++- Palettes/Shades.json | 148 ++++++++++++++++++++++++++++++- Palettes/Triad.json | 108 ++++++++++++++++++++++- Scripts/Palette/Palette.gd | 2 +- 6 files changed, 664 insertions(+), 6 deletions(-) diff --git a/Palettes/Complementary.json b/Palettes/Complementary.json index 56b54ecfe..e578d74ff 100644 --- a/Palettes/Complementary.json +++ b/Palettes/Complementary.json @@ -1 +1,107 @@ -{"name":"Complementary","colors":[{"data":"ffb35102","name":"no name"},{"data":"ffff9945","name":"no name"},{"data":"ffff7100","name":"no name"},{"data":"ff0099b3","name":"no name"},{"data":"ff00daff","name":"no name"},{"data":"ffb30202","name":"no name"},{"data":"ffff4545","name":"no name"},{"data":"ffff0201","name":"no name"},{"data":"ff00b333","name":"no name"},{"data":"ff00ff48","name":"no name"},{"data":"ff8002b3","name":"no name"},{"data":"ffca45ff","name":"no name"},{"data":"ffb400fe","name":"no name"},{"data":"ff7fb300","name":"no name"},{"data":"ffb5ff00","name":"no name"},{"data":"ff0211b3","name":"no name"},{"data":"ff4554ff","name":"no name"},{"data":"ff0116ff","name":"no name"},{"data":"ffb38c00","name":"no name"},{"data":"ffffc900","name":"no name"},{"data":"ff029eb3","name":"no name"},{"data":"ff7af0ff","name":"no name"},{"data":"ff00e1ff","name":"no name"},{"data":"ffb34d00","name":"no name"},{"data":"ffff6f00","name":"no name"}],"comments":"","editable":true} \ No newline at end of file +{ + "name": "Complementary", + "colors": [ + { + "data": "ffb35102", + "name": "no name" + }, + { + "data": "ffff9945", + "name": "no name" + }, + { + "data": "ffff7100", + "name": "no name" + }, + { + "data": "ff0099b3", + "name": "no name" + }, + { + "data": "ff00daff", + "name": "no name" + }, + { + "data": "ffb30202", + "name": "no name" + }, + { + "data": "ffff4545", + "name": "no name" + }, + { + "data": "ffff0201", + "name": "no name" + }, + { + "data": "ff00b333", + "name": "no name" + }, + { + "data": "ff00ff48", + "name": "no name" + }, + { + "data": "ff8002b3", + "name": "no name" + }, + { + "data": "ffca45ff", + "name": "no name" + }, + { + "data": "ffb400fe", + "name": "no name" + }, + { + "data": "ff7fb300", + "name": "no name" + }, + { + "data": "ffb5ff00", + "name": "no name" + }, + { + "data": "ff0211b3", + "name": "no name" + }, + { + "data": "ff4554ff", + "name": "no name" + }, + { + "data": "ff0116ff", + "name": "no name" + }, + { + "data": "ffb38c00", + "name": "no name" + }, + { + "data": "ffffc900", + "name": "no name" + }, + { + "data": "ff029eb3", + "name": "no name" + }, + { + "data": "ff7af0ff", + "name": "no name" + }, + { + "data": "ff00e1ff", + "name": "no name" + }, + { + "data": "ffb34d00", + "name": "no name" + }, + { + "data": "ffff6f00", + "name": "no name" + } + ], + "comments": "By Erevos", + "editable": true +} \ No newline at end of file diff --git a/Palettes/Default.json b/Palettes/Default.json index 528cac021..269825240 100644 --- a/Palettes/Default.json +++ b/Palettes/Default.json @@ -1 +1,135 @@ -{"name":"Default","colors":[{"data":"ff000000","name":"no name"},{"data":"ff222034","name":"no name"},{"data":"ff45283c","name":"no name"},{"data":"ff663931","name":"no name"},{"data":"ff8f563b","name":"no name"},{"data":"ffdf7126","name":"no name"},{"data":"ffd9a066","name":"no name"},{"data":"ffeec39a","name":"no name"},{"data":"fffbf236","name":"no name"},{"data":"ff99e550","name":"no name"},{"data":"ff6abe30","name":"no name"},{"data":"ff37946e","name":"no name"},{"data":"ff4b692f","name":"no name"},{"data":"ff524b24","name":"no name"},{"data":"ff323c39","name":"no name"},{"data":"ff3f3f74","name":"no name"},{"data":"ff306082","name":"no name"},{"data":"ff5b6ee1","name":"no name"},{"data":"ff639bff","name":"no name"},{"data":"ff5fcde4","name":"no name"},{"data":"ffcbdbfc","name":"no name"},{"data":"ffffffff","name":"no name"},{"data":"ff9badb7","name":"no name"},{"data":"ff847e87","name":"no name"},{"data":"ff696a6a","name":"no name"},{"data":"ff595652","name":"no name"},{"data":"ff76428a","name":"no name"},{"data":"ffac3232","name":"no name"},{"data":"ffd95763","name":"no name"},{"data":"ffd77bba","name":"no name"},{"data":"ff8f974a","name":"no name"},{"data":"ff8a6f30","name":"no name"}],"comments":"","editable":true} \ No newline at end of file +{ + "name": "Default", + "colors": [ + { + "data": "ff000000", + "name": "no name" + }, + { + "data": "ff222034", + "name": "no name" + }, + { + "data": "ff45283c", + "name": "no name" + }, + { + "data": "ff663931", + "name": "no name" + }, + { + "data": "ff8f563b", + "name": "no name" + }, + { + "data": "ffdf7126", + "name": "no name" + }, + { + "data": "ffd9a066", + "name": "no name" + }, + { + "data": "ffeec39a", + "name": "no name" + }, + { + "data": "fffbf236", + "name": "no name" + }, + { + "data": "ff99e550", + "name": "no name" + }, + { + "data": "ff6abe30", + "name": "no name" + }, + { + "data": "ff37946e", + "name": "no name" + }, + { + "data": "ff4b692f", + "name": "no name" + }, + { + "data": "ff524b24", + "name": "no name" + }, + { + "data": "ff323c39", + "name": "no name" + }, + { + "data": "ff3f3f74", + "name": "no name" + }, + { + "data": "ff306082", + "name": "no name" + }, + { + "data": "ff5b6ee1", + "name": "no name" + }, + { + "data": "ff639bff", + "name": "no name" + }, + { + "data": "ff5fcde4", + "name": "no name" + }, + { + "data": "ffcbdbfc", + "name": "no name" + }, + { + "data": "ffffffff", + "name": "no name" + }, + { + "data": "ff9badb7", + "name": "no name" + }, + { + "data": "ff847e87", + "name": "no name" + }, + { + "data": "ff696a6a", + "name": "no name" + }, + { + "data": "ff595652", + "name": "no name" + }, + { + "data": "ff76428a", + "name": "no name" + }, + { + "data": "ffac3232", + "name": "no name" + }, + { + "data": "ffd95763", + "name": "no name" + }, + { + "data": "ffd77bba", + "name": "no name" + }, + { + "data": "ff8f974a", + "name": "no name" + }, + { + "data": "ff8a6f30", + "name": "no name" + } + ], + "comments": "", + "editable": true +} \ No newline at end of file diff --git a/Palettes/Monochromatic.json b/Palettes/Monochromatic.json index 15711a0aa..c22e4f2e8 100644 --- a/Palettes/Monochromatic.json +++ b/Palettes/Monochromatic.json @@ -1 +1,167 @@ -{"name":"Monochromatic","colors":[{"data":"ff323880","name":"no name"},{"data":"ffb0b7ff","name":"no name"},{"data":"ff636fff","name":"no name"},{"data":"ff4d5182","name":"no name"},{"data":"ff505acc","name":"no name"},{"data":"ff347685","name":"no name"},{"data":"ffb0f1ff","name":"no name"},{"data":"ff63e2ff","name":"no name"},{"data":"ff487985","name":"no name"},{"data":"ff50b5cc","name":"no name"},{"data":"ff40852c","name":"no name"},{"data":"ffadff94","name":"no name"},{"data":"ff7cff54","name":"no name"},{"data":"ff228a03","name":"no name"},{"data":"ff64cc43","name":"no name"},{"data":"ff857f1c","name":"no name"},{"data":"fffffba8","name":"no name"},{"data":"fffff536","name":"no name"},{"data":"ff8a863b","name":"no name"},{"data":"ffccc32b","name":"no name"},{"data":"ff854d15","name":"no name"},{"data":"ffffcd9c","name":"no name"},{"data":"ffff9429","name":"no name"},{"data":"ff8a5f34","name":"no name"},{"data":"ffcc7520","name":"no name"},{"data":"ff57100a","name":"no name"},{"data":"ffeb2d1c","name":"no name"},{"data":"ffd12617","name":"no name"},{"data":"ff5c120b","name":"no name"},{"data":"ff9e1d11","name":"no name"},{"data":"ff521157","name":"no name"},{"data":"ffde31eb","name":"no name"},{"data":"ffc62ad1","name":"no name"},{"data":"ff57135c","name":"no name"},{"data":"ff96209e","name":"no name"},{"data":"ff141414","name":"no name"},{"data":"ffababab","name":"no name"},{"data":"ff6e6e6e","name":"no name"},{"data":"ff2d2d2d","name":"no name"},{"data":"ff616161","name":"no name"}],"comments":"","editable":true} \ No newline at end of file +{ + "name": "Monochromatic", + "colors": [ + { + "data": "ff323880", + "name": "no name" + }, + { + "data": "ffb0b7ff", + "name": "no name" + }, + { + "data": "ff636fff", + "name": "no name" + }, + { + "data": "ff4d5182", + "name": "no name" + }, + { + "data": "ff505acc", + "name": "no name" + }, + { + "data": "ff347685", + "name": "no name" + }, + { + "data": "ffb0f1ff", + "name": "no name" + }, + { + "data": "ff63e2ff", + "name": "no name" + }, + { + "data": "ff487985", + "name": "no name" + }, + { + "data": "ff50b5cc", + "name": "no name" + }, + { + "data": "ff40852c", + "name": "no name" + }, + { + "data": "ffadff94", + "name": "no name" + }, + { + "data": "ff7cff54", + "name": "no name" + }, + { + "data": "ff228a03", + "name": "no name" + }, + { + "data": "ff64cc43", + "name": "no name" + }, + { + "data": "ff857f1c", + "name": "no name" + }, + { + "data": "fffffba8", + "name": "no name" + }, + { + "data": "fffff536", + "name": "no name" + }, + { + "data": "ff8a863b", + "name": "no name" + }, + { + "data": "ffccc32b", + "name": "no name" + }, + { + "data": "ff854d15", + "name": "no name" + }, + { + "data": "ffffcd9c", + "name": "no name" + }, + { + "data": "ffff9429", + "name": "no name" + }, + { + "data": "ff8a5f34", + "name": "no name" + }, + { + "data": "ffcc7520", + "name": "no name" + }, + { + "data": "ff57100a", + "name": "no name" + }, + { + "data": "ffeb2d1c", + "name": "no name" + }, + { + "data": "ffd12617", + "name": "no name" + }, + { + "data": "ff5c120b", + "name": "no name" + }, + { + "data": "ff9e1d11", + "name": "no name" + }, + { + "data": "ff521157", + "name": "no name" + }, + { + "data": "ffde31eb", + "name": "no name" + }, + { + "data": "ffc62ad1", + "name": "no name" + }, + { + "data": "ff57135c", + "name": "no name" + }, + { + "data": "ff96209e", + "name": "no name" + }, + { + "data": "ff141414", + "name": "no name" + }, + { + "data": "ffababab", + "name": "no name" + }, + { + "data": "ff6e6e6e", + "name": "no name" + }, + { + "data": "ff2d2d2d", + "name": "no name" + }, + { + "data": "ff616161", + "name": "no name" + } + ], + "comments": "By Erevos", + "editable": true +} \ No newline at end of file diff --git a/Palettes/Shades.json b/Palettes/Shades.json index 04d227414..8ec45f651 100644 --- a/Palettes/Shades.json +++ b/Palettes/Shades.json @@ -1 +1,147 @@ -{"name":"Shades","colors":[{"data":"ffc25400","name":"no name"},{"data":"ff803900","name":"no name"},{"data":"ffff7300","name":"no name"},{"data":"ff401d00","name":"no name"},{"data":"ffe66700","name":"no name"},{"data":"ffc20000","name":"no name"},{"data":"ff800000","name":"no name"},{"data":"ffff0000","name":"no name"},{"data":"ff400000","name":"no name"},{"data":"ffe60101","name":"no name"},{"data":"ff8800c2","name":"no name"},{"data":"ff590080","name":"no name"},{"data":"ffb300ff","name":"no name"},{"data":"ff2d0040","name":"no name"},{"data":"ffa200e5","name":"no name"},{"data":"ff0010c2","name":"no name"},{"data":"ff000b80","name":"no name"},{"data":"ff0015ff","name":"no name"},{"data":"ff000540","name":"no name"},{"data":"ff0114e6","name":"no name"},{"data":"ff00abc2","name":"no name"},{"data":"ff007180","name":"no name"},{"data":"ff00e1ff","name":"no name"},{"data":"ff003840","name":"no name"},{"data":"ff00cbe6","name":"no name"},{"data":"ff00c237","name":"no name"},{"data":"ff008024","name":"no name"},{"data":"ff00ff48","name":"no name"},{"data":"ff004012","name":"no name"},{"data":"ff00e641","name":"no name"},{"data":"ffb8c200","name":"no name"},{"data":"ff798000","name":"no name"},{"data":"fff2ff00","name":"no name"},{"data":"ff3d4000","name":"no name"},{"data":"ffdce600","name":"no name"}],"comments":"","editable":true} \ No newline at end of file +{ + "name": "Shades", + "colors": [ + { + "data": "ffc25400", + "name": "no name" + }, + { + "data": "ff803900", + "name": "no name" + }, + { + "data": "ffff7300", + "name": "no name" + }, + { + "data": "ff401d00", + "name": "no name" + }, + { + "data": "ffe66700", + "name": "no name" + }, + { + "data": "ffc20000", + "name": "no name" + }, + { + "data": "ff800000", + "name": "no name" + }, + { + "data": "ffff0000", + "name": "no name" + }, + { + "data": "ff400000", + "name": "no name" + }, + { + "data": "ffe60101", + "name": "no name" + }, + { + "data": "ff8800c2", + "name": "no name" + }, + { + "data": "ff590080", + "name": "no name" + }, + { + "data": "ffb300ff", + "name": "no name" + }, + { + "data": "ff2d0040", + "name": "no name" + }, + { + "data": "ffa200e5", + "name": "no name" + }, + { + "data": "ff0010c2", + "name": "no name" + }, + { + "data": "ff000b80", + "name": "no name" + }, + { + "data": "ff0015ff", + "name": "no name" + }, + { + "data": "ff000540", + "name": "no name" + }, + { + "data": "ff0114e6", + "name": "no name" + }, + { + "data": "ff00abc2", + "name": "no name" + }, + { + "data": "ff007180", + "name": "no name" + }, + { + "data": "ff00e1ff", + "name": "no name" + }, + { + "data": "ff003840", + "name": "no name" + }, + { + "data": "ff00cbe6", + "name": "no name" + }, + { + "data": "ff00c237", + "name": "no name" + }, + { + "data": "ff008024", + "name": "no name" + }, + { + "data": "ff00ff48", + "name": "no name" + }, + { + "data": "ff004012", + "name": "no name" + }, + { + "data": "ff00e641", + "name": "no name" + }, + { + "data": "ffb8c200", + "name": "no name" + }, + { + "data": "ff798000", + "name": "no name" + }, + { + "data": "fff2ff00", + "name": "no name" + }, + { + "data": "ff3d4000", + "name": "no name" + }, + { + "data": "ffdce600", + "name": "no name" + } + ], + "comments": "By Erevos", + "editable": true +} \ No newline at end of file diff --git a/Palettes/Triad.json b/Palettes/Triad.json index c052a2835..ca7572d7a 100644 --- a/Palettes/Triad.json +++ b/Palettes/Triad.json @@ -1 +1,107 @@ -{"name":"Triad","colors":[{"data":"ff852c32","name":"no name"},{"data":"ffcc646b","name":"no name"},{"data":"ffe3df66","name":"no name"},{"data":"ff3c7899","name":"no name"},{"data":"ff386680","name":"no name"},{"data":"ff141a85","name":"no name"},{"data":"ff353cd1","name":"no name"},{"data":"ffe66930","name":"no name"},{"data":"ff409e18","name":"no name"},{"data":"ff3a851b","name":"no name"},{"data":"ff8a0500","name":"no name"},{"data":"ffd10600","name":"no name"},{"data":"ffdee609","name":"no name"},{"data":"ff105f9e","name":"no name"},{"data":"ff074c85","name":"no name"},{"data":"ff84168a","name":"no name"},{"data":"ffc942d1","name":"no name"},{"data":"ffe6bf40","name":"no name"},{"data":"ff239e85","name":"no name"},{"data":"ff248571","name":"no name"},{"data":"ff1e8a1a","name":"no name"},{"data":"ff4fd14a","name":"no name"},{"data":"ff6047e6","name":"no name"},{"data":"ff9e5a28","name":"no name"},{"data":"ff854f28","name":"no name"}],"comments":"","editable":true} \ No newline at end of file +{ + "name": "Triad", + "colors": [ + { + "data": "ff852c32", + "name": "no name" + }, + { + "data": "ffcc646b", + "name": "no name" + }, + { + "data": "ffe3df66", + "name": "no name" + }, + { + "data": "ff3c7899", + "name": "no name" + }, + { + "data": "ff386680", + "name": "no name" + }, + { + "data": "ff141a85", + "name": "no name" + }, + { + "data": "ff353cd1", + "name": "no name" + }, + { + "data": "ffe66930", + "name": "no name" + }, + { + "data": "ff409e18", + "name": "no name" + }, + { + "data": "ff3a851b", + "name": "no name" + }, + { + "data": "ff8a0500", + "name": "no name" + }, + { + "data": "ffd10600", + "name": "no name" + }, + { + "data": "ffdee609", + "name": "no name" + }, + { + "data": "ff105f9e", + "name": "no name" + }, + { + "data": "ff074c85", + "name": "no name" + }, + { + "data": "ff84168a", + "name": "no name" + }, + { + "data": "ffc942d1", + "name": "no name" + }, + { + "data": "ffe6bf40", + "name": "no name" + }, + { + "data": "ff239e85", + "name": "no name" + }, + { + "data": "ff248571", + "name": "no name" + }, + { + "data": "ff1e8a1a", + "name": "no name" + }, + { + "data": "ff4fd14a", + "name": "no name" + }, + { + "data": "ff6047e6", + "name": "no name" + }, + { + "data": "ff9e5a28", + "name": "no name" + }, + { + "data": "ff854f28", + "name": "no name" + } + ], + "comments": "By Erevos", + "editable": true +} \ No newline at end of file diff --git a/Scripts/Palette/Palette.gd b/Scripts/Palette/Palette.gd index d8df4afcd..c6f11bc01 100644 --- a/Scripts/Palette/Palette.gd +++ b/Scripts/Palette/Palette.gd @@ -92,7 +92,7 @@ func _serialize() -> String: for color in colors: serialize_data.colors.push_back(color.toDict()) - result = JSON.print(serialize_data) + result = JSON.print(serialize_data, " ") return result From c6e18fe90279daed01492eadd9f06596d6821cee Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 01:09:35 +0200 Subject: [PATCH 05/10] Made "comments" be on top of "colors" in the JSON palette files --- Palettes/Complementary.json | 2 +- Palettes/Default.json | 2 +- Palettes/Monochromatic.json | 2 +- Palettes/Shades.json | 2 +- Palettes/Triad.json | 2 +- Palettes/bubblegum16.json | 89 ++++++++++++++++++++++++++++--------- Scripts/Palette/Palette.gd | 2 +- 7 files changed, 75 insertions(+), 26 deletions(-) diff --git a/Palettes/Complementary.json b/Palettes/Complementary.json index e578d74ff..c94e429f1 100644 --- a/Palettes/Complementary.json +++ b/Palettes/Complementary.json @@ -1,5 +1,6 @@ { "name": "Complementary", + "comments": "By Erevos", "colors": [ { "data": "ffb35102", @@ -102,6 +103,5 @@ "name": "no name" } ], - "comments": "By Erevos", "editable": true } \ No newline at end of file diff --git a/Palettes/Default.json b/Palettes/Default.json index 269825240..a527cf40c 100644 --- a/Palettes/Default.json +++ b/Palettes/Default.json @@ -1,5 +1,6 @@ { "name": "Default", + "comments": "", "colors": [ { "data": "ff000000", @@ -130,6 +131,5 @@ "name": "no name" } ], - "comments": "", "editable": true } \ No newline at end of file diff --git a/Palettes/Monochromatic.json b/Palettes/Monochromatic.json index c22e4f2e8..fe0f6a2c4 100644 --- a/Palettes/Monochromatic.json +++ b/Palettes/Monochromatic.json @@ -1,5 +1,6 @@ { "name": "Monochromatic", + "comments": "By Erevos", "colors": [ { "data": "ff323880", @@ -162,6 +163,5 @@ "name": "no name" } ], - "comments": "By Erevos", "editable": true } \ No newline at end of file diff --git a/Palettes/Shades.json b/Palettes/Shades.json index 8ec45f651..25f531293 100644 --- a/Palettes/Shades.json +++ b/Palettes/Shades.json @@ -1,5 +1,6 @@ { "name": "Shades", + "comments": "By Erevos", "colors": [ { "data": "ffc25400", @@ -142,6 +143,5 @@ "name": "no name" } ], - "comments": "By Erevos", "editable": true } \ No newline at end of file diff --git a/Palettes/Triad.json b/Palettes/Triad.json index ca7572d7a..d3761dc99 100644 --- a/Palettes/Triad.json +++ b/Palettes/Triad.json @@ -1,5 +1,6 @@ { "name": "Triad", + "comments": "By Erevos", "colors": [ { "data": "ff852c32", @@ -102,6 +103,5 @@ "name": "no name" } ], - "comments": "By Erevos", "editable": true } \ No newline at end of file diff --git a/Palettes/bubblegum16.json b/Palettes/bubblegum16.json index 1239d8abf..817dfec50 100644 --- a/Palettes/bubblegum16.json +++ b/Palettes/bubblegum16.json @@ -1,22 +1,71 @@ { - "name": "BubbleGum16", - "colors" : [ - { "data" : "#FF000000", "name" : "no name" }, - { "data" : "#FF7f0622", "name" : "no name" }, - { "data" : "#FFd62411", "name" : "no name" }, - { "data" : "#FFff8426", "name" : "no name" }, - { "data" : "#FFffd100", "name" : "no name" }, - { "data" : "#FFfafdff", "name" : "no name" }, - { "data" : "#FFff80a4", "name" : "no name" }, - { "data" : "#FFff2674", "name" : "no name" }, - { "data" : "#FF94216a", "name" : "no name" }, - { "data" : "#FF430067", "name" : "no name" }, - { "data" : "#FF234975", "name" : "no name" }, - { "data" : "#FF68aed4", "name" : "no name" }, - { "data" : "#FFbfff3c", "name" : "no name" }, - { "data" : "#FF10d275", "name" : "no name" }, - { "data" : "#FF007899", "name" : "no name" }, - { "data" : "#FF002859", "name" : "no name" }, - ], - "comments": "by PineTreePizza - https://twitter.com/PineTreePizza" + "name": "BubbleGum16", + "comments": "by PineTreePizza - https://twitter.com/PineTreePizza", + "colors": [ + { + "data": "ff000000", + "name": "no name" + }, + { + "data": "ff7f0622", + "name": "no name" + }, + { + "data": "ffd62411", + "name": "no name" + }, + { + "data": "ffff8426", + "name": "no name" + }, + { + "data": "ffffd100", + "name": "no name" + }, + { + "data": "fffafdff", + "name": "no name" + }, + { + "data": "ffff80a4", + "name": "no name" + }, + { + "data": "ffff2674", + "name": "no name" + }, + { + "data": "ff94216a", + "name": "no name" + }, + { + "data": "ff430067", + "name": "no name" + }, + { + "data": "ff234975", + "name": "no name" + }, + { + "data": "ff68aed4", + "name": "no name" + }, + { + "data": "ffbfff3c", + "name": "no name" + }, + { + "data": "ff10d275", + "name": "no name" + }, + { + "data": "ff007899", + "name": "no name" + }, + { + "data": "ff002859", + "name": "no name" + } + ], + "editable": true } \ No newline at end of file diff --git a/Scripts/Palette/Palette.gd b/Scripts/Palette/Palette.gd index c6f11bc01..859463c66 100644 --- a/Scripts/Palette/Palette.gd +++ b/Scripts/Palette/Palette.gd @@ -85,8 +85,8 @@ func _serialize() -> String: var result = "" var serialize_data : Dictionary = { "name" : name, - "colors" : [], "comments" : comments, + "colors" : [], "editable" : editable } for color in colors: From 5a43bf33ee32109a9930637dedf02f96bb58a9a5 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 01:41:46 +0200 Subject: [PATCH 06/10] Added a VSplitContainer for Palettes and Layers --- Main.tscn | 131 +++++++++++++++++++++++++++----------------------- project.godot | 2 +- 2 files changed, 73 insertions(+), 60 deletions(-) diff --git a/Main.tscn b/Main.tscn index 3ce5faf64..6911f857a 100644 --- a/Main.tscn +++ b/Main.tscn @@ -941,7 +941,6 @@ size_flags_horizontal = 3 custom_constants/separation = 0 [node name="HViewportContainer" type="HBoxContainer" parent="MenuAndUI/UI/CanvasAndTimeline"] -editor/display_folded = true margin_right = 704.0 margin_bottom = 478.0 size_flags_horizontal = 3 @@ -968,6 +967,7 @@ enabled_focus_mode = 0 script = ExtResource( 14 ) [node name="HSplitContainer" type="HSplitContainer" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers"] +editor/display_folded = true margin_top = 16.0 margin_right = 704.0 margin_bottom = 478.0 @@ -1008,6 +1008,7 @@ stretch = true [node name="Viewport" type="Viewport" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer"] size = Vector2( 676, 462 ) handle_input_locally = false +usage = 0 render_target_update_mode = 3 [node name="Canvas" parent="MenuAndUI/UI/CanvasAndTimeline/HViewportContainer/ViewportAndRulers/HSplitContainer/ViewportandVerticalRuler/ViewportContainer/Viewport" instance=ExtResource( 16 )] @@ -1328,7 +1329,7 @@ current = true zoom = Vector2( 0.15, 0.15 ) script = ExtResource( 17 ) -[node name="HSeparator3" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] +[node name="HSeparator" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] margin_top = 168.0 margin_right = 224.0 margin_bottom = 172.0 @@ -1342,28 +1343,34 @@ size_flags_vertical = 0 text = "Palettes" align = 1 -[node name="HSeparator" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] +[node name="HSeparator2" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] margin_top = 195.0 margin_right = 224.0 margin_bottom = 199.0 -[node name="PaletteVBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] -editor/display_folded = true +[node name="VSplitContainer" type="VSplitContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] margin_top = 203.0 margin_right = 224.0 -margin_bottom = 355.0 +margin_bottom = 604.0 +size_flags_vertical = 3 +custom_constants/autohide = 0 + +[node name="PaletteVBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer"] +editor/display_folded = true +margin_right = 224.0 +margin_bottom = 136.0 size_flags_horizontal = 3 -[node name="CenterContainer" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer"] +[node name="CenterContainer" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer"] margin_right = 224.0 margin_bottom = 32.0 -[node name="PaletteButtons" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer"] +[node name="PaletteButtons" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer"] margin_left = 24.0 margin_right = 199.0 margin_bottom = 32.0 -[node name="AddPalette" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons" groups=[ +[node name="AddPalette" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons" groups=[ "UIButtons", ]] margin_right = 32.0 @@ -1374,12 +1381,12 @@ mouse_default_cursor_shape = 2 texture_normal = ExtResource( 37 ) texture_hover = ExtResource( 38 ) -[node name="PopupMenu" type="PopupMenu" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette"] +[node name="PopupMenu" type="PopupMenu" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette"] margin_right = 12.0 margin_bottom = 20.0 items = [ "New Empty Palette", null, 0, false, false, 0, 0, null, "", false, "Import Palette", null, 0, false, false, 1, 0, null, "", false ] -[node name="EditPalette" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons" groups=[ +[node name="EditPalette" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons" groups=[ "UIButtons", ]] margin_left = 36.0 @@ -1390,7 +1397,7 @@ mouse_default_cursor_shape = 2 texture_normal = ExtResource( 39 ) texture_hover = ExtResource( 40 ) -[node name="PaletteOptionButton" type="OptionButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons"] +[node name="PaletteOptionButton" type="OptionButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons"] margin_left = 72.0 margin_right = 175.0 margin_bottom = 32.0 @@ -1400,62 +1407,68 @@ hint_tooltip = "CHOOSEPALETTE_HT" mouse_default_cursor_shape = 2 clip_text = true -[node name="ScrollPalette" type="ScrollContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer"] +[node name="ScrollPalette" type="ScrollContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer"] margin_top = 36.0 margin_right = 224.0 -margin_bottom = 152.0 -rect_min_size = Vector2( 0, 116 ) +margin_bottom = 136.0 +rect_min_size = Vector2( 0, 100 ) size_flags_horizontal = 3 +size_flags_vertical = 3 -[node name="CenterPalette" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette"] +[node name="CenterPalette" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette"] margin_right = 224.0 size_flags_horizontal = 3 -[node name="PaletteContainer" type="GridContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette"] +[node name="PaletteContainer" type="GridContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette"] margin_left = 112.0 margin_right = 112.0 size_flags_horizontal = 3 columns = 5 script = ExtResource( 41 ) -[node name="HSeparator2" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] -margin_top = 359.0 +[node name="VBoxLayerWithLabels" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer"] +editor/display_folded = true +margin_top = 148.0 margin_right = 224.0 -margin_bottom = 363.0 +margin_bottom = 401.0 -[node name="LayerLabel" type="Label" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] -margin_top = 367.0 +[node name="HSeparator" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels"] margin_right = 224.0 -margin_bottom = 382.0 +margin_bottom = 4.0 + +[node name="LayerLabel" type="Label" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels"] +margin_top = 8.0 +margin_right = 224.0 +margin_bottom = 23.0 size_flags_horizontal = 3 size_flags_vertical = 0 text = "Layers" align = 1 -[node name="HSeparator4" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] -margin_top = 386.0 +[node name="HSeparator2" type="HSeparator" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels"] +margin_top = 27.0 margin_right = 224.0 -margin_bottom = 390.0 +margin_bottom = 31.0 -[node name="LayerVBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc"] +[node name="LayerVBoxContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels"] editor/display_folded = true -margin_top = 394.0 +margin_top = 35.0 margin_right = 224.0 -margin_bottom = 604.0 +margin_bottom = 253.0 size_flags_vertical = 3 custom_constants/separation = 6 -[node name="CenterLayerButtons" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer"] +[node name="CenterLayerButtons" type="CenterContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer"] margin_right = 224.0 margin_bottom = 32.0 -[node name="LayerButtons" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons"] +[node name="LayerButtons" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons"] editor/display_folded = true margin_left = 6.0 margin_right = 218.0 margin_bottom = 32.0 -[node name="AddLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="AddLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_right = 32.0 @@ -1465,7 +1478,7 @@ mouse_default_cursor_shape = 2 texture_normal = ExtResource( 42 ) texture_hover = ExtResource( 43 ) -[node name="RemoveLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="RemoveLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_left = 36.0 @@ -1478,7 +1491,7 @@ texture_normal = ExtResource( 44 ) texture_hover = ExtResource( 45 ) texture_disabled = ExtResource( 46 ) -[node name="MoveUpLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="MoveUpLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_left = 72.0 @@ -1491,7 +1504,7 @@ texture_normal = ExtResource( 47 ) texture_hover = ExtResource( 48 ) texture_disabled = ExtResource( 49 ) -[node name="MovwDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="MovwDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_left = 108.0 @@ -1504,7 +1517,7 @@ texture_normal = ExtResource( 50 ) texture_hover = ExtResource( 51 ) texture_disabled = ExtResource( 52 ) -[node name="CloneLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="CloneLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_left = 144.0 @@ -1515,7 +1528,7 @@ mouse_default_cursor_shape = 2 texture_normal = ExtResource( 53 ) texture_hover = ExtResource( 54 ) -[node name="MergeDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ +[node name="MergeDownLayer" type="TextureButton" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons" groups=[ "UIButtons", ]] margin_left = 180.0 @@ -1528,26 +1541,26 @@ texture_normal = ExtResource( 55 ) texture_hover = ExtResource( 56 ) texture_disabled = ExtResource( 57 ) -[node name="OpacityContainer" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer"] +[node name="OpacityContainer" type="HBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer"] margin_top = 38.0 margin_right = 224.0 margin_bottom = 55.0 custom_constants/separation = 2 alignment = 1 -[node name="SpacerControl" type="Control" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer"] +[node name="SpacerControl" type="Control" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer"] margin_right = 3.0 margin_bottom = 17.0 rect_min_size = Vector2( 3, 0 ) -[node name="OpacityLabel" type="Label" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer"] +[node name="OpacityLabel" type="Label" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer"] margin_left = 5.0 margin_right = 49.0 margin_bottom = 17.0 size_flags_vertical = 1 text = "Opacity:" -[node name="OpacitySlider" type="HSlider" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer"] +[node name="OpacitySlider" type="HSlider" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer"] margin_left = 51.0 margin_right = 166.0 margin_bottom = 17.0 @@ -1557,7 +1570,7 @@ size_flags_vertical = 1 value = 100.0 ticks_on_borders = true -[node name="OpacitySpinBox" type="SpinBox" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer"] +[node name="OpacitySpinBox" type="SpinBox" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer"] margin_left = 168.0 margin_right = 222.0 margin_bottom = 17.0 @@ -1565,20 +1578,20 @@ mouse_default_cursor_shape = 2 value = 100.0 align = 1 -[node name="SpacerControl2" type="Control" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer"] +[node name="SpacerControl2" type="Control" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer"] margin_left = 224.0 margin_right = 224.0 margin_bottom = 17.0 -[node name="ScrollLayers" type="ScrollContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer"] +[node name="ScrollLayers" type="ScrollContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer"] editor/display_folded = true margin_top = 61.0 margin_right = 224.0 -margin_bottom = 210.0 +margin_bottom = 218.0 size_flags_horizontal = 3 size_flags_vertical = 3 -[node name="VBoxLayerContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/ScrollLayers"] +[node name="VBoxLayerContainer" type="VBoxContainer" parent="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/ScrollLayers"] margin_right = 224.0 size_flags_horizontal = 3 @@ -1770,17 +1783,17 @@ visible = false [connection signal="value_changed" from="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/OnionSkinningButtons/PastOnionSkinning" to="." method="_on_PastOnionSkinning_value_changed"] [connection signal="value_changed" from="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/OnionSkinningButtons/FutureOnionSkinning" to="." method="_on_FutureOnionSkinning_value_changed"] [connection signal="toggled" from="MenuAndUI/UI/CanvasAndTimeline/AnimationTimeline/AnimationContainer/OnionSkinningButtons/BlueRedMode" to="." method="_on_BlueRedMode_toggled"] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"] -[connection signal="item_selected" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/CenterContainer/PaletteButtons/PaletteOptionButton" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteOptionButton_item_selected"] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/AddLayer" to="." method="add_layer"] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/RemoveLayer" to="." method="_on_RemoveLayerButton_pressed"] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MoveUpLayer" to="." method="change_layer_order" binds= [ 1 ]] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MovwDownLayer" to="." method="change_layer_order" binds= [ -1 ]] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/CloneLayer" to="." method="add_layer" binds= [ false ]] -[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MergeDownLayer" to="." method="_on_MergeLayer_pressed"] -[connection signal="value_changed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer/OpacitySlider" to="." method="_on_OpacitySlider_value_changed"] -[connection signal="value_changed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/LayerVBoxContainer/OpacityContainer/OpacitySpinBox" to="." method="_on_OpacitySlider_value_changed"] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons/AddPalette" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_AddPalette_pressed"] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons/EditPalette" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_edit_palette"] +[connection signal="item_selected" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/CenterContainer/PaletteButtons/PaletteOptionButton" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="_on_PaletteOptionButton_item_selected"] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/AddLayer" to="." method="add_layer"] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/RemoveLayer" to="." method="_on_RemoveLayerButton_pressed"] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MoveUpLayer" to="." method="change_layer_order" binds= [ 1 ]] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MovwDownLayer" to="." method="change_layer_order" binds= [ -1 ]] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/CloneLayer" to="." method="add_layer" binds= [ false ]] +[connection signal="pressed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/CenterLayerButtons/LayerButtons/MergeDownLayer" to="." method="_on_MergeLayer_pressed"] +[connection signal="value_changed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer/OpacitySlider" to="." method="_on_OpacitySlider_value_changed"] +[connection signal="value_changed" from="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/VBoxLayerWithLabels/LayerVBoxContainer/OpacityContainer/OpacitySpinBox" to="." method="_on_OpacitySlider_value_changed"] [connection signal="popup_hide" from="SplashDialog" to="." method="_can_draw_true"] [connection signal="popup_hide" from="CreateNewImage" to="." method="_can_draw_true"] [connection signal="file_selected" from="OpenSprite" to="." method="_on_OpenSprite_file_selected"] @@ -1795,8 +1808,8 @@ visible = false [connection signal="popup_hide" from="AboutDialog" to="." method="_can_draw_true"] [connection signal="confirmed" from="QuitDialog" to="." method="_on_QuitDialog_confirmed"] [connection signal="popup_hide" from="QuitDialog" to="." method="_can_draw_true"] -[connection signal="confirmed" from="NewPaletteDialog" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_new_palette_confirmed"] -[connection signal="file_selected" from="PaletteImportFileDialog" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_palette_import_file_selected"] +[connection signal="confirmed" from="NewPaletteDialog" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_new_palette_confirmed"] +[connection signal="file_selected" from="PaletteImportFileDialog" to="MenuAndUI/UI/LayerPanel/LayersAndMisc/VSplitContainer/PaletteVBoxContainer/ScrollPalette/CenterPalette/PaletteContainer" method="on_palette_import_file_selected"] [connection signal="timeout" from="AnimationTimer" to="." method="_on_AnimationTimer_timeout"] [editable path="BrushesPopup/TabContainer/File/FileBrushContainer/CircleBrushButton"] diff --git a/project.godot b/project.godot index 723086c40..473a20b41 100644 --- a/project.godot +++ b/project.godot @@ -51,7 +51,7 @@ boot_splash/image="res://splash.png" boot_splash/bg_color=Color( 0.145098, 0.145098, 0.164706, 1 ) config/icon="res://icon.png" config/description="A free & open-source 2D sprite editor" -config/Version="v0.6" +config/Version="v0.6.1" [autoload] From 63254258d09e6c8527c4a7ab371f9f25bb2e7f3d Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 02:16:48 +0200 Subject: [PATCH 07/10] Added a ScrollContainer for the palette buttons in EditPalettePopup --- Prefabs/EditPalettePopup.tscn | 8 +++++++- Scripts/Palette/EditPalettePopup.gd | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Prefabs/EditPalettePopup.tscn b/Prefabs/EditPalettePopup.tscn index 5eed442f4..692e6fbde 100644 --- a/Prefabs/EditPalettePopup.tscn +++ b/Prefabs/EditPalettePopup.tscn @@ -39,11 +39,17 @@ margin_right = 556.0 margin_bottom = 462.0 size_flags_horizontal = 3 -[node name="EditPaletteGridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/Panel"] +[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/HBoxContainer/Panel"] anchor_right = 1.0 anchor_bottom = 1.0 size_flags_horizontal = 3 size_flags_vertical = 3 + +[node name="EditPaletteGridContainer" type="GridContainer" parent="VBoxContainer/HBoxContainer/Panel/ScrollContainer"] +margin_right = 262.0 +margin_bottom = 462.0 +size_flags_horizontal = 3 +size_flags_vertical = 3 columns = 8 [node name="ColorButtons" type="VBoxContainer" parent="VBoxContainer/HBoxContainer"] diff --git a/Scripts/Palette/EditPalettePopup.gd b/Scripts/Palette/EditPalettePopup.gd index 062fe44f4..5ce127315 100644 --- a/Scripts/Palette/EditPalettePopup.gd +++ b/Scripts/Palette/EditPalettePopup.gd @@ -1,7 +1,7 @@ extends WindowDialog onready var color_picker = $VBoxContainer/HBoxContainer/EditPaletteColorPicker -onready var palette_grid = $VBoxContainer/HBoxContainer/Panel/EditPaletteGridContainer +onready var palette_grid = $VBoxContainer/HBoxContainer/Panel/ScrollContainer/EditPaletteGridContainer onready var color_name_edit = $VBoxContainer/PaletteOptions/EditPaletteColorNameLineEdit onready var palette_name_edit = $VBoxContainer/PaletteOptions/EditPaletteNameLineEdit From b7d5ca63a8ba3a76251728290e1fe9ef998b83f5 Mon Sep 17 00:00:00 2001 From: Manolis Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 02:48:51 +0200 Subject: [PATCH 08/10] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index df02d4fb5..ca49235dc 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # Pixelorama - your free and open-source sprite editor! Your free & open-source 2D sprite editor, made by Orama Interactive in the Godot Engine, using GDScript! +[![Discord Server](https://discordapp.com/api/guilds/645793202393186339/embed.png)](https://discord.gg/GTMtr8s) + [![Pixelorama's UI](https://static.wixstatic.com/media/cc6108_ccec89c37b3d425da4f03776160c859c~mv2.png)](https://www.youtube.com/watch?v=DULv-jzueRw&list=PLVEP1Zz6BUpBiQC0CB6eNBhhLF4tEwBB-&index=7) Current features as of version v0.6: From 2e7b32095b315b7bde38d451fdb0e36332d9ea06 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 03:27:27 +0200 Subject: [PATCH 09/10] Closes #111 --- Scripts/Main.gd | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Scripts/Main.gd b/Scripts/Main.gd index 4d3be2a49..c40198651 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -767,10 +767,10 @@ func _on_LoopAnim_pressed() -> void: Global.loop_animation_button.texture_normal = load("res://Assets/Graphics/%s Themes/Timeline/Loop_None.png" % Global.theme_type) Global.loop_animation_button.hint_tooltip = "No loop" -func _on_PlayForward_toggled(button_pressed) -> void: +func _on_PlayForward_toggled(button_pressed : bool) -> void: Global.play_backwards.pressed = false if Global.canvases.size() == 1: - Global.play_forward.pressed = !button_pressed + Global.play_forward.pressed = false return if button_pressed: @@ -780,10 +780,10 @@ func _on_PlayForward_toggled(button_pressed) -> void: else: Global.animation_timer.stop() -func _on_PlayBackwards_toggled(button_pressed) -> void: +func _on_PlayBackwards_toggled(button_pressed : bool) -> void: Global.play_forward.pressed = false if Global.canvases.size() == 1: - Global.play_backwards.pressed = !button_pressed + Global.play_backwards.pressed = false return if button_pressed: From c04dbc937b349bde98079265aa35fbd22b4b3032 Mon Sep 17 00:00:00 2001 From: OverloadedOrama <35376950+OverloadedOrama@users.noreply.github.com> Date: Wed, 8 Jan 2020 03:48:01 +0200 Subject: [PATCH 10/10] Update the canvas when grid options are changed --- Scripts/Dialogs/PreferencesDialog.gd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index fc659087a..77ddd4e6b 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -172,12 +172,15 @@ func change_theme(ID : int) -> void: func _on_GridWidthValue_value_changed(value : float) -> void: Global.grid_width = value + Global.canvas.update() func _on_GridHeightValue_value_changed(value : float) -> void: Global.grid_height = value + Global.canvas.update() func _on_GridColor_color_changed(color : Color) -> void: Global.grid_color = color + Global.canvas.update() func _on_GuideColor_color_changed(color : Color) -> void: Global.guide_color = color