diff --git a/Scripts/AnimationTimeline.gd b/Scripts/AnimationTimeline.gd index 54774a3..5fdb0aa 100644 --- a/Scripts/AnimationTimeline.gd +++ b/Scripts/AnimationTimeline.gd @@ -141,7 +141,7 @@ func _on_BlueRedMode_toggled(button_pressed) -> void: func add_layer(is_new := true) -> void: var layer_name = null - if !is_new: # clone layer + if !is_new: # Clone layer layer_name = Global.layers[Global.current_layer][0] + " (" + tr("copy") + ")" var new_layers : Array = Global.layers.duplicate() diff --git a/Scripts/Canvas.gd b/Scripts/Canvas.gd index 28a850e..7e0e850 100644 --- a/Scripts/Canvas.gd +++ b/Scripts/Canvas.gd @@ -65,7 +65,7 @@ func _ready() -> void: add_child(line_2d) func _draw() -> void: - draw_texture_rect(Global.transparent_background, Rect2(location, size), true) #Draw transparent background + draw_texture_rect(Global.transparent_background, Rect2(location, size), true) # Draw transparent background # Onion Skinning # Past if Global.onion_skinning_past_rate > 0: @@ -106,14 +106,14 @@ func _draw() -> void: draw_texture(layers[i][1], location, modulate_color) if Global.tile_mode: - draw_texture(layers[i][1], Vector2(location.x, location.y + size.y), modulate_color) #Down - draw_texture(layers[i][1], Vector2(location.x - size.x, location.y + size.y), modulate_color) #Down Left - draw_texture(layers[i][1], Vector2(location.x - size.x, location.y), modulate_color) #Left - draw_texture(layers[i][1], location - size, modulate_color) #Up left - draw_texture(layers[i][1], Vector2(location.x, location.y - size.y), modulate_color) #Up - draw_texture(layers[i][1], Vector2(location.x + size.x, location.y - size.y), modulate_color) #Up right - draw_texture(layers[i][1], Vector2(location.x + size.x, location.y), modulate_color) #Right - draw_texture(layers[i][1], location + size, modulate_color) #Down right + draw_texture(layers[i][1], Vector2(location.x, location.y + size.y), modulate_color) # Down + draw_texture(layers[i][1], Vector2(location.x - size.x, location.y + size.y), modulate_color) # Down Left + draw_texture(layers[i][1], Vector2(location.x - size.x, location.y), modulate_color) # Left + draw_texture(layers[i][1], location - size, modulate_color) # Up left + draw_texture(layers[i][1], Vector2(location.x, location.y - size.y), modulate_color) # Up + draw_texture(layers[i][1], Vector2(location.x + size.x, location.y - size.y), modulate_color) # Up right + draw_texture(layers[i][1], Vector2(location.x + size.x, location.y), modulate_color) # Right + draw_texture(layers[i][1], location + size, modulate_color) # Down right # Idea taken from flurick (on GitHub) if Global.draw_grid: diff --git a/Scripts/Dialogs/ImportSprites.gd b/Scripts/Dialogs/ImportSprites.gd index 8696ad3..32a966e 100644 --- a/Scripts/Dialogs/ImportSprites.gd +++ b/Scripts/Dialogs/ImportSprites.gd @@ -74,7 +74,7 @@ func _on_ImportSprites_files_selected(paths : PoolStringArray) -> void: Global.canvases.append(canvas) Global.canvas_parent.add_child(canvas) canvas.visible = false - if path == paths[0]: #If it's the first file + if path == paths[0]: # If it's the first file max_size = canvas.size biggest_canvas = canvas else: diff --git a/Scripts/Dialogs/PreferencesDialog.gd b/Scripts/Dialogs/PreferencesDialog.gd index 3e1eaea..984bfd1 100644 --- a/Scripts/Dialogs/PreferencesDialog.gd +++ b/Scripts/Dialogs/PreferencesDialog.gd @@ -191,35 +191,35 @@ func change_theme(ID : int) -> void: var main_theme var top_menu_style var ruler_style - if ID == 0: #Dark Theme + if ID == 0: # Dark Theme Global.theme_type = "Dark" Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Canvas Backgrounds/Transparent Background Dark.png"), 0) VisualServer.set_default_clear_color(Color(0.247059, 0.25098, 0.247059)) main_theme = preload("res://Themes & Styles/Dark Theme/Dark Theme.tres") top_menu_style = preload("res://Themes & Styles/Dark Theme/DarkTopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Dark Theme/DarkRulerStyle.tres") - elif ID == 1: #Gray Theme + elif ID == 1: # Gray Theme Global.theme_type = "Dark" Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Canvas Backgrounds/Transparent Background Gray.png"), 0) VisualServer.set_default_clear_color(Color(0.301961, 0.301961, 0.301961)) main_theme = preload("res://Themes & Styles/Gray Theme/Gray Theme.tres") top_menu_style = preload("res://Themes & Styles/Gray Theme/GrayTopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Dark Theme/DarkRulerStyle.tres") - elif ID == 2: #Godot's Theme + elif ID == 2: # Godot's Theme Global.theme_type = "Dark" Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Canvas Backgrounds/Transparent Background Godot.png"), 0) VisualServer.set_default_clear_color(Color(0.27451, 0.278431, 0.305882)) main_theme = preload("res://Themes & Styles/Godot\'s Theme/Godot\'s Theme.tres") top_menu_style = preload("res://Themes & Styles/Godot\'s Theme/TopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Godot\'s Theme/RulerStyle.tres") - elif ID == 3: #Gold Theme + elif ID == 3: # Gold Theme Global.theme_type = "Gold" Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Canvas Backgrounds/Transparent Background Gold.png"), 0) VisualServer.set_default_clear_color(Color(0.694118, 0.619608, 0.458824)) main_theme = preload("res://Themes & Styles/Gold Theme/Gold Theme.tres") top_menu_style = preload("res://Themes & Styles/Gold Theme/GoldTopMenuStyle.tres") ruler_style = preload("res://Themes & Styles/Gold Theme/GoldRulerStyle.tres") - elif ID == 4: #Light Theme + elif ID == 4: # Light Theme Global.theme_type = "Light" Global.transparent_background.create_from_image(preload("res://Assets/Graphics/Canvas Backgrounds/Transparent Background Light.png"), 0) VisualServer.set_default_clear_color(Color(0.705882, 0.705882, 0.705882)) diff --git a/Scripts/FrameButton.gd b/Scripts/FrameButton.gd index b417c52..98ec516 100644 --- a/Scripts/FrameButton.gd +++ b/Scripts/FrameButton.gd @@ -89,7 +89,7 @@ func remove_frame() -> void: var new_hidden_canvases := Global.hidden_canvases.duplicate() new_hidden_canvases.append(canvas) var current_frame := Global.current_frame - if current_frame > 0 && current_frame == new_canvases.size(): #If it's the last frame + if current_frame > 0 && current_frame == new_canvases.size(): # If it's the last frame current_frame -= 1 Global.undos += 1 diff --git a/Scripts/Global.gd b/Scripts/Global.gd index 5b02db8..49f5235 100644 --- a/Scripts/Global.gd +++ b/Scripts/Global.gd @@ -352,8 +352,6 @@ func _ready() -> void: play_forward = find_node_by_name(animation_timeline, "PlayForward") play_backwards = find_node_by_name(animation_timeline, "PlayBackwards") - #var layer_stuff_container = find_node_by_name(animation_timeline, "LayerVBoxContainer") - remove_layer_button = find_node_by_name(animation_timeline, "RemoveLayer") move_up_layer_button = find_node_by_name(animation_timeline, "MoveUpLayer") move_down_layer_button = find_node_by_name(animation_timeline, "MovwDownLayer") diff --git a/Scripts/Main.gd b/Scripts/Main.gd index b079798..7c9de8f 100644 --- a/Scripts/Main.gd +++ b/Scripts/Main.gd @@ -375,7 +375,7 @@ func image_menu_id_pressed(id : int) -> void: func help_menu_id_pressed(id : int) -> void: match id: 0: # Splash Screen - $SplashDialog.popup_centered() # Splash screen + $SplashDialog.popup_centered() Global.can_draw = false 1: # Issue Tracker OS.shell_open("https://github.com/Orama-Interactive/Pixelorama/issues") diff --git a/Scripts/Rulers/Guides.gd b/Scripts/Rulers/Guides.gd index 2788033..f3eeb7f 100644 --- a/Scripts/Rulers/Guides.gd +++ b/Scripts/Rulers/Guides.gd @@ -70,7 +70,7 @@ func outside_canvas(undo := false) -> bool: Global.undos -= 1 Global.notification_label("Move Guide") if Global.control.redone: - if Global.undos < Global.undo_redo.get_version(): #If we did undo and then redo + if Global.undos < Global.undo_redo.get_version(): # If we did undo and then redo Global.undos = Global.undo_redo.get_version() Global.notification_label("Move Guide") if type == Types.HORIZONTAL: diff --git a/Scripts/SelectionRectangle.gd b/Scripts/SelectionRectangle.gd index 6a92210..42d40f7 100644 --- a/Scripts/SelectionRectangle.gd +++ b/Scripts/SelectionRectangle.gd @@ -114,7 +114,7 @@ func _process(delta : float) -> void: brush_img = layer.get_rect(Rect2(polygon[0], polygon[2] - polygon[0])) if brush_img.is_invisible(): return - brush_img = brush_img.get_rect(brush_img.get_used_rect()) #save only the visible pixels + brush_img = brush_img.get_rect(brush_img.get_used_rect()) # Save only the visible pixels Global.custom_brushes.append(brush_img) Global.create_brush_button(brush_img)