mirror of
https://github.com/tonytins/CozyPixelStudio.git
synced 2025-06-25 11:54:44 -04:00
Imported German translation in the Project Settings
This commit is contained in:
parent
2d97bb6e65
commit
f3ab5960ba
11 changed files with 29 additions and 29 deletions
|
@ -257,10 +257,10 @@ func _process(delta : float) -> void:
|
|||
elif Input.is_action_just_released("shift"):
|
||||
is_making_line = false
|
||||
line_2d.queue_free()
|
||||
|
||||
|
||||
if is_making_line:
|
||||
line_2d.set_point_position(1, mouse_pos)
|
||||
|
||||
|
||||
|
||||
if is_making_selection != "None": #If we're making a selection
|
||||
if Input.is_action_just_released(is_making_selection): #Finish selection when button is released
|
||||
|
@ -648,7 +648,7 @@ func draw_pixel(pos : Vector2, color : Color, current_mouse_button : String, cur
|
|||
|
||||
layers[current_layer_index][0].lock()
|
||||
sprite_changed_this_frame = true
|
||||
|
||||
|
||||
previous_mouse_pos = current_pixel
|
||||
previous_mouse_pos.x = clamp(previous_mouse_pos.x, location.x, location.x + size.x)
|
||||
previous_mouse_pos.y = clamp(previous_mouse_pos.y, location.y, location.y + size.y)
|
||||
|
|
|
@ -267,7 +267,7 @@ func _ready() -> void:
|
|||
move_up_layer_button = find_node_by_name(root, "MoveUpLayer")
|
||||
move_down_layer_button = find_node_by_name(root, "MoveDownLayer")
|
||||
merge_down_layer_button = find_node_by_name(root, "MergeDownLayer")
|
||||
|
||||
|
||||
add_palette_button = find_node_by_name(root, "AddPalette")
|
||||
remove_palette_button = find_node_by_name(root, "RemovePalette")
|
||||
palette_option_button = find_node_by_name(root, "PaletteOptionButton")
|
||||
|
|
|
@ -42,9 +42,9 @@ var default_palette = [
|
|||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
#Global.palettes["Default"] = default_palette
|
||||
|
||||
|
||||
_load_palettes()
|
||||
|
||||
|
||||
on_palette_select(current_palette)
|
||||
pass # Replace with function body.
|
||||
|
||||
|
@ -87,14 +87,14 @@ func on_color_select(index : int) -> void:
|
|||
|
||||
func _load_palettes() -> void:
|
||||
var files := []
|
||||
|
||||
|
||||
var dir := Directory.new()
|
||||
|
||||
|
||||
if not dir.dir_exists("user://palettes"):
|
||||
dir.make_dir("user://palettes");
|
||||
dir.copy("res://Assets/Graphics/Palette/default_palette.json","user://palettes/default_palette.json");
|
||||
dir.copy("res://Assets/Graphics/Palette/bubblegum16.json","user://palettes/bubblegum16.json");
|
||||
|
||||
|
||||
dir.open("user://palettes")
|
||||
dir.list_dir_begin()
|
||||
|
||||
|
@ -106,7 +106,7 @@ func _load_palettes() -> void:
|
|||
files.append(file_name)
|
||||
|
||||
dir.list_dir_end()
|
||||
|
||||
|
||||
for file_name in files:
|
||||
var result : String = load_palette("user://palettes/" + file_name)
|
||||
if result:
|
||||
|
@ -115,7 +115,7 @@ func _load_palettes() -> void:
|
|||
Global.palette_option_button.set_item_metadata(index, result)
|
||||
if result == "Default":
|
||||
Global.palette_option_button.select(index)
|
||||
|
||||
|
||||
for item in Global.palette_option_button.items:
|
||||
print(item)
|
||||
pass
|
||||
|
@ -123,7 +123,7 @@ func _load_palettes() -> void:
|
|||
func load_palette(path : String) -> String:
|
||||
var file := File.new()
|
||||
file.open(path, File.READ)
|
||||
|
||||
|
||||
var text = file.get_as_text()
|
||||
var result_json = JSON.parse(text)
|
||||
var result = {}
|
||||
|
@ -139,22 +139,22 @@ func load_palette(path : String) -> String:
|
|||
if data.has("name"):
|
||||
palette_name = data.name
|
||||
Global.palettes[data.name] = data.colors
|
||||
|
||||
|
||||
file.close()
|
||||
|
||||
|
||||
return palette_name
|
||||
|
||||
func _save_palette(palette : Array, name : String, path : String):
|
||||
var file := File.new()
|
||||
file.open(path, File.WRITE)
|
||||
|
||||
|
||||
var data := {}
|
||||
data.name = name
|
||||
data.colors = palette
|
||||
|
||||
|
||||
file.store_string(JSON.print(data))
|
||||
file.close()
|
||||
|
||||
|
||||
pass
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
|
|
@ -61,7 +61,7 @@ func _process(delta : float) -> void:
|
|||
Global.canvas.update_texture(Global.canvas.current_layer_index)
|
||||
tex.create_from_image(img, 0)
|
||||
update()
|
||||
|
||||
|
||||
# Makes line2d invisible
|
||||
if weakref(Global.canvas.line_2d).get_ref(): # Checks to see if line_2d object still exists
|
||||
Global.canvas.line_2d.default_color = Color(0, 0, 0, 0)
|
||||
|
@ -102,7 +102,7 @@ func _process(delta : float) -> void:
|
|||
Global.selected_pixels.append(Vector2(xx, yy))
|
||||
|
||||
Global.canvas.handle_redo("Rectangle Select") #Redo
|
||||
|
||||
|
||||
# Makes line2d visible
|
||||
if weakref(Global.canvas.line_2d).get_ref(): # Checks to see if line_2d object still exists
|
||||
Global.canvas.line_2d.default_color = Color.darkgray
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue