Skip to content

Commit

Permalink
1.0a
Browse files Browse the repository at this point in the history
Skinned frames currently unskinned in Tukui, made some more frames
transparent, made some adjustments to some things, cleaned up some code.
  • Loading branch information
Pat committed Dec 13, 2013
1 parent 988edea commit 4ff8b7c
Show file tree
Hide file tree
Showing 25 changed files with 199 additions and 342 deletions.
4 changes: 2 additions & 2 deletions PatUI/PatUI.toc
@@ -1,8 +1,8 @@
## Interface: 50200
## Interface: 50400
## Title: |cff18AA18PatUI|r
## Notes:
## Credits: Tukz, Sinaris, Ekst, Flyingboots, Elv22, Eclipse, Hydra
## Version: 0.9
## Version: 1.0a
## Author: Pat
## RequiredDeps: PatUI_Config, Tukui

Expand Down
56 changes: 32 additions & 24 deletions PatUI/core/api.lua
Expand Up @@ -85,6 +85,37 @@ local function CreateBorder(self)
ThickBorder(border)
end

-- using Elvz code to skin transmog frame when you're about to use an item that can be still be returned for a refund.
function HandleItemButton(b, shrinkIcon)
if b.isSkinned then return; end

b:StripTextures()
b:CreateBackdrop("Default")
b:StyleButton()

local icon = b.icon or b.IconTexture
if b:GetName() and _G[b:GetName()..'IconTexture'] then
icon = _G[b:GetName()..'IconTexture']
elseif b:GetName() and _G[b:GetName()..'Icon'] then
icon = _G[b:GetName()..'Icon']
end

if icon then
icon:SetTexCoord(.08, .92, .08, .92)

-- create a backdrop around the icon

if shrinkIcon then
b.backdrop:SetAllPoints()
icon:SetInside(b)
else
b.backdrop:SetOutside(icon)
end
icon:SetParent(b.backdrop)
end
b.isSkinned = true
end

P.RoleIconUpdate = function(self, event)
local lfdrole = self.LFDRole

Expand All @@ -111,39 +142,16 @@ local function PatSkin(f)
ThickBorder(f)
end

local function SkinCheckBox(frame)
frame:StripTextures()

frame.Display = CreateFrame('Frame', nil, frame)
frame.Display:SetSize(12, 12)
PatSkin(frame.Display)
frame.Display:SetPoint("CENTER")

frame:SetFrameLevel(frame:GetFrameLevel()+1)
frame.Display:SetFrameLevel(frame:GetFrameLevel()-1)

--Time to sexify these textures
local checked = frame.Display:CreateTexture(nil, 'OVERLAY')
checked:SetTexture(0, .7, 1, 1)
checked:SetInside(frame.Display)
frame:SetCheckedTexture(checked)

local hover = frame.Display:CreateTexture(nil, 'OVERLAY')
hover:SetTexture(1, 1, 1, 0.3)
hover:SetInside(frame.Display)
frame:SetHighlightTexture(hover)
end

local function addapi(object)
local mt = getmetatable(object).__index
mt.SkinCheckBox = SkinCheckBox
if not object.CreateBorder then mt.CreateBorder = CreateBorder end
if not object.SetBorder then mt.SetBorder = SetBorder end
if not object.AllPoints then mt.AllPoints = AllPoints end
if not object.ThickBorder then mt.ThickBorder = ThickBorder end
if not object.InnerBorder then mt.Innerborder = innerBorder end
if not object.OuterBorder then mt.Outerborder = outerBorder end
if not object.PatSkin then mt.PatSkin = PatSkin end
if not object.HandleItemButton then mt.HandleItemButton = HandleItemButton end
end

local handled = {["Frame"] = true}
Expand Down
8 changes: 8 additions & 0 deletions PatUI/modules/actionbars/bar3.lua
Expand Up @@ -2,6 +2,14 @@ local P, C, L, G = unpack(Tukui)

TukuiBar3:SetAlpha(0)

local Bar3 = CreateFrame("Frame", "Bar3", UIParent, "SecureHandlerStateTemplate")
Bar3:Point("BOTTOM", TukuiTabsLeftBackground, "TOP", 0, 12)
Bar3:Width((P.buttonsize * 12) + (P.buttonspacing * 13))
Bar3:Height((P.buttonsize * 1) + (P.buttonspacing * 2))
Bar3:SetFrameStrata("BACKGROUND")
Bar3:SetFrameLevel(3)
Bar3:SetTemplate("Transparent")

