refactor: redesign project structure

This commit is contained in:
h z
2025-02-16 22:36:38 +00:00
parent 5a981c91ee
commit f290b52fa3
12 changed files with 136 additions and 113 deletions

View File

@@ -0,0 +1,41 @@
#pragma warning disable IDE0130
using Godot;
using Polonium.Attributes;
using Polonium.DataStructures;
using System.Collections.Generic;
// ReSharper disable once CheckNamespace
namespace GlobalClasses;
[GlobalClass]
[Tool]
[ProxyNode]
public partial class PoloniumTextureButton : TextureButton
{
[ProxyProperty]
public virtual TextureSet TextureSet => null;
[Export]
public GlobalRegistry.TextureSetName TextureSetName { get; set; }
public sealed override void _Ready()
{
TextureSet t = TextureSet;
if (t is null)
t = GlobalRegistry.TextureSetMap.GetValueOrDefault(TextureSetName, null);
if (t is not null)
{
TextureNormal = t.Normal;
TextureHover = t.Hover;
TexturePressed = t.Pressed;
TextureDisabled = t.Disabled;
TextureFocused = t.Focused;
}
__Ready();
base._Ready();
}
[ProxyMethod]
public virtual void __Ready()
{
}
}
#pragma warning restore IDE0130