r10982 - trunk/ag_UnitFrames

1 view
Skip to first unread message

ace...@svn.wowace.com

unread,
Sep 15, 2006, 6:34:10 AM9/15/06
to clad...@gmail.com, wow...@googlegroups.com
Author: ag
Date: 2006-09-15 03:34:03 -0700 (Fri, 15 Sep 2006)
New Revision: 10982

Modified:
trunk/ag_UnitFrames/ag_FrameTemplate.xml
trunk/ag_UnitFrames/ag_UnitClass.lua
trunk/ag_UnitFrames/ag_UnitFrames-enUS.lua
trunk/ag_UnitFrames/ag_UnitFrames-zhCN.lua
trunk/ag_UnitFrames/ag_UnitFrames.lua
Log:
ag_UnitFrames
* Merged Pastamancer's patch (correct party ordering, few tag changes)
* Merged Delsphynx' patch (disable highlight option, debuff coloring only of friendly targets, shadow distance on text adjusted)

Modified: trunk/ag_UnitFrames/ag_FrameTemplate.xml
===================================================================
--- trunk/ag_UnitFrames/ag_FrameTemplate.xml 2006-09-15 10:02:56 UTC (rev 10981)
+++ trunk/ag_UnitFrames/ag_FrameTemplate.xml 2006-09-15 10:34:03 UTC (rev 10982)
@@ -5,6 +5,14 @@
<AbsValue val="8"/>
</FontHeight>
<Color r="1.0" g="1.0" b="1.0"/>
+ <!-- EE ADD -->
+ <!-- Make the text shadow offset smaller -->
+ <Shadow>
+ <Color r="0" g="0" b="0" />
+ <Offset>
+ <AbsDimension x="0.5" y="-0.5" />
+ </Offset>
+ </Shadow>
</FontString>

<FontString name="agUFCombatFont" font="Fonts\FRIZQT__.TTF" outline="NORMAL" virtual="true">

Modified: trunk/ag_UnitFrames/ag_UnitClass.lua
===================================================================
--- trunk/ag_UnitFrames/ag_UnitClass.lua 2006-09-15 10:02:56 UTC (rev 10981)
+++ trunk/ag_UnitFrames/ag_UnitClass.lua 2006-09-15 10:34:03 UTC (rev 10982)
@@ -823,8 +823,7 @@
dbcount = dbcount + 1
lastDebuff = i
if not dFound then
- if t and AuraDebuffC == true then
- self.DebuffHighlight:Show()
+ if t and AuraDebuffC == true and UnitIsFriend("player",self.unit) then -- in with the new self.DebuffHighlight:Show()
self.DebuffHighlight:SetVertexColor(DebuffTypeColor[t].r, DebuffTypeColor[t].g, DebuffTypeColor[t].b)
dFound = true
end
@@ -1451,6 +1450,47 @@
end
end

+function aUF.classes.aUFgroup.prototype.groupSortClosure()
+ local unitIdIndex = {
+ ["player"] = 1,
+ ["playerpet"] = 2,
+ ["party1"] = 3,
+ ["party1pet"] = 4,
+ ["party2"] = 5,
+ ["party2pet"] = 6,
+ ["party3"] = 7,
+ ["party3pet"] = 8,
+ ["party4"] = 9,
+ ["party4pet"] = 10,
+ }
+
+ return function (a, b)
+ return (unitIdIndex[a.unit] or 99) < (unitIdIndex[b.unit] or 99)
+ end
+end
+
+function aUF.classes.aUFgroup.prototype:EachMember(group)
+ local i = 0
+ local sortedGroup = {}
+
+ for _,member in pairs(group) do
+ table.insert(sortedGroup, member)
+ end
+
+ if not self.groupSort then
+ self.groupSort = self.groupSortClosure()
+ end
+
+ if self.groupSort then
+ table.sort(sortedGroup, self.groupSort)
+ end
+
+ return function ()
+ i = i + 1
+ return sortedGroup[i]
+ end
+end
+
function aUF.classes.aUFgroup.prototype:Update()
if self.lastFrame then
self.lastFrame:StopMovingOrSizing()
@@ -1494,7 +1534,7 @@
end

if self.group.party then
- for _,unitObject in self.group.party do
+ for unitObject in self:EachMember(self.group.party) do
table.insert(self.index, unitObject)
if self.group.partypet then
for _, unitPetObject in self.group.partypet do