local bar = Bar3
MultiBarBottomRight:SetParent(bar)

Expand Down
2 changes: 1 addition & 1 deletion PatUI/modules/actionbars/style.lua
Expand Up @@ -14,6 +14,6 @@ local function style(self)
local HotKey = _G[name.."HotKey"]

Count:SetFont(C["media"].pixelfont, C.media.pfontsize, "MONOCHROMEOUTLINE")
HotKey:SetFont(C["media"].pixelfont, C.media.pfontsize, "MONOCHROMEOUTLINE")
HotKey:SetFont(C["media"].font, 12, "THINOUTLINE33")
end
hooksecurefunc("ActionButton_Update", style)
4 changes: 2 additions & 2 deletions PatUI/modules/classbars/combopoints.lua
Expand Up @@ -14,7 +14,7 @@ local colors = {

local cpoints = CreateFrame("Frame", "TukuiComboPoints", UIParent)
cpoints:Width(TukuiPlayer:GetWidth())
cpoints:Height(8)
cpoints:Height(3)
cpoints:Point("BOTTOMLEFT", TukuiPlayer, "TOPLEFT", 0, 6)
cpoints:CreateBorder()
cpoints:SetFrameLevel(10)
Expand All @@ -24,7 +24,7 @@ local points = {}
for i=1,MAX_COMBO_POINTS do
points[i] = CreateFrame("Frame", "TukuiComboPoints_Point"..i, cpoints)
points[i]:SetWidth((TukuiPlayer:GetWidth()-(MAX_COMBO_POINTS) + 1) / MAX_COMBO_POINTS)
points[i]:SetHeight(8)
points[i]:SetHeight(3)
points[i].tex = points[i]:CreateTexture(nil, "OVERLAY")
points[i].tex:SetTexture(C.media.normTex)
points[i].tex:SetVertexColor(unpack(colors[i]))
Expand Down
21 changes: 2 additions & 19 deletions PatUI/modules/classbars/eclipsebar.lua
Expand Up @@ -8,7 +8,7 @@ local self = _G["TukuiPlayer"]

self.EclipseBar:ClearAllPoints()
self.EclipseBar:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 6)
self.EclipseBar:Size(self:GetWidth(), 6)
self.EclipseBar:Size(self:GetWidth(), 3)
self.EclipseBar:CreateBorder()

self.EclipseBar.LunarBar:SetSize(self.EclipseBar:GetWidth(), self.EclipseBar:GetHeight())
Expand All @@ -17,21 +17,4 @@ self.EclipseBar.SolarBar:SetSize(self.EclipseBar:GetWidth(), self.EclipseBar:Get
self.EclipseBar.Text:ClearAllPoints()
self.EclipseBar.Text:SetPoint("CENTER", self.Health, 0, 0)
self.EclipseBar.Text:SetFont(font, fsize, "MONOCHROMEOUTLINE")
self.EclipseBar.Text:SetShadowOffset(0, 0)

if C.unitframes.druidmushroombar == true then
self.WildMushroom:ClearAllPoints()
self.WildMushroom:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 26)
self.WildMushroom:Size(self:GetWidth(), 6)
self.WildMushroom:CreateBorder()

for i = 1, 3 do
self.WildMushroom[i]:Size((self:GetWidth() / 3), 6)

if( i == 1 ) then
self.WildMushroom[i]:SetPoint("LEFT", self.WildMushroom, "LEFT", 0, 0)
else
self.WildMushroom[i]:Point("LEFT", self.WildMushroom[i - 1], "RIGHT", 1, 0)
end
end
end
self.EclipseBar.Text:SetShadowOffset(0, 0)
5 changes: 3 additions & 2 deletions PatUI/modules/classbars/harmonybar.lua
Expand Up @@ -5,14 +5,15 @@ local self = _G["TukuiPlayer"]

self.HarmonyBar:ClearAllPoints()
self.HarmonyBar:SetPoint("BOTTOM", self, "TOP", 0, 6)
self.HarmonyBar:Size(240, 6)
self.HarmonyBar:Size(240, 3)
self.HarmonyBar:SetBackdrop(nil)
self.HarmonyBar:CreateBorder()

