CurrencyAlertClassic/CurrencyAlert/DataModels/TrackedCurrency.cs
MidoriKami e97fe36ba0
Complete Rework + Update (#15)
* Remove unused dalamud packager overrides

* Use category tags, add actual description

* Use .net7

* Update DalamudPackager, update for Api8

* Remove hardcoded images, we'll use lumina to get these dynamically

* Add KamiLib

* Refactor Currency Alert

* Add LocalizationManager.cs

* remove trailing comma

* Add No Decoration flag

* More touchups and features

* Increase Version Number 0.5.0.0

* Move Chat Notifications to its own category

* Hide overlay if not logged in or there are no warnings to show

* Increase update frequency to 4x per second
2023-01-10 21:07:57 +01:00

31 lines
682 B
C#

using System.Numerics;
using ImGuiNET;
using KamiLib.Configuration;
namespace CurrencyAlert.DataModels;
public record TrackedCurrency(CurrencyName Name, Setting<int> Threshold, Setting<bool> Enabled)
{
private static DisplaySettings DisplaySettings => Service.Configuration.DisplaySettings;
public CurrencyInfo CurrencyInfo()
{
return new CurrencyInfo(Name);
}
public void DrawIcon()
{
if (CurrencyInfo().IconTexture is { } icon)
{
ImGui.Image(icon.ImGuiHandle, new Vector2(20.0f));
}
}
public void DrawName(Vector4 color)
{
ImGui.TextColored(color, CurrencyInfo().ItemName);
}
}