Modified: trunk/ag_UnitFrames/ag_UnitFrames-enUS.lua
===================================================================
--- trunk/ag_UnitFrames/ag_UnitFrames-enUS.lua 2006-09-15 10:02:56 UTC (rev 10981)
+++ trunk/ag_UnitFrames/ag_UnitFrames-enUS.lua 2006-09-15 10:34:03 UTC (rev 10982)
@@ -34,7 +34,7 @@
["units"] = "Unit Frames",
["borders"] = "Borders",
["barstyle"] = "Bar Style",
--- ["highlightselected"] = "Hightlight Selected",
+ ["highlightselected"] = "Hightlight Selected",
["targetshowhostile"] = "Hostility Coloring",
["pvpicon"] = "Show PvP Icons",
["groupicon"] = "Show Group Icons",
@@ -89,6 +89,7 @@
["UnitDesc"] = "Individual frame configuration",
["BordersDesc"] = "Set frame borders",
["BarStyleDesc"] = "Set bar textures",
+ ["HighlightSelectedDesc"] = "Check to show selection highlight on frames",
["ShowPVPIconDesc"] = "Check to show pvp icons",
["ShowGroupIconsDesc"] = "Check to show group leader icon",
["LockedDesc"] = "Lock the frames",

Modified: trunk/ag_UnitFrames/ag_UnitFrames-zhCN.lua
===================================================================
--- trunk/ag_UnitFrames/ag_UnitFrames-zhCN.lua 2006-09-15 10:02:56 UTC (rev 10981)
+++ trunk/ag_UnitFrames/ag_UnitFrames-zhCN.lua 2006-09-15 10:34:03 UTC (rev 10982)
@@ -36,7 +36,7 @@
["units"] = "头像",
["borders"] = "边框",
["barstyle"] = "状态条材质",
--- ["highlightselected"] = "Hightlight Selected",
+ ["highlightselected"] = "Highlight Selected",
["targetshowhostile"] = "敌对颜色",
["pvpicon"] = "显示PvP图标",
["groupicon"] = "显示队长图标",
@@ -78,6 +78,7 @@
["UnitDesc"] = "分别设置各个框体的属性",
["BordersDesc"] = "设置头像边框",
["BarStyleDesc"] = "设置状态条材质",
+ ["HighlightSelectedDesc"] = "Check to show selection highlight on frames",
["ShowPVPIconDesc"] = "勾选则显示PVP图标",
["ShowGroupIconsDesc"] = "勾选则显示队长图标",
["LockedDesc"] = "锁定所有框体",

Modified: trunk/ag_UnitFrames/ag_UnitFrames.lua
===================================================================
--- trunk/ag_UnitFrames/ag_UnitFrames.lua 2006-09-15 10:02:56 UTC (rev 10981)
+++ trunk/ag_UnitFrames/ag_UnitFrames.lua 2006-09-15 10:34:03 UTC (rev 10982)
@@ -263,8 +263,17 @@
["istapped"] = function (u) if UnitIsTapped(u) and (not UnitIsTappedByPlayer("target")) then return "*" else return "" end end,
["pvpranknum"] = function (u) if (UnitPVPRank(u) >= 1) then return ((UnitPVPRank(u)-4) or "") else return "" end end,
["pvprank"] = function (u) if (UnitPVPRank(u) >= 1) then return (GetPVPRankInfo(UnitPVPRank(u), u) or "" ) else return "" end end,
- ["fkey"] = function (u) local _,_,fkey = string.find(u, "^party(%d)$") if not fkey then return "" else return "F"..fkey end end,
-
+ ["fkey"] = function (u)
+ local _,_,fkey = string.find(u, "^party(%d)$")
+ if u == "player" then
+ fkey = 0
+ end
+ if not fkey then
+ return ""
+ else
+ return "F"..(fkey+1)
+ end
+ end,
["white"] = function (u) return "|cFFFFFFFF" end,
["aggro"] = function (u) local x = (UnitReaction("player",u) or 5) return self:GiveHex(UnitReactionColor[x]) end,
["difficulty"] = function (u) if UnitCanAttack("player",u) then local x = (UnitLevel(u)>0) and UnitLevel(u) or 99 local color = GetDifficultyColor(x) return aUF:GiveHex(color.r,color.g,color.b) else return "" end end,
@@ -730,6 +739,18 @@
end,
order = 8,
},
+ HighlightSelected = {
+ name = L"highlightselected",
+ type = 'toggle',
+ desc = L"HighlightSelectedDesc",
+ get = function()
+ return self.db.profile.HighlightSelected
+ end,
+ set = function(option)
+ self.db.profile.HighlightSelected = option
+ end,
+ order = 9,
+ },
Locked = {
name = L"lock",
type = 'toggle',
@@ -740,7 +761,7 @@
set = function(option)
self.db.profile.Locked = option
end,
- order = 9,
+ order = 12,
},
}
}

Reply all
Reply to author
Forward
0 new messages