rokojori_action_library/Runtime/UI/Actions/SetFocusedControl.cs

28 lines
377 B
C#
Raw Normal View History

2026-02-26 14:06:27 +00:00
using Godot;
using System;
namespace Rokojori;
[Tool,GlobalClass]
public partial class SetFocusedControl: Action
{
[Export]
public Control control;
protected override void _OnTrigger()
{
this.CallDeferred(
()=>
{
control.GrabFocus();
control.LogInfo( "Grabbing Focus:", control.HasFocus() );
}
);
}
}