diff options
| author | tpart <tpart120@proton.me> | 2025-10-16 23:44:15 +0200 |
|---|---|---|
| committer | tpart <tpart120@proton.me> | 2025-10-16 23:44:20 +0200 |
| commit | bec0c34e5833e247d849fbab2f792570558faab6 (patch) | |
| tree | 9c467dd18a583370d631ec6d1daf4ed660830452 /client | |
| parent | a67e0e4c7842149bce741cf447112cd3da466b91 (diff) | |
| download | hurrycurry-bec0c34e5833e247d849fbab2f792570558faab6.tar hurrycurry-bec0c34e5833e247d849fbab2f792570558faab6.tar.bz2 hurrycurry-bec0c34e5833e247d849fbab2f792570558faab6.tar.zst | |
Tweak protocol version error style in server list
Diffstat (limited to 'client')
| -rw-r--r-- | client/gui/menus/main/server_list_item.gd | 3 | ||||
| -rw-r--r-- | client/gui/resources/style/error_normal_style.tres | 13 |
2 files changed, 16 insertions, 0 deletions
diff --git a/client/gui/menus/main/server_list_item.gd b/client/gui/menus/main/server_list_item.gd index 0cffdd72..1debbc83 100644 --- a/client/gui/menus/main/server_list_item.gd +++ b/client/gui/menus/main/server_list_item.gd @@ -17,6 +17,8 @@ class_name ServerListItem extends PanelContainer var error_style_focus: StyleBoxFlat = preload("res://gui/resources/style/error_focus_style.tres") +var error_style_normal: StyleBoxFlat = preload("res://gui/resources/style/error_normal_style.tres") + @onready var title: Label = $MarginContainer/VBoxContainer/Title @onready var info: Label = $MarginContainer/VBoxContainer/Info @onready var button: Button = $Button @@ -25,6 +27,7 @@ func setup(name_: String, online_players: int, version: Array): title.text = name_ if version[0] != Multiplayer.VERSION_MAJOR or version[1] > Multiplayer.VERSION_MINOR: button.disabled = true + button.add_theme_stylebox_override("disabled", error_style_normal) button.add_theme_stylebox_override("focus", error_style_focus) info.text = tr("c.menu.play.server_version_mismatch") info.add_theme_color_override("font_color", Color("ff2222")) diff --git a/client/gui/resources/style/error_normal_style.tres b/client/gui/resources/style/error_normal_style.tres new file mode 100644 index 00000000..f7bc48fb --- /dev/null +++ b/client/gui/resources/style/error_normal_style.tres @@ -0,0 +1,13 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://c7jksrejojryo"] + +[resource] +content_margin_left = 10.0 +content_margin_top = 10.0 +content_margin_right = 10.0 +content_margin_bottom = 10.0 +bg_color = Color(1, 0, 0, 0.12549) +border_color = Color(1, 0.81804, 0.818076, 1) +corner_radius_top_left = 5 +corner_radius_top_right = 5 +corner_radius_bottom_right = 5 +corner_radius_bottom_left = 5 |