Unify fonts, chooser background & hover

This commit is contained in:
2025-09-06 05:29:11 +02:00
parent 797ac739d4
commit 8a7624e807
6 changed files with 30 additions and 31 deletions

View File

@@ -0,0 +1 @@
uid://dpynhyggey3bb

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://v5lk1jcyag2q"]
[ext_resource type="Theme" uid="uid://bf2eet52fueam" path="res://addons/escoria-ui-return-monkey-island/theme.tres" id="1_k44u5"]
[node name="Button" type="Button"]
theme = ExtResource("1_k44u5")

View File

@@ -2,6 +2,8 @@
# Supports timeout and avatar display
extends ESCDialogOptionsChooser
const chooserButton = preload("res://addons/escoria-ui-return-monkey-island-dialog-simple/chooser/ChooserButton.tscn")
@export var color_normal = Color(1.0,1.0,1.0,1.0) # (Color, RGB)
@export var color_hover = Color(165.0,42.0,42.0, 1.0) # (Color, RGB)
@@ -36,11 +38,8 @@ func show_chooser():
for option in self.dialog.options:
if option.is_valid():
var _option_node = Button.new()
var _option_node = chooserButton.instantiate()
_option_node.text = (option as ESCDialogOption).option
_option_node.flat = true
_option_node.add_theme_color_override("font_color", color_normal)
_option_node.add_theme_color_override("font_color_hover", color_hover)
_vbox.add_child(_option_node)
_option_node.pressed.connect(_on_answer_selected.bind(option))

View File

@@ -11,19 +11,27 @@ gradient = SubResource("1")
[node name="text_dialog_choice" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 560.0
offset_right = 7.0
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = 313.0
offset_top = 191.0
offset_right = 313.0
offset_bottom = 191.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 6
theme = ExtResource("2")
script = ExtResource("1")
color_hover = Color(0.0704665, 0.552225, 0, 1)
[node name="MarginContainer" type="MarginContainer" parent="."]
clip_contents = true
layout_mode = 0
offset_left = 20.0
offset_left = 2.0
offset_top = 10.0
offset_right = 1280.0
offset_bottom = 185.0
@@ -36,8 +44,8 @@ layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_horizontal = 4
size_flags_vertical = 6
theme_override_constants/separation = 10
[node name="Timer" type="Timer" parent="."]

View File

@@ -1,19 +1,7 @@
[gd_resource type="Theme" load_steps=3 format=3 uid="uid://dvwfrnya2nhxu"]
[gd_resource type="Theme" load_steps=2 format=3 uid="uid://dvwfrnya2nhxu"]
[ext_resource type="FontFile" uid="uid://cne31d6e0513y" path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.tres" id="1"]
[sub_resource type="StyleBoxFlat" id="1"]
content_margin_left = 5.0
content_margin_top = 5.0
content_margin_right = 5.0
content_margin_bottom = 5.0
bg_color = Color(0, 0, 0, 0.815686)
corner_radius_top_left = 8
corner_radius_top_right = 8
corner_radius_bottom_right = 8
corner_radius_bottom_left = 8
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4wcyb"]
[resource]
default_font = ExtResource("1")
RichTextLabel/styles/normal = SubResource("1")
RichTextLabel/styles/fill = SubResource("StyleBoxFlat_4wcyb")
VBoxContainer/constants/separation = 1

View File

@@ -1,6 +1,4 @@
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://bf2eet52fueam"]
[ext_resource type="FontFile" uid="uid://cne31d6e0513y" path="res://addons/escoria-ui-return-monkey-island/fonts/caslonantique.tres" id="1"]
[gd_resource type="Theme" load_steps=4 format=3 uid="uid://bf2eet52fueam"]
[sub_resource type="StyleBoxFlat" id="1"]
content_margin_left = 4.0
@@ -31,7 +29,6 @@ expand_margin_right = 5.0
expand_margin_bottom = 5.0
[resource]
default_font = ExtResource("1")
Label/colors/font_color = Color(1, 1, 1, 1)
Label/colors/font_color_shadow = Color(0, 0, 0, 0)
Label/colors/font_outline_modulate = Color(1, 0, 0, 1)