for i = 1, 4 do
self.HarmonyBar[i]:Size(55, 2)
self.HarmonyBar[i]:SetBorder(false, true)
if (i == 1) then
self.HarmonyBar[i]:SetPoint("BOTTOM", self, "TOP", 0, 6)
self.HarmonyBar[i]:SetPoint("LEFT", self.HarmonyBar, "LEFT", 0, 0)
else
self.HarmonyBar[i]:Point("LEFT", self.HarmonyBar[i - 1], "RIGHT", 3, 0)
end
Expand Down
4 changes: 2 additions & 2 deletions PatUI/modules/classbars/holypower.lua
Expand Up @@ -7,7 +7,7 @@ local self = _G["TukuiPlayer"]

self.HolyPower:ClearAllPoints()
self.HolyPower:SetPoint("BOTTOM", self, "TOP", 0, 5)
self.HolyPower:Size(self:GetWidth(), 7) --240
self.HolyPower:Size(self:GetWidth(), 3) --240
self.HolyPower:CreateBorder()
self.HolyPower:SetFrameLevel(10)

Expand All @@ -27,7 +27,7 @@ self.HolyPower:SetScript('OnEvent', function(self, event)
self[i]:SetPoint("LEFT", self[i-1], "RIGHT", 1, 0)
end

self[i]:SetSize((totalWidth-((maxHolyPower-1)*3))/maxHolyPower, 7)
self[i]:SetSize((totalWidth-((maxHolyPower-1)*3))/maxHolyPower, 3)

if i == maxHolyPower then
self[i]:SetPoint("RIGHT", self, "RIGHT", 0, 0)
Expand Down
2 changes: 0 additions & 2 deletions PatUI/modules/classbars/magebar.lua

This file was deleted.

4 changes: 2 additions & 2 deletions PatUI/modules/classbars/runebars.lua
Expand Up @@ -5,12 +5,12 @@ local self = _G["TukuiPlayer"]

self.Runes:ClearAllPoints()
self.Runes:SetPoint("BOTTOM", self, "TOP", 0, 5)
self.Runes:Size(self:GetWidth(), 6)
self.Runes:Size(self:GetWidth(), 3)
self.Runes:CreateBorder()
self.Runes:SetFrameLevel(10)

for i = 1, 6 do
self.Runes[i]:SetSize(39, 6)
self.Runes[i]:SetSize(39.1, 3)

self.Runes[i]:ClearAllPoints()
if(i == 1) then
Expand Down
4 changes: 2 additions & 2 deletions PatUI/modules/classbars/soulshards.lua
Expand Up @@ -5,11 +5,11 @@ self = _G["TukuiPlayer"]

self.WarlockSpecBars:ClearAllPoints()
self.WarlockSpecBars:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 0, 6)
self.WarlockSpecBars:Size(self:GetWidth(), 6)
self.WarlockSpecBars:Size(self:GetWidth(), 3)
self.WarlockSpecBars:CreateBorder()

for i = 1, 4 do
self.WarlockSpecBars[i]:Size((self:GetWidth() / 4), 6)
self.WarlockSpecBars[i]:Size((self:GetWidth() / 4), 3)

if(i == 1) then
self.WarlockSpecBars[i]:SetPoint("LEFT", self.WarlockSpecBars, "LEFT", 0, 0)
Expand Down
4 changes: 2 additions & 2 deletions PatUI/modules/classbars/totemtimers.lua
Expand Up @@ -5,10 +5,10 @@ local self = _G["TukuiPlayer"]

for i = 1, 4 do
self.TotemBar[i]:ClearAllPoints()
self.TotemBar[i]:Size(53, 6)
self.TotemBar[i]:Size(53, 3)

if(i == 1) then
self.TotemBar[i]:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 5, -3)
self.TotemBar[i]:SetPoint("BOTTOMLEFT", self, "TOPLEFT", 5, 0)
else
self.TotemBar[i]:Point("LEFT", self.TotemBar[i - 1], "RIGHT", 6, 0)
end
Expand Down
134 changes: 0 additions & 134 deletions PatUI/modules/misc/AFK.lua

This file was deleted.

0 comments on commit 4ff8b7c

Please sign in to comment.