Line endings: LF everywhere
.gitattributes forces LF (CRLF only for .bat/.cmd), core.autocrlf is off; files that differed only by CRLF are normalized.
This commit is contained in:
1 parent
3fb418fa4a
commit
c4c90116ed
23 files changed
+1681
-1651
No files matched your search
@@ -1,30 +1,30 @@
|
||||
using Cthangover.Core.Factories.Impls;
|
||||
using Godot;
|
||||
using Cthangover.Core.Factories.Impls;
|
||||
using Godot;
|
||||
using Cthangover.Core.UI.Tool;
|
||||
|
||||
namespace Cthangover.Mods.Interface.Tool
|
||||
{
|
||||
/// <summary>
|
||||
/// Mod-aware TextureButton: resolves IconId through UIIconFactory at _Ready
|
||||
/// and applies the result to TextureNormal. Allows tool buttons to reference
|
||||
/// icons by logical ID that mods can override.
|
||||
/// </summary>
|
||||
public partial class ButtonModIconLoader : TextureButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Logical icon ID resolved through <see cref="UIIconFactory"/>. Set in the editor
|
||||
/// or via mod to reference a mod-overridable icon texture.
|
||||
/// </summary>
|
||||
[Export] public string IconId { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IconId))
|
||||
return;
|
||||
|
||||
var texture = UIIconFactory.Instance.Get(IconId);
|
||||
if (texture != null)
|
||||
TextureNormal = texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Cthangover.Mods.Interface.Tool
|
||||
{
|
||||
/// <summary>
|
||||
/// Mod-aware TextureButton: resolves IconId through UIIconFactory at _Ready
|
||||
/// and applies the result to TextureNormal. Allows tool buttons to reference
|
||||
/// icons by logical ID that mods can override.
|
||||
/// </summary>
|
||||
public partial class ButtonModIconLoader : TextureButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Logical icon ID resolved through <see cref="UIIconFactory"/>. Set in the editor
|
||||
/// or via mod to reference a mod-overridable icon texture.
|
||||
/// </summary>
|
||||
[Export] public string IconId { get; set; }
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if (string.IsNullOrEmpty(IconId))
|
||||
return;
|
||||
|
||||
var texture = UIIconFactory.Instance.Get(IconId);
|
||||
if (texture != null)
|
||||
TextureNormal = texture;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user