styled answerbox

This commit is contained in:
2023-02-04 14:03:32 +01:00
parent fdd150d8ac
commit d204d15f4a
7 changed files with 121 additions and 20 deletions

View File

@@ -1,7 +1,8 @@
[gd_scene load_steps=4 format=3 uid="uid://bkm7365u1mm3o"]
[gd_scene load_steps=5 format=3 uid="uid://bkm7365u1mm3o"]
[ext_resource type="Script" path="res://src/scene-scripts/dialogue-system/dialog_bubble.cs" id="1_xtj1q"]
[ext_resource type="FontFile" uid="uid://cx6bvqk0ghmjv" path="res://assets/fonts/urbane-rounded-medium.otf" id="2_qrihj"]
[ext_resource type="Texture2D" uid="uid://04pdpdvkg2s" path="res://assets/textures/dialogue/dialogue_answer_ninepatch.png" id="3_n3y1v"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5w2xu"]
@@ -26,6 +27,7 @@ offset_right = -40.651
offset_bottom = 19.6479
grow_horizontal = 2
grow_vertical = 0
color = Color(0.0705882, 0.0705882, 0.0705882, 1)
[node name="rich_text_label" type="RichTextLabel" parent="box"]
layout_mode = 1
@@ -40,7 +42,7 @@ offset_right = 0.219971
offset_bottom = 0.10199
grow_horizontal = 2
grow_vertical = 0
theme_override_colors/default_color = Color(0, 0, 0, 1)
theme_override_colors/default_color = Color(1, 1, 1, 1)
theme_override_fonts/normal_font = ExtResource("2_qrihj")
theme_override_font_sizes/normal_font_size = 32
theme_override_font_sizes/bold_font_size = 80
@@ -58,7 +60,7 @@ offset_left = 0.0499992
offset_top = -0.0229998
offset_right = 0.389984
offset_bottom = 0.118996
theme_override_colors/font_color = Color(0, 0, 0, 1)
theme_override_colors/font_color = Color(1, 1, 1, 1)
theme_override_fonts/font = ExtResource("2_qrihj")
theme_override_font_sizes/font_size = 36
text = "???"
@@ -71,10 +73,10 @@ anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -307.0
offset_top = -304.0
offset_right = 15.0
offset_bottom = -231.0
offset_left = -146.0
offset_top = -337.0
offset_right = 34.0
offset_bottom = -237.0
grow_horizontal = 0
grow_vertical = 0
size_flags_horizontal = 8
@@ -83,21 +85,18 @@ theme_override_styles/panel = SubResource("StyleBoxEmpty_5w2xu")
[node name="nine_patch_rect" type="NinePatchRect" parent="box/panel_container"]
layout_mode = 2
texture = ExtResource("3_n3y1v")
patch_margin_left = 50
patch_margin_top = 50
patch_margin_right = 50
patch_margin_bottom = 50
[node name="margin_container" type="MarginContainer" parent="box/panel_container"]
layout_mode = 2
theme_override_constants/margin_left = 15
theme_override_constants/margin_top = 15
theme_override_constants/margin_right = 15
theme_override_constants/margin_bottom = 15
theme_override_constants/margin_left = 40
theme_override_constants/margin_top = 30
theme_override_constants/margin_right = 60
theme_override_constants/margin_bottom = 30
[node name="v_box_container" type="VBoxContainer" parent="box/panel_container/margin_container"]
layout_mode = 2
[node name="button" type="Button" parent="box/panel_container/margin_container/v_box_container"]
custom_minimum_size = Vector2(128, 32)
layout_mode = 2
theme_override_fonts/font = ExtResource("2_qrihj")
theme_override_font_sizes/font_size = 28
text = "---"
alignment = 0

View File

@@ -0,0 +1,34 @@
[gd_scene load_steps=8 format=3 uid="uid://cv87js42t1sty"]
[ext_resource type="FontFile" uid="uid://cx6bvqk0ghmjv" path="res://assets/fonts/urbane-rounded-medium.otf" id="1_2bkol"]
[ext_resource type="Texture2D" uid="uid://boxc677b5i605" path="res://assets/textures/dialogue/circle.png" id="2_tkpfr"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_mvyo0"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_h66dw"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_2axga"]
content_margin_top = 8.0
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_s6xfc"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_trdc6"]
[node name="answer_button" type="Button"]
custom_minimum_size = Vector2(100, 32)
focus_mode = 0
theme_override_colors/icon_normal_color = Color(0, 0, 0, 0)
theme_override_colors/icon_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_color = Color(1, 1, 1, 1)
theme_override_colors/icon_hover_pressed_color = Color(1, 1, 1, 1)
theme_override_colors/icon_focus_color = Color(1, 1, 1, 1)
theme_override_colors/icon_disabled_color = Color(0, 0, 0, 0)
theme_override_fonts/font = ExtResource("1_2bkol")
theme_override_font_sizes/font_size = 28
theme_override_styles/normal = SubResource("StyleBoxEmpty_mvyo0")
theme_override_styles/hover = SubResource("StyleBoxEmpty_h66dw")
theme_override_styles/pressed = SubResource("StyleBoxEmpty_2axga")
theme_override_styles/disabled = SubResource("StyleBoxEmpty_s6xfc")
theme_override_styles/focus = SubResource("StyleBoxEmpty_trdc6")
icon = ExtResource("2_tkpfr")
alignment = 0

View File

@@ -9,7 +9,7 @@
tile_set = ExtResource("1_a172k")
cell_quadrant_size = 128
format = 2
layer_0/tile_data = PackedInt32Array(-65535, 65536, 1, -131071, 65536, 1, -65536, 65536, 1, -131072, 65536, 1, -1, 65536, 1, -65537, 65536, 1, 3, 131072, 2, -65533, 131072, 1, -131069, 131072, 1, 2, 65536, 2, -65534, 65536, 1, -131070, 65536, 1, 1, 65536, 2, 0, 65536, 2, 65535, 65536, 2, 65534, 0, 2, -2, 0, 1, -65538, 0, 1, -65540, 131072, 0, -65541, 65536, 0, -5, 65536, 1, -6, 0, 1, -65542, 0, 0, 65530, 0, 2, 65531, 65536, 2, -4, 131072, 1, 65532, 131072, 2, -196605, 131072, 0, -196606, 65536, 0, -196607, 65536, 0, -196608, 65536, 0, -131073, 65536, 0, -131074, 0, 0)
layer_0/tile_data = PackedInt32Array(-65535, 65536, 1, -131071, 65536, 1, -65536, 65536, 1, -131072, 65536, 1, -1, 65536, 1, -65537, 65536, 1, 3, 131072, 1, -65533, 131072, 1, -131069, 131072, 1, 2, 65536, 1, -65534, 65536, 1, -131070, 65536, 1, 1, 65536, 1, 0, 65536, 1, 65535, 65536, 1, 65534, 65536, 1, -2, 65536, 1, -65538, 65536, 1, -65540, 65536, 1, -65541, 65536, 1, -5, 65536, 1, -6, 0, 1, -65542, 0, 1, 65530, 0, 1, 65531, 65536, 1, -4, 65536, 1, 65532, 65536, 1, -196605, 131072, 0, -196606, 65536, 0, -196607, 65536, 0, -196608, 65536, 0, -131073, 65536, 0, -131074, 65536, 0, 131070, 65536, 2, 131071, 65536, 2, 65536, 65536, 2, 65537, 65536, 2, 65538, 65536, 2, 65539, 131072, 2, 131069, 65536, 2, 65533, 65536, 1, -3, 65536, 1, -65539, 65536, 1, -131075, 65536, 0, -131076, 65536, 0, -131077, 65536, 0, -131078, 0, 0, 131068, 65536, 2, 131067, 65536, 2, 131066, 0, 2)
[node name="foreground" type="TileMap" parent="."]
y_sort_enabled = true