Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Shestak/ShestakUI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oz committed Nov 28, 2012
2 parents b43b83d + c77e68b commit 9968299
Show file tree
Hide file tree
Showing 35 changed files with 136 additions and 117 deletions.
1 change: 0 additions & 1 deletion ShestakUI/Config/Settings.lua
Expand Up @@ -270,7 +270,6 @@ C["tooltip"] = {
["who_targetting"] = true, -- Show who is targetting the unit(in raid or party)
["item_count"] = true, -- Item count in tooltip
["unit_role"] = false, -- Unit role in tooltip
["reforge"] = true, -- Item reforge info
["symbiosis"] = true, -- Symbiosis info
["instance_lock"] = false, -- Your instance lock status in tooltip
["item_transmogrify"] = true, -- Displays items can not be transmogrified
Expand Down
7 changes: 3 additions & 4 deletions ShestakUI/Core/Functions.lua
Expand Up @@ -1008,6 +1008,9 @@ local ticks = {}
local channelingTicks = T.CastBarTicks

local setBarTicks = function(Castbar, ticknum)
for k, v in pairs(ticks) do
v:Hide()
end
if ticknum and ticknum > 0 then
local delta = Castbar:GetWidth() / ticknum
for k = 1, ticknum do
Expand All @@ -1023,10 +1026,6 @@ local setBarTicks = function(Castbar, ticknum)
ticks[k]:SetPoint("CENTER", Castbar, "RIGHT", -delta * k, 0)
ticks[k]:Show()
end
else
for k, v in pairs(ticks) do
v:Hide()
end
end
end

Expand Down
10 changes: 10 additions & 0 deletions ShestakUI/Core/Kill.lua
Expand Up @@ -82,4 +82,14 @@ frame:SetScript("OnEvent", function(self, event, addon)
InterfaceOptionsCombatTextPanelHealing:Kill()
end
end

if IsAddOnLoaded("ShestakUI_Filger") then
SetCVar("lossOfControl", 0)
InterfaceOptionsCombatPanelLossOfControl:Kill()
InterfaceOptionsCombatPanelLossOfControlFullDropDown:Kill()
InterfaceOptionsCombatPanelLossOfControlSilenceDropDown:Kill()
InterfaceOptionsCombatPanelLossOfControlInterruptDropDown:Kill()
InterfaceOptionsCombatPanelLossOfControlDisarmDropDown:Kill()
InterfaceOptionsCombatPanelLossOfControlRootDropDown:Kill()
end
end)
4 changes: 2 additions & 2 deletions ShestakUI/Libs/oUF/Elements/HarmonyOrbs.lua
Expand Up @@ -6,7 +6,7 @@ local oUF = ns.oUF
local SPELL_POWER_CHI = SPELL_POWER_CHI

local function Update(self, event, unit, powerType)
if(self.unit ~= unit or (powerType and powerType ~= 'LIGHT_FORCE')) then return end
if(self.unit ~= unit and (powerType and (powerType ~= 'CHI' and powerType ~= 'DARK_FORCE'))) then return end

local hb = self.HarmonyBar

Expand Down Expand Up @@ -57,7 +57,7 @@ local Path = function(self, ...)
end

local ForceUpdate = function(element)
return Path(element.__owner, 'ForceUpdate', element.__owner.unit, 'LIGHT_FORCE')
return Path(element.__owner, 'ForceUpdate', element.__owner.unit, 'CHI')
end

local function Enable(self, unit)
Expand Down
2 changes: 1 addition & 1 deletion ShestakUI/Libs/oUF/Elements/Tags.lua
Expand Up @@ -293,7 +293,7 @@ local tagStrings = {
end]],

