mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-03-12 22:35:18 +00:00
Fixed spacing between some comments
This commit is contained in:
parent
f4dbd2aadb
commit
1e5c674673
9 changed files with 20 additions and 22 deletions
|
@ -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()
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue