Initial release: HSUI v1.0.0.0 - HUD replacement with configurable hotbars
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
using Dalamud.Game.ClientState.Objects.SubKinds;
|
||||
using Dalamud.Game.ClientState.Objects.Types;
|
||||
using Dalamud.Plugin;
|
||||
using System.Numerics;
|
||||
|
||||
namespace HSUI.Interface.Jobs
|
||||
{
|
||||
public class JobHud : DraggableHudElement, IHudElementWithActor, IHudElementWithVisibilityConfig
|
||||
{
|
||||
protected IDalamudPluginInterface PluginInterface => Plugin.PluginInterface;
|
||||
|
||||
public JobConfig Config => (JobConfig)_config;
|
||||
public VisibilityConfig VisibilityConfig => Config.VisibilityConfig;
|
||||
|
||||
public IGameObject? Actor { get; set; } = null;
|
||||
protected IPlayerCharacter? Player => Actor is IPlayerCharacter ? (IPlayerCharacter)Actor : null;
|
||||
|
||||
public JobHud(JobConfig config, string? displayName = null) : base(config, displayName)
|
||||
{
|
||||
}
|
||||
|
||||
public override void DrawChildren(Vector2 origin)
|
||||
{
|
||||
if (Player == null || !_config.Enabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
DrawJobHud(origin, Player);
|
||||
}
|
||||
|
||||
public virtual void DrawJobHud(Vector2 origin, IPlayerCharacter player)
|
||||
{
|
||||
// override
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user