fix: card_board was unable to return a solid Array[Draggable]
This commit is contained in:
parent
6d72a09e1d
commit
06b06d8ada
|
|
@ -19,4 +19,3 @@ func set_line(line : StringName):
|
|||
$TrainModel/traun_hull.material_overlay = materials[line]
|
||||
$TrainModel/LineLabelBack.text = line.to_upper()
|
||||
$TrainModel/LineLabelFront.text = line.to_upper()
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -545,15 +545,22 @@ var dropzone_size: Vector2:
|
|||
var _selection_candidates : Array[Draggable]:
|
||||
get:
|
||||
match selection_state:
|
||||
SelectionState.CARDS: return cards as Array[Draggable]
|
||||
SelectionState.STICKIES: return notes as Array[Draggable]
|
||||
SelectionState.CARDS:
|
||||
return as_draggable(cards)
|
||||
SelectionState.STICKIES:
|
||||
return as_draggable(notes)
|
||||
SelectionState.FREE:
|
||||
print("switching from free selection to guided stickies selection")
|
||||
|
||||
# Otherwise default to sticky selection
|
||||
selection_state = SelectionState.STICKIES
|
||||
return notes as Array[Draggable]
|
||||
return as_draggable(notes)
|
||||
|
||||
func as_draggable(items : Array) -> Array[Draggable]:
|
||||
var result : Array[Draggable] = []
|
||||
for item in items:
|
||||
result.append(item)
|
||||
return result
|
||||
|
||||
# === Util ===
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue