aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/gui/menus/main/server_list_item.gd3
-rw-r--r--client/gui/resources/style/error_normal_style.tres13
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