-
Notifications
You must be signed in to change notification settings - Fork 0
/
TitanSpacer8.lua
51 lines (48 loc) · 1.64 KB
/
TitanSpacer8.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--[[
Description: A very simple plugin to add a spacer in Titan Panel
Site: https://www.curseforge.com/wow/addons/titan-panel-spacer
Author: Canettieri
--]]
local ADDON_NAME, L = ...;
local GetAddOnMetadata = C_AddOns and C_AddOns.GetAddOnMetadata or GetAddOnMetadata
local version = GetAddOnMetadata(ADDON_NAME, "Version")
local ID = "TITAN_ESPACO8"
----------------------------------------------
local function GetButtonText(self, id)
local SpacerText = "--"
if not TitanGetVar(ID, "DisplayOnRightSide") then
if TitanGetVar(ID, "ShowText") and TitanGetVar(ID, "MoreSpace") then
SpacerText = " --- "
elseif not TitanGetVar(ID, "ShowText") and not TitanGetVar(ID, "MoreSpace") then
SpacerText = " "
elseif TitanGetVar(ID, "MoreSpace") and not TitanGetVar(ID, "ShowText") then
SpacerText = " "
end
else
if TitanGetVar(ID, "ShowText") and not TitanGetVar(ID, "MoreSpace") then
SpacerText = " -- "
elseif TitanGetVar(ID, "ShowText") and TitanGetVar(ID, "MoreSpace") then
SpacerText = " --- "
elseif not TitanGetVar(ID, "ShowText") and not TitanGetVar(ID, "MoreSpace") then
SpacerText = " "
elseif TitanGetVar(ID, "MoreSpace") and not TitanGetVar(ID, "ShowText") then
SpacerText = " "
end
end
return SpacerText
end
-----------------------------------------------
L.Elib({
id = ID,
name = "Titan|cFFfcb314 " .. "Spacer |cFFf3f45f#08" .. "|r",
category = "Interface",
version = version,
getButtonText = GetButtonText,
prepareMenu = L.PrepareSpacerMenu,
savedVariables = {
ShowIcon = false,
ShowText = true,
DisplayOnRightSide = false,
MoreSpace = false,
}
})