- The search field is a single-line field, so Enter no longer adds a
line break that made every search come up empty.
- The field, button and list use real font sizes from the theme instead
of being drawn at half size and scaled up, so the text is sharp, and
everything fits inside the panel.
- Results have alternating row backgrounds like the other lists, a count
("3 of 1045 soundtracks") and a message when nothing matches.
- The letters that matched are highlighted.
- Searches shorter than Settings.LETTERS_FOR_LOOSE_SEARCH (3) only find
names that contain the text, instead of names with the letters far
apart, which matched most of the library. The Statistics tab uses the
same search.
79 lines
2.2 KiB
Plaintext
79 lines
2.2 KiB
Plaintext
[gd_scene format=3 uid="uid://bxydgil1yifps"]
|
|
|
|
[ext_resource type="Script" uid="uid://bg5yo08638600" path="res://popups/search_popup.gd" id="1_m7bij"]
|
|
|
|
[node name="SearchPopup" type="Control" unique_id=616238617 node_paths=PackedStringArray("panel")]
|
|
layout_mode = 3
|
|
anchors_preset = 15
|
|
anchor_right = 1.0
|
|
anchor_bottom = 1.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
script = ExtResource("1_m7bij")
|
|
panel = NodePath("SearchPanel")
|
|
|
|
[node name="SearchPanel" type="Panel" parent="." unique_id=1262945994]
|
|
unique_name_in_owner = true
|
|
layout_mode = 0
|
|
offset_right = 1152.0
|
|
offset_bottom = 880.0
|
|
theme_type_variation = &"PopupBackground"
|
|
|
|
[node name="TopRow" type="HBoxContainer" parent="SearchPanel" unique_id=1262945995]
|
|
layout_mode = 0
|
|
offset_left = 24.0
|
|
offset_top = 24.0
|
|
offset_right = 1128.0
|
|
offset_bottom = 80.0
|
|
theme_override_constants/separation = 16
|
|
|
|
[node name="SearchField" type="LineEdit" parent="SearchPanel/TopRow" unique_id=2112669372]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
theme_type_variation = &"SearchField"
|
|
placeholder_text = "Search"
|
|
caret_blink = true
|
|
|
|
[node name="ClearButton" type="Button" parent="SearchPanel/TopRow" unique_id=1549439398]
|
|
unique_name_in_owner = true
|
|
custom_minimum_size = Vector2(140, 0)
|
|
layout_mode = 2
|
|
focus_mode = 0
|
|
theme_type_variation = &"LargeButton"
|
|
action_mode = 0
|
|
text = "Clear"
|
|
|
|
[node name="CountLabel" type="Label" parent="SearchPanel" unique_id=1262945996]
|
|
unique_name_in_owner = true
|
|
layout_mode = 0
|
|
offset_left = 24.0
|
|
offset_top = 90.0
|
|
offset_right = 1128.0
|
|
offset_bottom = 116.0
|
|
|
|
[node name="ScrollContainer" type="ScrollContainer" parent="SearchPanel" unique_id=213733486]
|
|
layout_mode = 0
|
|
offset_left = 24.0
|
|
offset_top = 124.0
|
|
offset_right = 1128.0
|
|
offset_bottom = 856.0
|
|
horizontal_scroll_mode = 0
|
|
|
|
[node name="SearchResults" type="VBoxContainer" parent="SearchPanel/ScrollContainer" unique_id=1567403144]
|
|
unique_name_in_owner = true
|
|
layout_mode = 2
|
|
size_flags_horizontal = 3
|
|
|
|
[node name="EmptyLabel" type="Label" parent="SearchPanel" unique_id=1262945997]
|
|
unique_name_in_owner = true
|
|
visible = false
|
|
layout_mode = 0
|
|
offset_left = 24.0
|
|
offset_top = 160.0
|
|
offset_right = 1128.0
|
|
offset_bottom = 200.0
|
|
theme_type_variation = &"Title"
|
|
text = "No soundtracks found"
|
|
horizontal_alignment = 1
|