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

Merge pull request #96 from Calinou/fix-gdscript-warnings

Fix GDScript warnings pertaining to unused arguments
This commit is contained in:
Overloaded 2019-12-27 17:19:03 +02:00 committed by GitHub
commit 080676ac83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 6 additions and 7 deletions

View file

@ -889,4 +889,4 @@ func blend_rect(bg : Image, brush : Image, src_rect : Rect2, dst : Vector2) -> v
out_color.r = (brush_color.r * brush_color.a + bg_color.r * bg_color.a * (1 - brush_color.a)) / out_color.a
out_color.g = (brush_color.g * brush_color.a + bg_color.g * bg_color.a * (1 - brush_color.a)) / out_color.a
out_color.b = (brush_color.b * brush_color.a + bg_color.b * bg_color.a * (1 - brush_color.a)) / out_color.a
bg.set_pixel(dst_x, dst_y, out_color)
bg.set_pixel(dst_x, dst_y, out_color)

View file

@ -82,4 +82,4 @@ func _on_VisibilityButton_pressed() -> void:
func _on_LineEdit_text_changed(new_text : String) -> void:
Global.canvas.layers[i][2] = new_text
label.text = new_text
label.text = new_text

View file

@ -115,5 +115,5 @@ func _on_EditPaletteColorPicker_color_changed(color : Color) -> void:
working_palette.set_color(current_swatch, color)
_refresh_hint_tooltip(current_swatch)
func _refresh_hint_tooltip(index : int):
func _refresh_hint_tooltip(_index : int):
palette_grid.get_child(current_swatch).hint_tooltip = "#" + working_palette.get_color_data(current_swatch).to_upper() + " " + working_palette.get_color_name(current_swatch)

View file

@ -7,7 +7,7 @@ export var draggable := false
var drag_preview_texture = preload("res://Assets/Graphics/Palette/swatch_drag_preview.png")
func get_drag_data(position):
func get_drag_data(_position):
var data = null;
if(draggable):
#print(String(get_instance_id()) + ": Drag Start");
@ -18,8 +18,8 @@ func get_drag_data(position):
set_drag_preview(drag_icon);
return data;
func can_drop_data(position, data):
func can_drop_data(_position, _data):
return true;
func drop_data(position, data):
func drop_data(_position, data):
emit_signal("on_drop_data", data.source_index, index);

View file

@ -43,7 +43,6 @@ func on_import_palette() -> void:
Global.palette_import_file_dialog.popup_centered()
func on_palette_import_file_selected(path) -> void:
var file := File.new()
var palette : Palette = null
if path.to_lower().ends_with("json"):
palette = Palette.new().load_from_file(path)