Skip to content

Commit 32bc50d

Browse files
committed
feat: add addon icon
1 parent 67e7224 commit 32bc50d

5 files changed

Lines changed: 11 additions & 2 deletions

File tree

Core/!Load.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<Script file="Functions\Mover.lua" />
1212

1313
<Script file="Core.lua" />
14+
<Script file="Texture.lua" />
1415
<Script file="API.lua" />
1516
<Script file="Database.lua" />
1617
<Script file="Setting.lua" />

Core/Setting.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ function E:BuildSettings()
167167
type = "launcher",
168168
text = self.title,
169169
label = self.title,
170-
icon = [[Interface\ICONS\Ability_Ardenweald_Paladin_Winter]],
170+
icon = E.Texture.Logo,
171171
OnClick = UnwindTools_OnAddonCompartmentClick,
172172
OnTooltipShow = function(tooltip)
173173
tooltip:AddLine(self.title)

Core/Texture.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
local ns = select(2, ...) ---@type Namespace
2+
local E = ns[1] ---@class Engine
3+
4+
---@class Engine.Texture
5+
E.Texture = {}
6+
7+
local directory = ([[Interface\Addons\%s\Media\]]):format(E.name)
8+
E.Texture.Logo = directory .. [[Textures\Logo.png]]

Media/Textures/Logo.png

3.51 KB
Loading

UnwindTools.toc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
## LoadSavedVariablesFirst: 1
1414
## SavedVariables: UnwindToolsDB
1515
## AddonCompartmentFunc: UnwindTools_OnAddonCompartmentClick
16-
## IconTexture: Interface\ICONS\Ability_Ardenweald_Paladin_Winter
16+
## IconTexture: Interface\Addons\UnwindTools\Media\Textures\Logo.png
1717
## X-Curse-Project-ID: 1462042
1818
## X-Wago-ID: x618OxN1
1919

0 commit comments

Comments
 (0)