answer button now grabs focus on hover
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=9 format=3 uid="uid://cv87js42t1sty"]
|
[gd_scene load_steps=10 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="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"]
|
[ext_resource type="Texture2D" uid="uid://boxc677b5i605" path="res://assets/textures/dialogue/circle.png" id="2_tkpfr"]
|
||||||
@@ -18,6 +18,13 @@ content_margin_top = 8.0
|
|||||||
resource_local_to_scene = false
|
resource_local_to_scene = false
|
||||||
resource_name = "answer_buttons"
|
resource_name = "answer_buttons"
|
||||||
|
|
||||||
|
[sub_resource type="GDScript" id="GDScript_nhv51"]
|
||||||
|
resource_name = "button"
|
||||||
|
script/source = "extends Button
|
||||||
|
func _process(_delta):
|
||||||
|
if(is_hovered()): grab_focus()
|
||||||
|
"
|
||||||
|
|
||||||
[node name="answer_button" type="Button"]
|
[node name="answer_button" type="Button"]
|
||||||
custom_minimum_size = Vector2(100, 32)
|
custom_minimum_size = Vector2(100, 32)
|
||||||
theme_override_colors/icon_normal_color = Color(0, 0, 0, 0)
|
theme_override_colors/icon_normal_color = Color(0, 0, 0, 0)
|
||||||
@@ -36,3 +43,4 @@ theme_override_styles/focus = SubResource("StyleBoxEmpty_trdc6")
|
|||||||
button_group = SubResource("ButtonGroup_y8j7j")
|
button_group = SubResource("ButtonGroup_y8j7j")
|
||||||
icon = ExtResource("2_tkpfr")
|
icon = ExtResource("2_tkpfr")
|
||||||
alignment = 0
|
alignment = 0
|
||||||
|
script = SubResource("GDScript_nhv51")
|
||||||
|
@@ -14,8 +14,7 @@ public partial class dialog_bubble : CanvasLayer
|
|||||||
- Dont repeat the same randomized dialogue after you get asked do you need something "else"
|
- Dont repeat the same randomized dialogue after you get asked do you need something "else"
|
||||||
- add tree support (example: "story" key)
|
- add tree support (example: "story" key)
|
||||||
- ability to add dialogue begin answers on the fly (special ones are colored)
|
- ability to add dialogue begin answers on the fly (special ones are colored)
|
||||||
they will be in a dictionary with event IDs or Dictionary keys it also needs an array wich ones are active
|
they will be in a dictionary with event IDs or Dictionary keys it also needs an array wich ones are active*/
|
||||||
- focus answer button on mouse hover and add focus sounds*/
|
|
||||||
public override void _Ready()
|
public override void _Ready()
|
||||||
{
|
{
|
||||||
richText = GetNode<RichTextLabel>("box/rich_text_label");
|
richText = GetNode<RichTextLabel>("box/rich_text_label");
|
||||||
|
Reference in New Issue
Block a user