...
 
Commits (409)
This diff is collapsed.
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="Config.lua"/>
</Ui>
......@@ -7,33 +7,23 @@ local T, C, L = select(2, ...):unpack()
C["General"] = {
["BackdropColor"] = {0.11, 0.11, 0.11},
["BorderColor"] = {0, 0, 0},
["UseGlobal"] = false,
["HideShadows"] = false,
["AFKSaver"] = true,
["Scaling"] = {
["Options"] = {
["Pixel Perfection"] = "Pixel Perfection",
["Smallest"] = "Smallest",
["Small"] = "Small",
["Medium"] = "Medium",
["Large"] = "Large",
["Oversize"] = "Oversize",
},
["UIScale"] = T.PerfectScale,
["MinimapScale"] = 100,
["Value"] = "Pixel Perfection",
},
["Themes"] = {
["Options"] = {
["Tukui"] = "Tukui",
["Tukui 18"] = "Tukui 18",
["Tukui 17"] = "Tukui 17",
},
["Value"] = "Tukui",
["Value"] = "Tukui 18",
},
}
C["ActionBars"] = {
["Enable"] = true,
["AddNewSpells"] = true,
["HotKey"] = false,
["EquipBorder"] = true,
["Macro"] = false,
......@@ -63,7 +53,6 @@ C["Bags"] = {
["ButtonSize"] = 28,
["Spacing"] = 4,
["ItemsPerRow"] = 11,
["PulseNewItem"] = true,
["Font"] = "Tukui Outline",
}
......@@ -84,10 +73,9 @@ C["Cooldowns"] = {
C["DataTexts"] = {
["Battleground"] = true,
["LocalTime"] = true,
["Time24HrFormat"] = false,
["NameColor"] = {1, 1, 1},
["ValueColor"] = {1, 1, 1},
["Hour24"] = false,
["Font"] = "Tukui",
}
......@@ -97,36 +85,24 @@ C["Loot"] = {
["Font"] = "Tukui",
}
C["Merchant"] = {
["AutoSellGrays"] = true,
["AutoRepair"] = true,
["UseGuildRepair"] = false,
}
C["Misc"] = {
["ThreatBarEnable"] = true,
["AltPowerBarEnable"] = true,
["ExperienceEnable"] = true,
["ReputationEnable"] = true,
["ErrorFilterEnable"] = true,
["AutoInviteEnable"] = false,
["TalkingHeadEnable"] = true,
["AFKSaver"] = true,
}
C["NamePlates"] = {
["Enable"] = true,
["Width"] = 138,
["Height"] = 14,
["CastHeight"] = 4,
["Width"] = 129,
["Height"] = 12,
["Font"] = "Tukui Outline",
["OnlySelfDebuffs"] = true,
}
C["Party"] = {
["Enable"] = true,
["HealBar"] = true,
["ShowPlayer"] = true,
["ShowHealthText"] = true,
["RangeAlpha"] = 0.3,
["Font"] = "Tukui",
["HealthFont"] = "Tukui Outline",
......@@ -134,14 +110,8 @@ C["Party"] = {
C["Raid"] = {
["Enable"] = true,
["HealBar"] = true,
["AuraWatch"] = true,
["AuraWatchTimers"] = true,
["DebuffWatch"] = true,
["RangeAlpha"] = 0.3,
["ShowRessurection"] = true,
["ShowHealthText"] = true,
["ShowPets"] = true,
["VerticalHealth"] = false,
["MaxUnitPerColumn"] = 10,
["Font"] = "Tukui",
......@@ -160,8 +130,8 @@ C["Raid"] = {
C["Tooltips"] = {
["Enable"] = true,
["HideOnUnitFrames"] = false,
["HideInCombat"] = false,
["UnitHealthText"] = true,
["ShowSpec"] = true,
["MouseOver"] = false,
["HealthFont"] = "Tukui Outline",
}
......@@ -192,18 +162,9 @@ C["UnitFrames"] = {
["Smooth"] = true,
["TargetEnemyHostileColor"] = true,
["CombatLog"] = false,
["HealBar"] = true,
["TotemBar"] = true,
["PlayerAuras"] = true,
["TargetAuras"] = true,
["FocusAuras"] = true,
["FocusTargetAuras"] = true,
["ArenaAuras"] = true,
["BossAuras"] = true,
["OnlySelfDebuffs"] = false,
["OnlySelfBuffs"] = false,
["Threat"] = false,
["AltPowerText"] = false,
["Arena"] = true,
["Boss"] = true,
["Font"] = "Tukui Outline",
}
This diff is collapsed.
......@@ -8,12 +8,6 @@ oUF.colors.disconnected = {
0.1, 0.1, 0.1
}
oUF.colors.runes = {
[1] = {0.69, 0.31, 0.31},
[2] = {0.41, 0.80, 1.00},
[3] = {0.65, 0.63, 0.35},
}
oUF.colors.reaction = {
[1] = { 0.87, 0.37, 0.37 }, -- Hated
[2] = { 0.87, 0.37, 0.37 }, -- Hostile
......@@ -27,28 +21,12 @@ oUF.colors.reaction = {
oUF.colors.power = {
["MANA"] = {0.31, 0.45, 0.63},
["INSANITY"] = {0.40, 0.00, 0.80},
["MAELSTROM"] = {0.00, 0.50, 1.00},
["LUNAR_POWER"] = {0.93, 0.51, 0.93},
["HOLY_POWER"] = {0.95, 0.90, 0.60},
["RAGE"] = {0.69, 0.31, 0.31},
["FOCUS"] = {0.71, 0.43, 0.27},
["ENERGY"] = {0.65, 0.63, 0.35},
["CHI"] = {0.71, 1.00, 0.92},
["RUNES"] = {0.55, 0.57, 0.61},
["SOUL_SHARDS"] = {0.50, 0.32, 0.55},
["FURY"] = {0.78, 0.26, 0.99},
["PAIN"] = {1.00, 0.61, 0.00},
["RUNIC_POWER"] = {0.00, 0.82, 1.00},
["AMMOSLOT"] = {0.80, 0.60, 0.00},
["FUEL"] = {0.00, 0.55, 0.50},
["POWER_TYPE_STEAM"] = {0.55, 0.57, 0.61},
["POWER_TYPE_PYRITE"] = {0.60, 0.09, 0.17},
["ALTPOWER"] = {0.00, 1.00, 1.00},
}
oUF.colors.class = {
["DEATHKNIGHT"] = { 0.77, 0.12, 0.24 },
["DRUID"] = { 1.00, 0.49, 0.03 },
["HUNTER"] = { 0.67, 0.84, 0.45 },
["MAGE"] = { 0.41, 0.80, 1.00 },
......@@ -58,15 +36,12 @@ oUF.colors.class = {
["SHAMAN"] = { 0.16, 0.31, 0.61 },
["WARLOCK"] = { 0.58, 0.51, 0.79 },
["WARRIOR"] = { 0.78, 0.61, 0.43 },
["MONK"] = { 0.00, 1.00, 0.59 },
["DEMONHUNTER"] = { 0.64, 0.19, 0.79 },
}
oUF.colors.totems = {
[1] = oUF.colors.class[Class], -- Totem 1
[2] = oUF.colors.class[Class], -- Totem 2
[3] = oUF.colors.class[Class], -- Totem 3
[4] = oUF.colors.class[Class], -- Totem 4
oUF.colors.happiness = {
[1] = {.69,.31,.31},
[2] = {.65,.63,.35},
[3] = {.33,.59,.33},
}
oUF.colors.specpowertypes = {
......@@ -79,13 +54,13 @@ oUF.colors.specpowertypes = {
["PALADIN"] = {
[65] = oUF.colors.power["MANA"],
[66] = oUF.colors.power["MANA"],
[70] = oUF.colors.power["HOLY_POWER"],
[70] = oUF.colors.power["MANA"],
},
["HUNTER"] = {
[253] = oUF.colors.power["FOCUS"],
[254] = oUF.colors.power["FOCUS"],
[255] = oUF.colors.power["FOCUS"],
[253] = oUF.colors.power["MANA"],
[254] = oUF.colors.power["MANA"],
[255] = oUF.colors.power["MANA"],
},
["ROGUE"] = {
......@@ -97,18 +72,12 @@ oUF.colors.specpowertypes = {
["PRIEST"] = {
[256] = oUF.colors.power["MANA"],
[257] = oUF.colors.power["MANA"],
[258] = oUF.colors.power["INSANITY"],
},
["DEATHKNIGHT"] = {
[250] = oUF.colors.power["RUNIC_POWER"],
[251] = oUF.colors.power["RUNIC_POWER"],
[252] = oUF.colors.power["RUNIC_POWER"],
[258] = oUF.colors.power["MANA"],
},
["SHAMAN"] = {
[262] = oUF.colors.power["MAELSTROM"],
[263] = oUF.colors.power["MAELSTROM"],
[262] = oUF.colors.power["MANA"],
[263] = oUF.colors.power["MANA"],
[264] = oUF.colors.power["MANA"],
},
......@@ -124,23 +93,57 @@ oUF.colors.specpowertypes = {
[267] = oUF.colors.power["MANA"],
},
["MONK"] = {
[268] = oUF.colors.power["ENERGY"],
[270] = oUF.colors.power["MANA"],
[269] = oUF.colors.power["ENERGY"],
},
["DRUID"] = {
[102] = oUF.colors.power["LUNAR_POWER"],
[102] = oUF.colors.power["MANA"],
[103] = oUF.colors.power["ENERGY"],
[104] = oUF.colors.power["RAGE"],
[105] = oUF.colors.power["MANA"],
},
["DEMONHUNTER"] = {
[577] = oUF.colors.power["FURY"],
[581] = oUF.colors.power["PAIN"],
},
}
RAID_CLASS_COLORS["DRUID"].colorStr = "ffff7b08"
RAID_CLASS_COLORS["DRUID"].r = 1
RAID_CLASS_COLORS["DRUID"].g = 0.49
RAID_CLASS_COLORS["DRUID"].b = 0.03
RAID_CLASS_COLORS["HUNTER"].colorStr = "ffaad673"
RAID_CLASS_COLORS["HUNTER"].r = 0.67
RAID_CLASS_COLORS["HUNTER"].g = 0.84
RAID_CLASS_COLORS["HUNTER"].b = 0.45
RAID_CLASS_COLORS["MAGE"].colorStr = "ff69cdff"
RAID_CLASS_COLORS["MAGE"].r = 0.41
RAID_CLASS_COLORS["MAGE"].g = 0.80
RAID_CLASS_COLORS["MAGE"].b = 1
RAID_CLASS_COLORS["PALADIN"].colorStr = "fff58cba"
RAID_CLASS_COLORS["PALADIN"].r = 0.96
RAID_CLASS_COLORS["PALADIN"].g = 0.55
RAID_CLASS_COLORS["PALADIN"].b = 0.73
RAID_CLASS_COLORS["PRIEST"].colorStr = "ffd4d4d4"
RAID_CLASS_COLORS["PRIEST"].r = 0.83
RAID_CLASS_COLORS["PRIEST"].g = 0.83
RAID_CLASS_COLORS["PRIEST"].b = 0.83
RAID_CLASS_COLORS["ROGUE"].colorStr = "fffff152"
RAID_CLASS_COLORS["ROGUE"].r = 1
RAID_CLASS_COLORS["ROGUE"].g = 0.95
RAID_CLASS_COLORS["ROGUE"].b = 0.32
RAID_CLASS_COLORS["SHAMAN"].colorStr = "ff294f9c"
RAID_CLASS_COLORS["SHAMAN"].r = 0.16
RAID_CLASS_COLORS["SHAMAN"].g = 0.31
RAID_CLASS_COLORS["SHAMAN"].b = 0.61
RAID_CLASS_COLORS["WARLOCK"].colorStr = "ff9482c9"
RAID_CLASS_COLORS["WARLOCK"].r = 0.58
RAID_CLASS_COLORS["WARLOCK"].g = 0.51
RAID_CLASS_COLORS["WARLOCK"].b = 0.79
RAID_CLASS_COLORS["WARRIOR"].colorStr = "ffc79c68"
RAID_CLASS_COLORS["WARRIOR"].r = 0.78
RAID_CLASS_COLORS["WARRIOR"].g = 0.61
RAID_CLASS_COLORS["WARRIOR"].b = 0.43
T["Colors"] = oUF.colors
local T, C, L = select(2, ...):unpack()
local AddOnCommands = {} -- Let people use /tukui for their mods
local SelectedProfile = 0
local Split = function(cmd)
if cmd:find("%s") then
......@@ -25,7 +26,40 @@ end)
T.SlashHandler = function(cmd)
local arg1, arg2 = Split(cmd)
if (arg1 == "dt" or arg1 == "datatext") then
if (arg1 == "" or arg1 == "help") then
print(" ")
print("|cffff8000".. L.Help.Title .."|r")
print(L.Help.Chat)
print(L.Help.Config)
print(L.Help.Datatexts)
print(L.Help.Events)
print(L.Help.Gold)
print(L.Help.Grid)
print(L.Help.Happiness)
print(L.Help.Install)
print(L.Help.Load)
print(L.Help.Move)
print(L.Help.Profile)
print(L.Help.Status)
print(L.Help.Test)
print(" ")
elseif (arg1 == "chat") then
if (arg2 == "reset") then
local Chat = T.Chat
if Chat then
TukuiData[GetRealmName()][UnitName("Player")].ChatReset = true
Chat:Install()
Chat:SetChatFramePosition()
TukuiData[GetRealmName()][UnitName("Player")].Move.TukuiLeftDataTextBox = nil
TukuiData[GetRealmName()][UnitName("Player")].Move.TukuiRightDataTextBox = nil
ReloadUI()
end
end
elseif (arg1 == "dt" or arg1 == "datatext") then
local DataText = T["DataTexts"]
if arg2 then
......@@ -40,7 +74,38 @@ T.SlashHandler = function(cmd)
elseif (arg1 == "install" or arg1 == "reset") then
local Install = T["Install"]
Install:Launch()
Install:ResetSettings()
Install:ResetData()
elseif (arg1 == "load" or arg1 == "unload") then
local Loaded, Reason = LoadAddOn(arg2)
if (Reason == "MISSING") then
T.Print("["..arg2.."] is not installed")
return
end
if arg1 == "load" then
if (IsAddOnLoaded(arg2)) then
T.Print("["..arg2.."] is already loaded")
return
end
EnableAddOn(arg2)
else
DisableAddOn(arg2)
end
ReloadUI()
elseif (arg1 == "br" or arg1 == "report") then
if arg2 == "enable" then
EnableAddOn("Blizzard_PTRFeedback")
else
DisableAddOn("Blizzard_PTRFeedback")
end
ReloadUI()
elseif (arg1 == "status" or arg1 == "debug") then
local Status = TukuiStatus
......@@ -59,43 +124,35 @@ T.SlashHandler = function(cmd)
local Movers = T["Movers"]
Movers:StartOrStopMoving()
elseif (arg1 == "" or arg1 == "help") then
print(" ")
print("|cffff8000".. L.Help.Title .."|r")
print(L.Help.Install)
print(L.Help.Datatexts)
print(L.Help.Config)
print(L.Help.Move)
print(L.Help.Test)
print(L.Help.Profile)
print(L.Help.Grid)
print(L.Help.Status)
print(" ")
elseif (arg1 == "c" or arg1 == "config") then
local Config = TukuiConfig
if (not TukuiConfig) then
T.Print(L.Others.ConfigNotFound)
return
end
if (not TukuiConfigFrame) then
Config:CreateConfigWindow()
elseif (arg1 == "ph" or arg1 == "happiness") then
if T.MyClass ~= "HUNTER" then
return T.Print("Sorry, you are not an |c"..RAID_CLASS_COLORS["HUNTER"].colorStr.."hunter|r, this command is useless for you. :P")
end
if TukuiConfigFrame:IsVisible() then
TukuiConfigFrame:Hide()
local Red, Yellow, Green = T.RGBToHex(unpack(T.Colors.happiness[1])), T.RGBToHex(unpack(T.Colors.happiness[2])), T.RGBToHex(unpack(T.Colors.happiness[3]))
local Happiness, DamagePercentage, LoyaltyRate = GetPetHappiness()
if not Happiness then
T.Print("You don't have any pet summoned at the moment")
else
TukuiConfigFrame:Show()
local Happy = ({"Unhappy", "Content", "Happy"})[Happiness]
local Loyalty = LoyaltyRate > 0 and "gaining" or "losing"
T.Print("Pet is " .. Happy)
T.Print("Pet is doing " .. DamagePercentage .. "% damage")
T.Print("Pet is " .. Loyalty .. " loyalty")
end
T.Print("You can also track your current pet happiness according to the pet frame health bar color. "..Red.."Red|r mean unhappy, "..Yellow.."yellow|r mean content, "..Green.."green|r mean happy.")
elseif (arg1 == "c" or arg1 == "config") then
T.GUI:Toggle()
elseif (arg1 == "gold") and (arg2 == "reset") then
local DataText = T["DataTexts"]
local MyRealm = GetRealmName()
local MyName = UnitName("player")
TukuiData["Gold"] = {}
TukuiData["Gold"][GetRealmName()] = {}
TukuiData["Gold"][GetRealmName()][UnitName("player")] = GetMoney()
DataText:ResetGold()
elseif (arg1 == "test" or arg1 == "testui") then
local Test = T["TestUI"]
......@@ -125,19 +182,14 @@ T.SlashHandler = function(cmd)
elseif (arg1 == "profile" or arg1 == "p") then
if not TukuiData then return end
if TukuiConfigPerAccount then
T.Print("Your settings are currently set accross toons so you can't use this command!")
return
end
if not arg2 then
print(" ")
T.Print("/tukui profile list")
print(" List current profiles available")
T.Print("/tukui profile #")
print(" Apply a profile, replace '#' with a profile number")
print(" ")
else
local IsConfigLoaded = IsAddOnLoaded("Tukui_Config")
if arg2 == "list" or arg2 == "l" then
Tukui.Profiles = {}
Tukui.Profiles.Data = {}
......@@ -146,52 +198,28 @@ T.SlashHandler = function(cmd)
for Server, Table in pairs(TukuiData) do
if not Server then return end
if Server ~= "Gold" then
for Character, Table in pairs(TukuiData[Server]) do
tinsert(Tukui.Profiles.Data, TukuiData[Server][Character])
if IsConfigLoaded then
if TukuiConfigShared and TukuiConfigShared[Server] and TukuiConfigShared[Server][Character] then
tinsert(Tukui.Profiles.Options, TukuiConfigShared[Server][Character])
else
if not TukuiConfigShared then
TukuiConfigShared = {}
end
if not TukuiConfigShared[Server] then
TukuiConfigShared[Server] = {}
end
if not TukuiConfigShared[Server][Character] then
TukuiConfigShared[Server][Character] = {}
end
tinsert(Tukui.Profiles.Options, TukuiConfigShared[Server][Character])
end
end
print("Profile "..#Tukui.Profiles.Data..": ["..Server.."]-["..Character.."]")
for Character, Table in pairs(TukuiData[Server]) do
tinsert(Tukui.Profiles.Data, TukuiData[Server][Character])
if (not TukuiUseGlobal) and (TukuiSettingsPerChar) then
tinsert(Tukui.Profiles.Options, TukuiSettingsPerChar)
else
tinsert(Tukui.Profiles.Options, TukuiSettings)
end
print("Profile "..#Tukui.Profiles.Data..": ["..Server.."]-["..Character.."]")
end
end
else
local CurrentServer = GetRealmName()
local CurrentCharacter = UnitName("player")
local Profile = tonumber(arg2)
SelectedProfile = tonumber(arg2)
if not Tukui.Profiles or not Tukui.Profiles.Data[Profile] then
if not Tukui.Profiles or not Tukui.Profiles.Data[SelectedProfile] then
T.Print(L.Others.ProfileNotFound)
return
end
TukuiData[CurrentServer][CurrentCharacter] = Tukui.Profiles.Data[Profile]
if IsConfigLoaded then
TukuiConfigShared[CurrentServer][CurrentCharacter] = Tukui.Profiles.Options[Profile]
end
ReloadUI()
T.Popups.ShowPopup("TUKUI_IMPORT_PROFILE")
end
end
elseif AddOnCommands[arg1] then
......@@ -199,6 +227,27 @@ T.SlashHandler = function(cmd)
end
end
-- Create a Tukui popup for profiles
T.Popups.Popup["TUKUI_IMPORT_PROFILE"] = {
Question = "Are you sure you want to import this profile? Continue?",
Answer1 = ACCEPT,
Answer2 = CANCEL,
Function1 = function(self)
local CurrentServer = GetRealmName()
local CurrentCharacter = UnitName("player")
TukuiData[CurrentServer][CurrentCharacter] = Tukui.Profiles.Data[SelectedProfile]
if (not TukuiUseGlobal) and (TukuiSettingsPerChar) then
TukuiSettingsPerChar = Tukui.Profiles.Options[SelectedProfile]
else
TukuiSettings = Tukui.Profiles.Options[SelectedProfile]
end
ReloadUI()
end,
}
SLASH_TUKUISLASHHANDLER1 = "/tukui"
SlashCmdList["TUKUISLASHHANDLER"] = T.SlashHandler
......
local T, C, L = select(2, ...):unpack()
----------------------------------------------------------------
-- This script will adjust resolution for optimal graphic
----------------------------------------------------------------
local Popups = T["Popups"]
local RequireRestart = false
Popups.Popup["CLIENT_RESTART"] = {
Question = L.Others.ResolutionChanged,
Answer1 = ACCEPT,
Answer2 = CANCEL,
Function1 = function(self)
ReloadUI()
end,
Function2 = function(self)
RequireRestart = false
end,
}
-- Optimize graphic after we enter world
local Graphic = CreateFrame("Frame")
Graphic:RegisterEvent("PLAYER_ENTERING_WORLD")
Graphic:SetScript("OnEvent", function(self, event)
if (event == "DISPLAY_SIZE_CHANGED") then
if not RequireRestart then
Popups.ShowPopup("CLIENT_RESTART")
end
RequireRestart = true
else
local UseUIScale = GetCVar("useUiScale")
if (UseUIScale ~= "1") then
SetCVar("useUiScale", 1)
end
if (format("%.2f", GetCVar("uiScale")) ~= format("%.2f", T.UIScale)) then
SetCVar("uiScale", T.UIScale)
end
-- Allow 4K and WQHD Resolution to have an UIScale lower than 0.64, which is
-- the lowest value of UIParent scale by default
if (T.UIScale < 0.64) then
UIParent:SetScale(T.UIScale)
end
self:UnregisterEvent("PLAYER_ENTERING_WORLD")
self:RegisterEvent("DISPLAY_SIZE_CHANGED")
end
end)
......@@ -4,7 +4,7 @@
-- [[ Build the engine ]] --
local AddOn, Engine = ...
local Resolution = GetCurrentResolution() > 0 and select(GetCurrentResolution(), GetScreenResolutions()) or nil
local Resolution = select(1, GetPhysicalScreenSize()).."x"..select(2, GetPhysicalScreenSize())
local Windowed = Display_DisplayModeDropDown:windowedmode()
local Fullscreen = Display_DisplayModeDropDown:fullscreenmode()
......@@ -20,8 +20,9 @@ end
Engine[1].WindowedMode = Windowed
Engine[1].FullscreenMode = Fullscreen
Engine[1].Resolution = Resolution or (Windowed and GetCVar("gxWindowedResolution")) or GetCVar("gxFullscreenResolution")
Engine[1].ScreenHeight = tonumber(string.match(Engine[1].Resolution, "%d+x(%d+)"))
Engine[1].ScreenWidth = tonumber(string.match(Engine[1].Resolution, "(%d+)x+%d"))
Engine[1].ScreenHeight = select(2, GetPhysicalScreenSize())
Engine[1].ScreenWidth = select(1, GetPhysicalScreenSize())
Engine[1].PerfectScale = min(1, max(0.64, 768 / string.match(Resolution, "%d+x(%d+)")))
Engine[1].MyName = UnitName("player")
Engine[1].MyClass = select(2, UnitClass("player"))
Engine[1].MyLevel = UnitLevel("player")
......@@ -32,7 +33,7 @@ Engine[1].Version = GetAddOnMetadata(AddOn, "Version")
Engine[1].VersionNumber = tonumber(Engine[1].Version)
Engine[1].WoWPatch, Engine[1].WoWBuild, Engine[1].WoWPatchReleaseDate, Engine[1].TocVersion = GetBuildInfo()
Engine[1].WoWBuild = tonumber(Engine[1].WoWBuild)
Engine[1].WelcomeMessage = "|cffff8000Tukui "..Engine[1].Version.."|r - /tukui help"
Engine[1].Hider = CreateFrame("Frame", nil, UIParent) Engine[1].Hider:Hide()
SLASH_RELOADUI1 = "/rl"
SlashCmdList.RELOADUI = ReloadUI
......
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Script file="Media.lua"/>
<Script file="API.lua"/>
<Script file="Colors.lua"/>
<Script file="Toolkit.lua"/>
<Script file="Popup.lua"/>
<Script file="Graphic.lua"/>
<Script file="Core.lua"/>
<Script file="Commands.lua"/>
<Script file="Animation.lua"/>
<Script file="Colors.lua"/>
<Script file="Install.lua"/>
<Script file="VersionCheck.lua"/>
<Script file="MoveUI.lua"/>
......
This diff is collapsed.
......@@ -2,15 +2,45 @@ local T, C, L = select(2, ...):unpack()
local Loading = CreateFrame("Frame")
function Loading:StoreDefaults()
T.Defaults = {}
for group, options in pairs(C) do
if (not T.Defaults[group]) then
T.Defaults[group] = {}
end
for option, value in pairs(options) do
T.Defaults[group][option] = value
if (type(C[group][option]) == "table") then
if C[group][option].Options then
T.Defaults[group][option] = value.Value
else
T.Defaults[group][option] = value
end
else
T.Defaults[group][option] = value
end
end
end
end
function Loading:LoadCustomSettings()
local Settings
local Name = UnitName("Player")
local Realm = GetRealmName()
if (TukuiConfigPerAccount) then
Settings = TukuiConfigShared.Account
if TukuiUseGlobal then
if (not TukuiSettings) then
TukuiSettings = {}
end
Settings = TukuiSettings
else
Settings = TukuiConfigShared[Realm][Name]
if (not TukuiSettingsPerChar) then
TukuiSettingsPerChar = {}
end
Settings = TukuiSettingsPerChar
end
for group, options in pairs(Settings) do
......@@ -23,8 +53,16 @@ function Loading:LoadCustomSettings()
Settings[group][option] = nil
else
Count = Count + 1
C[group][option] = value
if (type(C[group][option]) == "table") then
if C[group][option].Options then
C[group][option].Value = value
else
C[group][option] = value
end
else
C[group][option] = value
end
end
end
end
......@@ -37,149 +75,69 @@ function Loading:LoadCustomSettings()
Settings[group] = nil
end
end
C.General.UseGlobal = TukuiUseGlobal
end
function Loading:OnEvent(event, addon)
if (event == "PLAYER_LOGIN") then
-- LOAD SETTINGS
self:LoadCustomSettings()
-- LOAD AUTOMATIC SCALING IF AUTOSCALE IF ON
local Scaling = C.General.Scaling.Value
local Adjust = (T.ScreenHeight / 10000) / 2
local UIScale = min(2, max(0.01, 768 / string.match(T.Resolution, "%d+x(%d+)")))
if (Scaling == "Smallest") then
if (T.ScreenHeight >= 1600) then
-- 0.35555556416512 + 0.108 = 0.463 on 4K monitor
UIScale = UIScale + Adjust
else
UIScale = 0.64 - Adjust
end
elseif (Scaling == "Small") then
UIScale = 0.64
elseif (Scaling == "Medium") then
UIScale = 0.64 + Adjust
elseif (Scaling == "Large") then
UIScale = 0.64 + Adjust + Adjust
elseif (Scaling == "Oversize") then
UIScale = 0.64 + Adjust + Adjust + Adjust
end
-- This is for 4K with pixel pecfection scaling
if (T.ScreenHeight >= 1600) and (Scaling == "Pixel Perfection") then
UIScale = UIScale * 2 -- Pixel Perfection Scaling, X 2 to still be almost pixel perfect, should be around 0.71
end
T.Mult = 768 / string.match(T.Resolution, "%d+x(%d+)") / UIScale
T.UIScale = UIScale
-- PANELS
T["Panels"]:Enable()
-- INVENTORY
-- Bags
if (C.Bags.Enable) then
T["Inventory"]["Bags"]:Enable()
end
-- Loot Frame
T["Inventory"]["Loot"]:Enable()
-- Merchant
T["Inventory"]["Merchant"]:Enable()
-- ACTION BARS
if (C.ActionBars.Enable) then
T["ActionBars"]:Enable()
end
-- COOLDOWNS
T["Cooldowns"]:Enable()
-- MISCELLANEOUS
if C["Misc"].ThreatBarEnable then
T["Miscellaneous"]["ThreatBar"]:Enable()
end
if C["Misc"].AltPowerBarEnable then
T["Miscellaneous"]["AltPowerBar"]:Enable()
end
if C["Misc"].ExperienceEnable then
T["Miscellaneous"]["Experience"]:Enable()
end
if C["Misc"].ReputationEnable then
T["Miscellaneous"]["Reputation"]:Enable()
end
if C["Misc"].ErrorFilterEnable then
T["Miscellaneous"]["ErrorFilter"]:Enable()
end
if C["Misc"].AutoInviteEnable then
T["Miscellaneous"]["Invite"]:Enable()
end
T["Miscellaneous"]["MirrorTimers"]:Enable()
T["Miscellaneous"]["DropDown"]:Enable()
T["Miscellaneous"]["CollectGarbage"]:Enable()
T["Miscellaneous"]["GameMenu"]:Enable()
T["Miscellaneous"]["LossControl"]:Enable()
T["Miscellaneous"]["StaticPopups"]:Enable()
T["Miscellaneous"]["TimerTracker"]:Enable()
T["Miscellaneous"]["Durability"]:Enable()
T["Miscellaneous"]["UIWidgets"]:Enable()
T["Miscellaneous"]["Ghost"]:Enable()
T["Miscellaneous"]["VehicleIndicator"]:Enable()
T["Miscellaneous"]["TalkingHead"]:Enable()
T["Miscellaneous"]["DeathRecap"]:Enable()
T["Miscellaneous"]["AFK"]:Enable()
T["Miscellaneous"]["OrderHall"]:Enable()
T["Miscellaneous"]["UIErrorFilter"]:Enable()
-- BUFFS
if (C.Auras.Enable) then
T["Auras"]:Enable()
end
-- Maps
T["Maps"]["Minimap"]:Enable()
T["Maps"]["Zonemap"]:Enable()
T["Maps"]["Worldmap"]:Enable()
-- DATATEXTS
T["DataTexts"]:Enable()
-- CHAT
T["Chat"]:Enable()
-- UNITFRAMES
T["UnitFrames"]:Enable()
-- TOOLTIPS
T["Tooltips"]:Enable()
-- PET BATTLES
T["PetBattles"]:Enable()
-- Because peoples seem to not know about this?
print(T.WelcomeMessage)
function Loading:Enable()
local Toolkit = T00LKIT
self:StoreDefaults()
self:LoadCustomSettings()
Toolkit.Settings.BackdropColor = C.General.BackdropColor
Toolkit.Settings.BorderColor = C.General.BorderColor
Toolkit.Settings.UIScale = C.General.UIScale
SetCVar("uiScale", Toolkit.Settings.UIScale)
SetCVar("useUiScale", 1)
if C.General.HideShadows then
Toolkit.Settings.ShadowTexture = ""
end
end
-- Taint Fix
ShowUIPanel(SpellBookFrame)
HideUIPanel(SpellBookFrame)
function Loading:OnEvent(event)
if (event == "PLAYER_LOGIN") then
T["Panels"]:Enable()
T["Inventory"]["Bags"]:Enable()
T["Inventory"]["Loot"]:Enable()
T["Inventory"]["Merchant"]:Enable()
T["ActionBars"]:Enable()
T["Cooldowns"]:Enable()
T["Miscellaneous"]["Experience"]:Enable()
T["Miscellaneous"]["Reputation"]:Enable()
T["Miscellaneous"]["ErrorFilter"]:Enable()
T["Miscellaneous"]["MirrorTimers"]:Enable()
T["Miscellaneous"]["DropDown"]:Enable()
T["Miscellaneous"]["CollectGarbage"]:Enable()
T["Miscellaneous"]["GameMenu"]:Enable()
T["Miscellaneous"]["StaticPopups"]:Enable()
T["Miscellaneous"]["Durability"]:Enable()
T["Miscellaneous"]["UIWidgets"]:Enable()
T["Miscellaneous"]["AFK"]:Enable()
T["Miscellaneous"]["MicroMenu"]:Enable()
T["Auras"]:Enable()
T["Maps"]["Minimap"]:Enable()
T["Maps"]["Zonemap"]:Enable()
T["Maps"]["Worldmap"]:Enable()
T["DataTexts"]:Enable()
T["Chat"]:Enable()
T["UnitFrames"]:Enable()
T["Tooltips"]:Enable()
T.Print("Welcome |c"..RAID_CLASS_COLORS[T.MyClass].colorStr..T.MyName.."|r! For a commands list, type /tukui")
elseif (event == "PLAYER_ENTERING_WORLD") then
-- OBJECTIVE TRACKER
T["Miscellaneous"]["ObjectiveTracker"]:Enable()
T["Miscellaneous"]["ObjectiveTracker"]:Enable()
elseif (event == "VARIABLES_LOADED") then
T["Loading"]:Enable()
T["GUI"]:Enable()
end
end
Loading:RegisterEvent("PLAYER_LOGIN")
Loading:RegisterEvent("VARIABLES_LOADED")
Loading:RegisterEvent("PLAYER_ENTERING_WORLD")
Loading:RegisterEvent("ADDON_LOADED")
Loading:SetScript("OnEvent", Loading.OnEvent)
T["Loading"] = Loading
T["Loading"] = Loading
\ No newline at end of file
......@@ -7,14 +7,14 @@ local Locale = GetLocale()
local TukuiFont = CreateFont("TukuiFont")
TukuiFont:SetFont(C["Medias"].Font, 12)
TukuiFont:SetShadowColor(0, 0, 0)
TukuiFont:SetShadowOffset(1.25, -1.25)
TukuiFont:SetShadowOffset(1, -1)
local TukuiFontOutline = CreateFont("TukuiFontOutline")
TukuiFontOutline:SetFont(C["Medias"].Font, 12, "THINOUTLINE")
local TukuiUFFont = CreateFont("TukuiUFFont")
TukuiUFFont:SetShadowColor(0, 0, 0)
TukuiUFFont:SetShadowOffset(1.25, -1.25)
TukuiUFFont:SetShadowOffset(1, -1)
TukuiUFFont:SetFont(C["Medias"].UnitFrameFont, 12)
local TukuiUFFontOutline = CreateFont("TukuiUFFontOutline")
......@@ -25,7 +25,7 @@ PixelFont:SetFont(C["Medias"].PixelFont, 12, "MONOCHROMEOUTLINE")
local TextureTable = {
["Blank"] = [[Interface\BUTTONS\WHITE8X8]],
["Tukui"] = [[Interface\AddOns\Tukui\Medias\Textures\Status\Tukui1]],
["Tukui"] = [[Interface\AddOns\Tukui\Medias\Textures\Status\Tukui]],
["ElvUI1"] = [[Interface\AddOns\Tukui\Medias\Textures\Status\ElvUI1]],
["ElvUI2"] = [[Interface\AddOns\Tukui\Medias\Textures\Status\ElvUI2]],
["sRainbow1"] = [[Interface\AddOns\Tukui\Medias\Textures\Status\Rainbow1]],
......
......@@ -35,6 +35,10 @@ function Movers:RestoreDefaults(button)
local Anchor1, ParentName, Anchor2, X, Y = unpack(Data)
local Frame = _G[FrameName]
local Parent = _G[ParentName]
if not Parent then
Parent = UIParent
end
Frame:ClearAllPoints()
Frame:SetPoint(Anchor1, Parent, Anchor2, X, Y)
......@@ -56,6 +60,8 @@ function Movers:RegisterFrame(frame)
end
function Movers:OnDragStart()
GameTooltip_Hide()
self:StartMoving()
end
......@@ -75,14 +81,29 @@ function Movers:OnDragStop()
end
Data[FrameName] = {Anchor1, Parent:GetName(), Anchor2, X, Y}
Movers:OnEnter()
end
function Movers:OnEnter()
GameTooltip:SetOwner(self)
GameTooltip:SetAnchorType("ANCHOR_CURSOR")
GameTooltip:AddLine("Hold left click to drag") -- LOCALIZE ME PLZ
GameTooltip:AddLine("Right click to reset default") -- LOCALIZE ME PLZ
GameTooltip:Show()
end
function Movers:OnLeave()
GameTooltip_Hide()
end
function Movers:CreateDragInfo()
self.DragInfo = CreateFrame("Button", nil, self)
self.DragInfo:SetAllPoints(self)
self.DragInfo:SetTemplate()
self.DragInfo:SetBackdropBorderColor(1, 0, 0)
self.DragInfo:FontString("Text", C.Medias.UnitFrameFont, 12)
self.DragInfo:SetBorderColor(1, 0, 0)
self.DragInfo.Text = self.DragInfo:CreateFontString(nil, "OVERLAY")
self.DragInfo.Text:SetFontTemplate(C.Medias.UnitFrameFont, 12)
self.DragInfo.Text:SetText(self:GetName())
self.DragInfo.Text:SetPoint("CENTER")
self.DragInfo.Text:SetTextColor(1, 0, 0)
......@@ -90,8 +111,11 @@ function Movers:CreateDragInfo()
self.DragInfo:SetFrameStrata("HIGH")
self.DragInfo:SetMovable(true)
self.DragInfo:RegisterForDrag("LeftButton")
self.DragInfo:SetClampedToScreen(true)
self.DragInfo:Hide()
self.DragInfo:SetScript("OnMouseUp", Movers.RestoreDefaults)
self.DragInfo:SetScript("OnEnter", Movers.OnEnter)
self.DragInfo:SetScript("OnLeave", Movers.OnLeave)
self.DragInfo.Parent = self.DragInfo:GetParent()
end
......@@ -175,10 +199,6 @@ end
Movers:SetScript("OnEvent", function(self, event)
if (event == "PLAYER_ENTERING_WORLD") then
if not TukuiData[GetRealmName()][UnitName("Player")].Move then
TukuiData[GetRealmName()][UnitName("Player")].Move = {}
end
local Data = TukuiData[GetRealmName()][UnitName("Player")].Move
for Frame, Position in pairs(Data) do
......
......@@ -37,7 +37,8 @@ function TukuiPopups:CreatePopups()
Frames[i].Button1:SetSize(199, 23)
Frames[i].Button1:SetTemplate()
Frames[i].Button1:CreateShadow()
Frames[i].Button1:FontString("Text", C.Medias.Font, 12)
Frames[i].Button1.Text = Frames[i].Button1:CreateFontString(nil, "OVERLAY")
Frames[i].Button1.Text:SetFontTemplate(C.Medias.Font, 12)
Frames[i].Button1.Text:SetPoint("CENTER")
Frames[i].Button1.Text:SetText(ACCEPT)
Frames[i].Button1:SetScript("OnClick", TukuiPopups.HidePopup)
......@@ -48,8 +49,9 @@ function TukuiPopups:CreatePopups()
Frames[i].Button2:SetPoint("TOPRIGHT", Frames[i], "BOTTOMRIGHT", 0, -2)
Frames[i].Button2:SetSize(199, 23)
Frames[i].Button2:SetTemplate("Default")
Frames[i].Button2:CreateShadow("Default")
Frames[i].Button2:FontString("Text", C.Medias.Font, 12)
Frames[i].Button2:CreateShadow()
Frames[i].Button2.Text = Frames[i].Button2:CreateFontString(nil, "OVERLAY")
Frames[i].Button2.Text:SetFontTemplate(C.Medias.Font, 12)
Frames[i].Button2.Text:SetPoint("CENTER")
Frames[i].Button2.Text:SetText(CANCEL)
Frames[i].Button2:SetScript("OnClick", TukuiPopups.HidePopup)
......@@ -145,6 +147,8 @@ function TukuiPopups:ShowPopup()
Button1:HookScript("OnClick", TukuiPopups.HidePopup)
Button2:HookScript("OnClick", TukuiPopups.HidePopup)
Popup.CurrentPopup = self
Popup:Show()
end
......
......@@ -5,7 +5,7 @@ local Status = CreateFrame("Frame", "TukuiStatus", UIParent)
function Status:AddonsCheck()
for i = 1, GetNumAddOns() do
local Name = GetAddOnInfo(i)
if ((Name ~= "Tukui" and Name ~= "Tukui_Config") and IsAddOnLoaded(Name)) then
if ((Name ~= "Tukui") and IsAddOnLoaded(Name)) then
return "Yes"
end
end
......@@ -19,11 +19,15 @@ function Status:ShowWindow()
self:SetPoint("CENTER")
self:SetTemplate("Transparent")
self:CreateShadow()
self.FrameLogo = CreateFrame("Frame", nil, self)
self.FrameLogo:SetAllPoints()
self.FrameLogo:SetFrameLevel(self:GetFrameLevel() + 1)
self.Logo = Status:CreateTexture(nil, "OVERLAY")
self.Logo = self.FrameLogo:CreateTexture(nil, "OVERLAY")
self.Logo:Size(256, 128)
self.Logo:SetTexture(C.Medias.Logo)
self.Logo:Point("TOP", Status, "TOP", -8, 68)
self.Logo:Point("TOP", self, "TOP", -8, 68)
self.Title = self:CreateFontString(nil, "OVERLAY")
self.Title:SetFont(C.Medias.Font, 16, "THINOUTLINE")
......@@ -43,7 +47,7 @@ function Status:ShowWindow()
self.Addons:SetText("Other AddOns Enabled: "..self.Addons.Value)
self.UIScale = self:CreateFontString(nil, "OVERLAY")
self.UIScale.Value = C.General.Scaling.Value.." ("..T.UIScale..")"
self.UIScale.Value = C.General.UIScale
self.UIScale:SetFont(C.Medias.Font, 12, "THINOUTLINE")
self.UIScale:SetPoint("TOP", self.Addons, 0, -20)
self.UIScale:SetText("Scaling: "..self.UIScale.Value)
......@@ -90,16 +94,10 @@ function Status:ShowWindow()
self.Class:SetPoint("TOP", self.Race, 0, -20)
self.Class:SetText("Class: "..self.Class.Value)
self.Spec = self:CreateFontString(nil, "OVERLAY")
self.Spec.Value = select(2, GetSpecializationInfo(GetSpecialization()))
self.Spec:SetFont(C.Medias.Font, 12, "THINOUTLINE")
self.Spec:SetPoint("TOP", self.Class, 0, -20)
self.Spec:SetText("Specialization: "..self.Spec.Value)
self.Level = self:CreateFontString(nil, "OVERLAY")
self.Level.Value = UnitLevel("player")
self.Level:SetFont(C.Medias.Font, 12, "THINOUTLINE")
self.Level:SetPoint("TOP", self.Spec, 0, -20)
self.Level:SetPoint("TOP", self.Class, 0, -20)
self.Level:SetText("Level: "..self.Level.Value)
self.Zone = self:CreateFontString(nil, "OVERLAY")
......
......@@ -3,6 +3,3 @@
----------------------------------
local T, C, L = select(2, ...):unpack()
-- Temp for 8.0.1
GroupLootContainer:EnableMouse(false)
\ No newline at end of file
local T, C, L = select(2, ...):unpack()
local Toolkit = T00LKIT
local Settings = Toolkit.Settings
local API = Toolkit.API
local Functions = Toolkit.Functions
local Scales = Toolkit.UIScales
local Frames = Toolkit.Frames
-- Enable the API
Toolkit:Enable()
-- Settings we want to use for our API
Settings.NormalTexture = C.Medias.Blank
Settings.ShadowTexture = C.Medias.Glow
Settings.ArrowUpTexture = "Interface\\AddOns\\Tukui\\Medias\\Textures\\Others\\ArrowUp"
Settings.ArrowDownTexture = "Interface\\AddOns\\Tukui\\Medias\\Textures\\Others\\ArrowDown"
Settings.CloseTexture = "Interface\\AddOns\\Tukui\\Medias\\Textures\\Others\\Close"
Settings.DefaultFont = C.Medias.Font
Settings.BackdropColor = C.General.BackdropColor
Settings.BorderColor = C.General.BorderColor
Settings.ClassColors = T.Colors.class
\ No newline at end of file
......@@ -2,8 +2,7 @@ local T, C, L = select(2, ...):unpack()
local TukuiVersion = CreateFrame("Frame")
local Version = tonumber(GetAddOnMetadata("Tukui", "Version"))
local MyName = UnitName("player") .. "-" .. GetRealmName()
MyName = gsub(MyName, "%s+", "")
local MyName = gsub(UnitName("player") .. "-" .. GetRealmName(), "%s+", "")
function TukuiVersion:Check(event, prefix, message, channel, sender)
if (event == "CHAT_MSG_ADDON") then
......
--[[ $Id: CallbackHandler-1.0.lua 22 2018-07-21 14:17:22Z nevcairiel $ ]]
local MAJOR, MINOR = "CallbackHandler-1.0", 7
local CallbackHandler = LibStub:NewLibrary(MAJOR, MINOR)
if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}
-- Lua APIs
local tconcat = table.concat
local assert, error, loadstring = assert, error, loadstring
local setmetatable, rawset, rawget = setmetatable, rawset, rawget