Skip to content

Commit 051e3f7

Browse files
committed
Simplify EventScene Process
Better handling different continue container for grab focus
1 parent a2d830d commit 051e3f7

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

Scenes/EventScene/EventScene.cs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,12 @@ public override void _Ready()
4848

4949
public override void _Process(double delta)
5050
{
51-
if (GetViewport().GuiGetFocusOwner() == null && _buttonContainer != null)
51+
if (GetViewport().GuiGetFocusOwner() == null)
5252
{
53-
_buttonContainer.GetChild<Control>(0).GrabFocus();
54-
}
55-
56-
if (_eventDescription.Text == "")
57-
{
58-
_eventDescription.Text = _eventReference.OutcomeDescriptions[_updateOutputIndex];
53+
if (_continueContainer.Visible)
54+
_continueButton.GrabFocus();
55+
else
56+
_buttonContainer.GetChild<Control>(0).GrabFocus();
5957
}
6058
}
6159

0 commit comments

Comments
 (0)