1- [gd_scene load_steps =2 format =3 uid ="uid://4n0eqw25becg" ]
1+ [gd_scene load_steps =6 format =3 uid ="uid://4n0eqw25becg" ]
2+
3+ [ext_resource type ="Texture2D" uid ="uid://j2fymrfv4c3r" path ="res://resources/icons/lock.svg" id ="1_47dd4" ]
4+ [ext_resource type ="Texture2D" uid ="uid://clqecwtwyaubp" path ="res://resources/icons/join.svg" id ="1_avfqc" ]
5+ [ext_resource type ="Texture2D" uid ="uid://6a7vvotwb3rt" path ="res://resources/icons/delete.svg" id ="1_c5nld" ]
6+ [ext_resource type ="Texture2D" uid ="uid://bdrspgruqn4ft" path ="res://resources/icons/hide.svg" id ="1_s7umg" ]
27
38[sub_resource type ="GDScript" id ="GDScript_xkt7l" ]
49script/source = "extends Control
@@ -27,6 +32,11 @@ script/source = "extends Control
2732@onready var modal_message_label : Label = % \"Message Label\"
2833@onready var modal_confirm_button : Button = % \"Confirm Button\"
2934
35+ var lock_icon := preload (\"res://resources/icons/lock.svg\") as Texture2D
36+ var unlock_icon := preload (\"res://resources/icons/unlock.svg\") as Texture2D
37+ var hide_icon := preload (\"res://resources/icons/hide.svg\") as Texture2D
38+ var publish_icon := preload (\"res://resources/icons/publish.svg\") as Texture2D
39+
3040var list_interval : float = 2.0
3141var time : float = 0.0
3242
@@ -42,11 +52,16 @@ func set_selected_lobby(lobby: NohubLobby) -> void:
4252 if is_instance_valid (lobby ):
4353 selected_lobby_label .text = lobby .id
4454 lock_lobby_button .text = \"Unlock\" if lobby.is_locked else \"Lock\"
55+ lock_lobby_button .icon = unlock_icon if lobby .is_locked else lock_icon
56+
4557 hide_lobby_button .text = \"Hide\" if lobby.is_visible else \"Publish\"
58+ hide_lobby_button .icon = hide_icon if lobby .is_visible else publish_icon
4659 else :
4760 selected_lobby_label .text = \"\"
4861 lock_lobby_button .text = \"Lock\"
62+ lock_lobby_button .icon = lock_icon
4963 hide_lobby_button .text = \"Hide\"
64+ hide_lobby_button .icon = hide_icon
5065
5166func get_selected_lobby () -> NohubLobby :
5267 return _selected_lobby
@@ -249,12 +264,12 @@ func _update_list() -> void:
249264 lobby_list .add_item (\"Hidden?\", null, false)
250265 lobby_list .add_item (\"Data\", null, false)
251266
252- # Add lobbies that are not in the list yet
267+ # Add lobbies
253268 for lobby in lobbies :
254269 lobby_list .add_item (lobby .id )
255270 lobby_list .add_item (lobby .data .get (\"name\", \"\"))
256- lobby_list .add_item (\"Locked\" if lobby.is_locked else \"Open\")
257- lobby_list .add_item (\"Hidden\" if not lobby.is_visible else \"Public\")
271+ lobby_list .add_item (\"Locked\" if lobby.is_locked else \"Open\", lock_icon if lobby.is_locked else unlock_icon )
272+ lobby_list .add_item (\"Hidden\" if not lobby.is_visible else \"Public\", hide_icon if not lobby.is_visible else publish_icon )
258273 lobby_list .add_item (JSON .stringify (lobby .data ))
259274
260275 _lobbies_in_list .assign (lobbies )
@@ -372,9 +387,11 @@ layout_mode = 2
372387size_flags_horizontal = 3
373388size_flags_vertical = 3
374389max_text_lines = 4
390+ auto_height = true
375391max_columns = 5
376392same_column_width = true
377393fixed_column_width = 160
394+ fixed_icon_size = Vector2i(20, 20)
378395
379396[node name=" Tools " type=" HBoxContainer " parent=" Browser UI / VBoxContainer "]
380397layout_mode = 2
@@ -428,24 +445,32 @@ unique_name_in_owner = true
428445layout_mode = 2
429446size_flags_horizontal = 3
430447text = " Lock "
448+ icon = ExtResource(" 1_47 dd4 ")
449+ expand_icon = true
431450
432451[node name=" Hide Lobby Button " type=" Button " parent=" Browser UI / VBoxContainer / Tools / Tools Container / Rows / Tools Row "]
433452unique_name_in_owner = true
434453layout_mode = 2
435454size_flags_horizontal = 3
436455text = " Hide "
456+ icon = ExtResource(" 1_ s7 umg")
457+ expand_icon = true
437458
438459[node name=" Join Lobby Button " type=" Button " parent=" Browser UI / VBoxContainer / Tools / Tools Container / Rows / Tools Row "]
439460unique_name_in_owner = true
440461layout_mode = 2
441462size_flags_horizontal = 3
442463text = " Join "
464+ icon = ExtResource(" 1_ avfqc")
465+ expand_icon = true
443466
444467[node name=" Delete Lobby Button " type=" Button " parent=" Browser UI / VBoxContainer / Tools / Tools Container / Rows / Tools Row "]
445468unique_name_in_owner = true
446469layout_mode = 2
447470size_flags_horizontal = 3
448471text = " Delete "
472+ icon = ExtResource(" 1_ c5 nld")
473+ expand_icon = true
449474
450475[node name=" Modal " type=" PopupPanel " parent=" ."]
451476unique_name_in_owner = true
0 commit comments