draft_texture_button #2
@@ -3,6 +3,8 @@ using Godot;
|
|||||||
using Polonium.Attributes;
|
using Polonium.Attributes;
|
||||||
using Polonium.DataStructures;
|
using Polonium.DataStructures;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using Polonium.Interfaces;
|
||||||
|
|
||||||
// ReSharper disable once CheckNamespace
|
// ReSharper disable once CheckNamespace
|
||||||
namespace GlobalClasses;
|
namespace GlobalClasses;
|
||||||
[GlobalClass]
|
[GlobalClass]
|
||||||
@@ -13,8 +15,26 @@ public partial class PoloniumTextureButton : TextureButton
|
|||||||
[ProxyProperty]
|
[ProxyProperty]
|
||||||
public virtual TextureSet TextureSet => null;
|
public virtual TextureSet TextureSet => null;
|
||||||
|
|
||||||
|
private GlobalRegistry.TextureSetName PrivateTextureSetName { get; set; }
|
||||||
|
|
||||||
[Export]
|
[Export]
|
||||||
public GlobalRegistry.TextureSetName TextureSetName { get; set; }
|
public GlobalRegistry.TextureSetName TextureSetName
|
||||||
|
{
|
||||||
|
get => PrivateTextureSetName;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
PrivateTextureSetName = value;
|
||||||
|
t = GlobalRegistry.TextureSetMap.GetValueOrDefault(value, null);
|
||||||
|
if (t is not null)
|
||||||
|
{
|
||||||
|
TextureNormal = t.Normal;
|
||||||
|
TextureHover = t.Hover;
|
||||||
|
TexturePressed = t.Pressed;
|
||||||
|
TextureDisabled = t.Disabled;
|
||||||
|
TextureFocused = t.Focused;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public sealed override void _Ready()
|
public sealed override void _Ready()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user