28 lines
430 B
C#
28 lines
430 B
C#
|
|
using Godot;
|
|
using System;
|
|
|
|
namespace Rokojori
|
|
{
|
|
[Tool,GlobalClass]
|
|
public partial class SetUIStyle: Action
|
|
{
|
|
[Export]
|
|
public Control uiNode;
|
|
|
|
[Export]
|
|
public UIStyle style;
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
var uiStyleable = uiNode as UIStylePropertyContainer;
|
|
|
|
if ( uiStyleable == null )
|
|
{
|
|
return;
|
|
}
|
|
|
|
uiStyleable.SetUIStyleParent( style );
|
|
}
|
|
}
|
|
} |