Przeglądaj źródła

Made changes to gd_paint demo based on feedback by aaronfranke

TwistedTwigleg 6 lat temu
rodzic
commit
2c5b4a48d0
2 zmienionych plików z 4 dodań i 2 usunięć
  1. 2 1
      2d/gd_paint/PaintControl.gd
  2. 2 1
      2d/gd_paint/ToolsPanel.gd

+ 2 - 1
2d/gd_paint/PaintControl.gd

@@ -51,7 +51,7 @@ func _ready():
 	set_process(true)
 
 
-func _process(delta):
+func _process(_delta):
 	var mouse_pos = get_viewport().get_mouse_position()
 	
 	# Check if the mouse is currently inside the canvas/drawing-area
@@ -135,6 +135,7 @@ func undo_stroke():
 		# Figure out how many elements/brushes we've added in the last stroke
 		var elements_to_remove = brush_data_list.size() - undo_element_list_num
 		# Remove all of the elements we've added this in the last stroke
+		#warning-ignore:unused_variable
 		for elment_num in range(0, elements_to_remove):
 			brush_data_list.pop_back()
 		

+ 2 - 1
2d/gd_paint/ToolsPanel.gd

@@ -16,6 +16,7 @@ func _ready():
 	paint_control = get_parent().get_node("PaintControl")
 	save_dialog = get_parent().get_node("SaveFileDialog")
 
+	# warning-ignore-all:return_value_discarded
 	# Assign all of the needed signals for the oppersation buttons
 	get_node("ButtonUndo").connect("pressed", self, "button_pressed", ["undo_stroke"])
 	get_node("ButtonSave").connect("pressed", self, "button_pressed", ["save_picture"])
@@ -47,7 +48,7 @@ func _ready():
 	set_physics_process(true)
 
 
-func _physics_process(delta):
+func _physics_process(_delta):
 	# Update the status label with the newest brush element count
 	label_stats.text = "Brush objects: " + String(paint_control.brush_data_list.size())