mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 17:19:50 +00:00
Fix GDScript warnings pertaining to unused arguments
Those warnings can be ignored by prefixing the argument with an underscore.
This commit is contained in:
parent
e06586edce
commit
386473845e
|
@ -885,4 +885,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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue