40 lines
767 B
C#
40 lines
767 B
C#
|
|
using Godot;
|
|
using Rokojori;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
namespace Rokojori;
|
|
|
|
[Tool]
|
|
[GlobalClass]
|
|
public partial class SetFocusedUIAppSettings:Action
|
|
{
|
|
[Export]
|
|
public UIAppSettings uiAppSettings;
|
|
|
|
[Export]
|
|
public UIAppSettingHandler appSettingHandler;
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
if ( uiAppSettings == null || appSettingHandler == null )
|
|
{
|
|
return;
|
|
}
|
|
|
|
var header = uiAppSettings.header;
|
|
|
|
if ( header.settingsInputInfo == null ||
|
|
appSettingHandler.appSetting == null ||
|
|
appSettingHandler.appSetting.title == null
|
|
)
|
|
{
|
|
return;
|
|
}
|
|
|
|
header.settingsInputInfo.locale = appSettingHandler.appSetting.title;
|
|
header.settingsInputInfo.UpdateInfo();
|
|
}
|
|
}
|