mouse focus dialog

new dialog choice buttons, mouse focus fix
This commit is contained in:
dukegoobler 2023-01-04 18:48:09 -07:00
parent 19391f2aca
commit 619f18fde3
11 changed files with 22 additions and 29 deletions

View File

@ -6,7 +6,6 @@
[node name="Dialog" type="Control"] [node name="Dialog" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
mouse_filter = 1
script = ExtResource( 2 ) script = ExtResource( 2 )
__meta__ = { __meta__ = {
"_edit_use_anchors_": false "_edit_use_anchors_": false

View File

@ -22,6 +22,7 @@ image = SubResource( 4 )
size = Vector2( 16, 16 ) size = Vector2( 16, 16 )
[node name="CloseDialog" instance=ExtResource( 1 )] [node name="CloseDialog" instance=ExtResource( 1 )]
mouse_filter = 0
event_name = "Close Dialog" event_name = "Close Dialog"
event_data = { event_data = {
"event_id": "dialogic_022", "event_id": "dialogic_022",

View File

@ -23,7 +23,6 @@ extents = Vector2( 1024, 600 )
[node name="DialogNode" type="Control"] [node name="DialogNode" type="Control"]
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
mouse_filter = 1
script = ExtResource( 6 ) script = ExtResource( 6 )
[node name="Portraits" type="Control" parent="."] [node name="Portraits" type="Control" parent="."]

View File

@ -60,7 +60,6 @@ margin_left = -455.0
margin_top = 399.0 margin_top = 399.0
margin_right = 455.0 margin_right = 455.0
margin_bottom = 560.0 margin_bottom = 560.0
mouse_filter = 1
script = ExtResource( 4 ) script = ExtResource( 4 )
[node name="ColorRect" type="ColorRect" parent="."] [node name="ColorRect" type="ColorRect" parent="."]

View File

@ -9,12 +9,6 @@
"type": 0, "type": 0,
"value": "false" "value": "false"
}, },
{
"id": "1667711785-428",
"name": "won game",
"type": 0,
"value": "false"
},
{ {
"id": "1667703692-648", "id": "1667703692-648",
"name": "seen intro", "name": "seen intro",
@ -62,6 +56,12 @@
"name": "meat_creek_tutorial_given", "name": "meat_creek_tutorial_given",
"type": 0, "type": 0,
"value": "false" "value": "false"
},
{
"id": "1667711785-428",
"name": "won game",
"type": 0,
"value": "false"
} }
] ]
} }

View File

@ -12,10 +12,10 @@ shadow_offset=Vector2( 7, 2 )
[buttons] [buttons]
normal=[ true, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] normal=[ true, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", true, Color( 0.764706, 0.764706, 0.764706, 1 ) ]
hover=[ true, Color( 0.717647, 0.717647, 0.717647, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] hover=[ true, Color( 0.717647, 0.717647, 0.717647, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", true, Color( 0.847059, 0.847059, 0.847059, 1 ) ]
focus=[ true, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] focus=[ true, Color( 0.811765, 0.811765, 0.811765, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", true, Color( 1, 1, 1, 1 ) ]
pressed=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] pressed=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://assets/Button07.png", false, Color( 1, 1, 1, 1 ) ]
disabled=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ] disabled=[ false, Color( 1, 1, 1, 1 ), false, Color( 0, 0, 0, 1 ), true, "res://addons/dialogic/Example Assets/backgrounds/background-2.png", false, Color( 1, 1, 1, 1 ) ]
layout=1 layout=1
fixed=true fixed=true

View File

@ -1,14 +1,8 @@
{ {
"events": [ "events": [
{ {
"call_node": { "emit_signal": "",
"arguments": [ "event_id": "dialogic_040"
"MOUSE_MODE_VISIBLE"
],
"method_name": "set_mouse_mode",
"target_node_path": "Player"
},
"event_id": "dialogic_042"
}, },
{ {
"event_id": "dialogic_024", "event_id": "dialogic_024",

View File

@ -155,6 +155,10 @@
"portrait": "", "portrait": "",
"text": "(Manos falls limp) " "text": "(Manos falls limp) "
}, },
{
"emit_signal": "death",
"event_id": "dialogic_040"
},
{ {
"character": "character-1667667675.json", "character": "character-1667667675.json",
"event_id": "dialogic_001", "event_id": "dialogic_001",

View File

@ -44,9 +44,9 @@
}, },
{ {
"event_id": "dialogic_015", "event_id": "dialogic_015",
"id": "anchor-1634488067", "id": "anchor-1672883201",
"index": 0, "index": 0,
"name": "voss_questions" "name": "questions"
}, },
{ {
"character": "character-1667667711.json", "character": "character-1667667711.json",
@ -101,7 +101,7 @@
"text": "[wave amp=50 freq=2]You wouldnt want to anger Mother, would you John?[/wave]" "text": "[wave amp=50 freq=2]You wouldnt want to anger Mother, would you John?[/wave]"
}, },
{ {
"anchor_id": "anchor-1634488067", "anchor_id": "anchor-1672883201",
"event_id": "dialogic_016" "event_id": "dialogic_016"
}, },
{ {
@ -160,7 +160,7 @@
"text": "[wave amp=50 freq=2]Wont you join us? Wont you make Mother happy?[/wave]" "text": "[wave amp=50 freq=2]Wont you join us? Wont you make Mother happy?[/wave]"
}, },
{ {
"anchor_id": "anchor-1634488067", "anchor_id": "anchor-1672883201",
"event_id": "dialogic_016" "event_id": "dialogic_016"
}, },
{ {

View File

@ -22,7 +22,7 @@ func _input(event):
if Input.is_action_just_pressed("ui_cancel"): if Input.is_action_just_pressed("ui_cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
else: else:
if event is InputEventMouseButton: if event is InputEventMouseButton and Input.is_action_just_pressed("ui cancel"):
Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED)
var look_relative = Vector2( var look_relative = Vector2(

View File

@ -43,9 +43,6 @@ func _process(_delta):
$OnFootPhysics.can_glide = can_glide $OnFootPhysics.can_glide = can_glide
$OnFootPhysics.can_float = can_float $OnFootPhysics.can_float = can_float
func set_mouse_mode(mode):
Input.set_mouse_mode(Input.mode)