diff --git a/src/equipment/mp3_player/mp3_controller.tscn b/src/equipment/mp3_player/mp3_controller.tscn index e8f5fbf..faff264 100644 --- a/src/equipment/mp3_player/mp3_controller.tscn +++ b/src/equipment/mp3_player/mp3_controller.tscn @@ -229,6 +229,7 @@ text = "" [node name="RetroSelectorList" parent="." instance=ExtResource("3_n8ehr")] unique_name_in_owner = true offset_bottom = 11.0 +options = Array[String](["aaa", "bbb", "ccc", "defghijk"]) [node name="TransitionPlayer" type="AnimationPlayer" parent="."] unique_name_in_owner = true diff --git a/src/equipment/mp3_player/retro_selector_list.gd b/src/equipment/mp3_player/retro_selector_list.gd index 173997c..438090f 100644 --- a/src/equipment/mp3_player/retro_selector_list.gd +++ b/src/equipment/mp3_player/retro_selector_list.gd @@ -32,6 +32,19 @@ func _ready() -> void: rebuild_list() +## This is a workaround for an issue with the clipping boundary +func _hide_unselected() -> void: + for i: int in title_list.get_child_count(): + if i != selection_idx: + (title_list.get_child(i) as CanvasItem).modulate = Color.TRANSPARENT + + +func _show_all() -> void: + for n: Node in title_list.get_children(): + if n is CanvasItem: + (n as CanvasItem).modulate = Color.WHITE + + func rebuild_list() -> void: # Remove any existing items for c: Node in title_list.get_children(): @@ -69,6 +82,7 @@ func expand() -> Tween: . set_ease(Tween.EASE_OUT) ) _active_tween = tween + _show_all() selection_mask.show() return tween @@ -104,6 +118,7 @@ func contract() -> Tween: . set_trans(Tween.TRANS_CUBIC) . set_ease(Tween.EASE_OUT) ) + tween.chain().tween_callback(_hide_unselected) return tween