['chi'] = [[function()
local num = UnitPower('player', SPELL_POWER_LIGHT_FORCE)
local num = UnitPower('player', SPELL_POWER_CHI)
if(num > 0) then
return num
end
Expand Down
4 changes: 2 additions & 2 deletions ShestakUI/Modules/Blizzard/CombatText.lua
Expand Up @@ -187,7 +187,7 @@ local function OnEvent(self, event, subevent, ...)
end
elseif subevent == "ENERGIZE" and COMBAT_TEXT_SHOW_ENERGIZE == "1" then
if tonumber(arg2) > 0 then
if arg3 and arg3 == "MANA" or arg3 == "RAGE" or arg3 == "FOCUS" or arg3 == "ENERGY" or arg3 == "RUNIC_POWER" or arg3 == "SOUL_SHARDS" or arg3 == "HOLY_POWER" or arg3 == "LIGHT_FORCE" then
if arg3 and arg3 == "MANA" or arg3 == "RAGE" or arg3 == "FOCUS" or arg3 == "ENERGY" or arg3 == "RUNIC_POWER" or arg3 == "SOUL_SHARDS" or arg3 == "HOLY_POWER" or arg3 == "CHI" then
xCT3:AddMessage("+"..arg2.." ".._G[arg3], PowerBarColor[arg3].r, PowerBarColor[arg3].g, PowerBarColor[arg3].b)
elseif arg3 and arg3 == "ECLIPSE" then
xCT3:AddMessage("+"..arg2.." "..BALANCE_POSITIVE_ENERGY, PowerBarColor[arg3].positive.r, PowerBarColor[arg3].positive.g, PowerBarColor[arg3].positive.b)
Expand All @@ -199,7 +199,7 @@ local function OnEvent(self, event, subevent, ...)
end
elseif subevent == "PERIODIC_ENERGIZE" and COMBAT_TEXT_SHOW_PERIODIC_ENERGIZE == "1" then
if tonumber(arg2) > 0 then
if arg3 and arg3 == "MANA" or arg3 == "RAGE" or arg3 == "FOCUS" or arg3 == "ENERGY" or arg3 == "RUNIC_POWER" or arg3 == "SOUL_SHARDS" or arg3 == "HOLY_POWER" or arg3 == "LIGHT_FORCE" then
if arg3 and arg3 == "MANA" or arg3 == "RAGE" or arg3 == "FOCUS" or arg3 == "ENERGY" or arg3 == "RUNIC_POWER" or arg3 == "SOUL_SHARDS" or arg3 == "HOLY_POWER" or arg3 == "CHI" then
xCT3:AddMessage("+"..arg2.." ".._G[arg3], PowerBarColor[arg3].r, PowerBarColor[arg3].g, PowerBarColor[arg3].b)
elseif arg3 and arg3 == "ECLIPSE" then
xCT3:AddMessage("+"..arg2.." "..BALANCE_POSITIVE_ENERGY, PowerBarColor[arg3].positive.r, PowerBarColor[arg3].positive.g, PowerBarColor[arg3].positive.b)
Expand Down
44 changes: 31 additions & 13 deletions ShestakUI/Modules/Blizzard/Nameplates.lua
Expand Up @@ -39,8 +39,8 @@ end
-- Create a fake backdrop frame using textures
local function CreateVirtualFrame(parent, point)
if point == nil then point = parent end

if point.backdrop then return end

parent.backdrop = parent:CreateTexture(nil, "BORDER")
parent.backdrop:SetDrawLayer("BORDER", -8)
parent.backdrop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult * 3, noscalemult * 3)
Expand Down Expand Up @@ -181,7 +181,7 @@ end

-- Determine whether or not the cast is Channelled or a Regular cast so we can grab the proper Cast Name
local function UpdateCastText(frame, curValue)
local minValue, maxValue = frame:GetMinMaxValues()
local _, maxValue = frame:GetMinMaxValues()

if UnitChannelInfo("target") then
frame.time:SetFormattedText("%.1f ", curValue)
Expand Down Expand Up @@ -215,6 +215,7 @@ end
-- We need to reset everything when a nameplate it hidden
local function OnHide(frame)
frame.hp:SetStatusBarColor(frame.hp.rcolor, frame.hp.gcolor, frame.hp.bcolor)
--frame.hp:SetScale(1)
frame.overlay:Hide()
frame.cb:Hide()
frame.unit = nil
Expand Down Expand Up @@ -255,7 +256,11 @@ local function Colorize(frame)
end
end

if g + b == 0 then -- Hostile
if r + b + b > 2 then -- Tapped
r, g, b = 0.6, 0.6, 0.6
frame.isFriendly = false
texcoord = {0, 0, 0, 0}
elseif g + b == 0 then -- Hostile
r, g, b = unpack(T.oUF_colors.reaction[1])
frame.isFriendly = false
texcoord = {0, 0, 0, 0}
Expand Down Expand Up @@ -287,13 +292,19 @@ local function Colorize(frame)
end

frame.hp:SetStatusBarColor(r, g, b)
frame.hp.hpbg:SetTexture(r, g, b, 0.25)
end

-- HealthBar OnShow, use this to set variables for the nameplate
local function UpdateObjects(frame)
local frame = frame:GetParent()
local r, g, b = frame.hp:GetStatusBarColor()

-- Set scale
--while frame.hp:GetEffectiveScale() < 1 do
-- frame.hp:SetScale(frame.hp:GetScale() + 0.01)
--end

-- Have to reposition this here so it doesnt resize after being hidden
frame.hp:ClearAllPoints()
frame.hp:SetSize(C.nameplate.width * noscalemult, C.nameplate.height * noscalemult)
Expand Down Expand Up @@ -360,9 +371,10 @@ local function UpdateObjects(frame)
end

-- This is where we create most 'Static' objects for the nameplate
local function SkinObjects(frame)
local function SkinObjects(frame, nameFrame)
local oldhp, cb = frame:GetChildren()
local threat, hpborder, overlay, oldname, oldlevel, bossicon, raidicon, elite = frame:GetRegions()
local threat, hpborder, overlay, oldlevel, bossicon, raidicon, elite = frame:GetRegions()
local oldname = nameFrame:GetRegions()
local _, cbborder, cbshield, cbicon = cb:GetRegions()

-- Health Bar
Expand Down Expand Up @@ -406,6 +418,10 @@ local function SkinObjects(frame)
hp:HookScript("OnShow", UpdateObjects)
frame.hp = hp

if not frame.threat then
frame.threat = threat
end

-- Create Cast Bar
cb:SetStatusBarTexture(C.media.texture)
CreateVirtualFrame(cb)
Expand Down Expand Up @@ -501,8 +517,8 @@ local function UpdateThreat(frame, elapsed)
if frame.hasClass == true then return end

if C.nameplate.enhance_threat ~= true then
if frame.region:IsShown() then
local _, val = frame.region:GetVertexColor()
if frame.threat:IsShown() then
local _, val = frame.threat:GetVertexColor()
if val > 0.7 then
SetVirtualBorder(frame.hp, transitionR, transitionG, transitionB)
else
Expand All @@ -512,7 +528,7 @@ local function UpdateThreat(frame, elapsed)
SetVirtualBorder(frame.hp, unpack(C.media.border_color))
end
else
if not frame.region:IsShown() then
if not frame.threat:IsShown() then
if InCombatLockdown() and frame.isFriendly ~= true then
-- No Threat
if T.Role == "Tank" then
Expand All @@ -529,7 +545,7 @@ local function UpdateThreat(frame, elapsed)
end
else
-- Ok we either have threat or we're losing/gaining it
local r, g, b = frame.region:GetVertexColor()
local r, g, b = frame.threat:GetVertexColor()
if g + b == 0 then
-- Have Threat
if T.Role == "Tank" then
Expand Down Expand Up @@ -610,7 +626,7 @@ end

-- Scan all visible nameplate for a known unit
local function CheckUnit_Guid(frame, ...)
if UnitExists("target") and frame:GetAlpha() == 1 and UnitName("target") == frame.hp.name:GetText() then
if UnitExists("target") and frame:GetParent():GetAlpha() == 1 and UnitName("target") == frame.hp.name:GetText() then
frame.guid = UnitGUID("target")
frame.unit = "target"
OnAura(frame, "target")
Expand Down Expand Up @@ -650,11 +666,9 @@ local select = select
local function HookFrames(...)
for index = 1, select("#", ...) do
local frame = select(index, ...)
local region = frame:GetRegions()

if not frames[frame] and (frame:GetName() and not frame.isSkinned and frame:GetName():find("NamePlate%d")) then
SkinObjects(frame)
frame.region = region
SkinObjects(frame:GetChildren())
frame.isSkinned = true
end
end
Expand All @@ -680,6 +694,7 @@ NamePlates:SetScript("OnUpdate", function(self, elapsed)
ForEachPlate(ShowHealth)
ForEachPlate(CheckBlacklist)
ForEachPlate(CheckUnit_Guid)
--ForEachPlate(Colorize)
end)

function NamePlates:COMBAT_LOG_EVENT_UNFILTERED(_, event, ...)
Expand Down Expand Up @@ -715,4 +730,7 @@ function NamePlates:PLAYER_ENTERING_WORLD()
SetCVar("nameplateShowEnemies", 0)
end
end
if C.nameplate.enhance_threat == true then
SetCVar("threatWarning", 3)
end
end
4 changes: 2 additions & 2 deletions ShestakUI/Modules/Chat/ChatFrames.lua
Expand Up @@ -19,8 +19,8 @@ local AddMessage = function(self, text, ...)
end

-- Global strings
_G.CHAT_INSTANCE_CHAT_GET = "|Hchannel:INSTANCE|h["..L_CHAT_INSTANCE_CHAT.."]|h %s:\32"
_G.CHAT_INSTANCE_CHAT_LEADER_GET = "|Hchannel:INSTANCE|h["..L_CHAT_INSTANCE_CHAT_LEADER.."]|h %s:\32"
_G.CHAT_INSTANCE_CHAT_GET = "|Hchannel:INSTANCE_CHAT|h["..L_CHAT_INSTANCE_CHAT.."]|h %s:\32"
_G.CHAT_INSTANCE_CHAT_LEADER_GET = "|Hchannel:INSTANCE_CHAT|h["..L_CHAT_INSTANCE_CHAT_LEADER.."]|h %s:\32"
_G.CHAT_BN_WHISPER_GET = L_CHAT_BN_WHISPER.." %s:\32"
_G.CHAT_GUILD_GET = "|Hchannel:GUILD|h["..L_CHAT_GUILD.."]|h %s:\32"
_G.CHAT_OFFICER_GET = "|Hchannel:OFFICER|h["..L_CHAT_OFFICER.."]|h %s:\32"
Expand Down
2 changes: 1 addition & 1 deletion ShestakUI/Modules/Misc/Misc.lua
Expand Up @@ -162,10 +162,10 @@ StaticPopupDialogs.RESURRECT.hideOnEscape = nil
StaticPopupDialogs.PARTY_INVITE.hideOnEscape = nil
StaticPopupDialogs.PARTY_INVITE_XREALM.hideOnEscape = nil
StaticPopupDialogs.CONFIRM_SUMMON.hideOnEscape = nil
--PTRStaticPopupDialogs.PET_BATTLE_QUEUE_PROPOSE_MATCH.hideOnEscape = nil
StaticPopupDialogs.CONFIRM_BATTLEFIELD_ENTRY.button2 = nil
StaticPopupDialogs.ADDON_ACTION_FORBIDDEN.button1 = nil
StaticPopupDialogs.TOO_MANY_LUA_ERRORS.button1 = nil
PetBattleQueueReadyFrame.hideOnEscape = nil

----------------------------------------------------------------------------------------
-- Honor shown in tooltip
Expand Down
4 changes: 4 additions & 0 deletions ShestakUI/Modules/Skins/Blizzard/Bubbles.lua
Expand Up @@ -14,6 +14,8 @@ local function styleBubble(frame)
local region = select(i, frame:GetRegions())
if region:GetObjectType() == "Texture" then
region:SetTexture(nil)
elseif region:GetObjectType() == "FontString" then
frame.text = region
end
end

Expand All @@ -26,6 +28,8 @@ local function styleBubble(frame)
frame:SetBackdropColor(unpack(C.media.overlay_color))
frame:SetBackdropBorderColor(unpack(C.media.border_color))
frame:SetClampedToScreen(false)

frame.text:SetFont(C.media.normal_font, 14)
end

local function isChatBubble(frame)
Expand Down
3 changes: 0 additions & 3 deletions ShestakUI/Modules/Skins/Blizzard/Character.lua
Expand Up @@ -294,9 +294,6 @@ local function LoadSkin()
PetModelFrame:CreateBackdrop("Default")
PetModelFrame.backdrop:SetPoint("TOPLEFT", -2, 2)
PetModelFrame.backdrop:SetPoint("BOTTOMRIGHT", 1, -2)
PetPaperDollFrameExpBar:StripTextures()
PetPaperDollFrameExpBar:SetStatusBarTexture(C.media.texture)
PetPaperDollFrameExpBar:CreateBackdrop("Overlay")
T.SkinRotateButton(PetModelFrameRotateRightButton)
T.SkinRotateButton(PetModelFrameRotateLeftButton)
PetModelFrameRotateLeftButton:ClearAllPoints()
Expand Down
6 changes: 6 additions & 0 deletions ShestakUI/Modules/Skins/Blizzard/Interface.lua
Expand Up @@ -67,6 +67,7 @@ local function LoadSkin()
"CombatPanelActionButtonUseKeyDown",
"CombatPanelEnemyCastBarsOnPortrait",
"CombatPanelEnemyCastBarsOnNameplates",
"CombatPanelLossOfControl",
-- Display
"DisplayPanelShowCloak",
"DisplayPanelShowHelm",
Expand Down Expand Up @@ -228,6 +229,11 @@ local function LoadSkin()
"ControlsPanelAutoLootKeyDropDown",
"CombatPanelFocusCastKeyDropDown",
"CombatPanelSelfCastKeyDropDown",
"CombatPanelLossOfControlFullDropDown",
"CombatPanelLossOfControlSilenceDropDown",
"CombatPanelLossOfControlInterruptDropDown",
"CombatPanelLossOfControlDisarmDropDown",
"CombatPanelLossOfControlRootDropDown",
"SocialPanelChatStyle",
"SocialPanelWhisperMode",
"SocialPanelTimestamps",
Expand Down
20 changes: 12 additions & 8 deletions ShestakUI/Modules/Skins/Blizzard/ItemUpgrade.lua
Expand Up @@ -7,28 +7,32 @@ if C.skins.blizzard_frames ~= true then return end
local function LoadSkin()
ItemUpgradeFrame:StripTextures()
ItemUpgradeFrame:SetTemplate("Transparent")
ItemUpgradeFrameShadows:Kill()
ItemUpgradeFrameInset:Kill()

T.SkinCloseButton(ItemUpgradeFrameCloseButton)
ItemUpgradeFrameMoneyFrame:StripTextures()
ItemUpgradeFrame.ButtonFrame:StripTextures()

ItemUpgradeFrameUpgradeButton:ClearAllPoints()
ItemUpgradeFrameUpgradeButton:SetPoint("BOTTOMRIGHT", ItemUpgradeFrame, "BOTTOMRIGHT", -3, 3)
ItemUpgradeFrameUpgradeButton:SkinButton(true)

ItemUpgradeFrame.ItemButton:StripTextures()
ItemUpgradeFrame.ItemButton:SetTemplate("Default")
ItemUpgradeFrame.ItemButton:StyleButton()
ItemUpgradeFrame.ItemButton.IconTexture:ClearAllPoints()
ItemUpgradeFrame.ItemButton.IconTexture:SetPoint("TOPLEFT", 2, -2)
ItemUpgradeFrame.ItemButton.IconTexture:SetPoint("BOTTOMRIGHT", -2, 2)

hooksecurefunc("ItemUpgradeFrame_Update", function()
if GetItemUpgradeItemInfo() then
ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(1)
ItemUpgradeFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9)
else
ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(0)
ItemUpgradeFrame.ItemButton.IconTexture:SetTexture(nil)
end
end)

ItemUpgradeFrameMoneyFrame:StripTextures()
ItemUpgradeFrameUpgradeButton:StripTextures()
ItemUpgradeFrameUpgradeButton:SkinButton()
ItemUpgradeFrame.FinishedGlow:Kill()

T.SkinCloseButton(ItemUpgradeFrameCloseButton)
end

T.SkinFuncs["Blizzard_ItemUpgradeUI"] = LoadSkin
1 change: 1 addition & 0 deletions ShestakUI/Modules/Skins/Blizzard/LoadFrames.xml
Expand Up @@ -36,6 +36,7 @@
<Script file="LFG.lua"/>
<Script file="LFR.lua"/>
<Script file="Loot.lua"/>
<Script file="LossOfControl.lua"/>
<Script file="MacClient.lua"/>
<Script file="Macro.lua"/>
<Script file="Mail.lua"/>
Expand Down

0 comments on commit 9968299

Please sign in to comment.