rokojori_action_library/Runtime/App/Settings/AppSettings.cs

35 lines
614 B
C#
Raw Normal View History

2026-02-26 14:06:27 +00:00
using Godot;
using System.Collections.Generic;
namespace Rokojori
{
[Tool]
[GlobalClass]
public partial class AppSettings:Resource
{
[Export]
public AppSettingsCategory[] categories = [];
public void ApplySetting( App app, string key, string value )
{
app.SetSetting( key, value );
categories.ForEach(
( c )=>
{
c.settings.ForEach(
( s)=>
{
if ( s.id != key )
{
return;
}
s.ApplyValue( app );
}
);
}
);
}
}
}