diff -urNd ./PerfectRaidLocals.lua /home/staharaj/PerfectRaid/PerfectRaidLocals.lua --- ./PerfectRaidLocals.lua 2006-05-21 12:44:55.000000000 -0400 +++ /home/staharaj/PerfectRaid/PerfectRaidLocals.lua 2006-05-21 12:28:01.000000000 -0400 @@ -208,4 +208,9 @@ desc = "When casting spells, makes units you can't target slightly transparent.", method = "ToggleRangeCheck", }, -} \ No newline at end of file + { + option = "growup", + desc = "Grows the raid frame upwards from the bottom as new members are added.", + method = "ToggleGrowUp", + }, +} diff -urNd ./PerfectRaid.lua /home/staharaj/PerfectRaid/PerfectRaid.lua --- ./PerfectRaid.lua 2006-05-21 12:44:55.000000000 -0400 +++ /home/staharaj/PerfectRaid/PerfectRaid.lua 2006-05-21 12:26:46.000000000 -0400 @@ -46,6 +46,7 @@ Voffset = -5, Filter = false, RangeCheck = false, + GrowUp = false, } end, @@ -555,8 +556,19 @@ self:SetOpt("Sort", msg) + local growUp = self.opt.GrowUp + if growUp then + n = GetNumRaidMembers() + a1, a2 = "BOTTOMLEFT", "TOPLEFT" + i1, i2, i3 = table.getn(sort)-1, 1, -1 + else + n = 1 + a1, a2 = "TOPLEFT", "BOTTOMLEFT" + i1, i2, i3= 2, table.getn(sort), 1 + end + -- We need to ensure that all the frames we need exist at this point - local f = self.frames[sort[1]] + local f = self.frames[sort[n]] f:ClearAllPoints() f:SetPoint("TOPLEFT", PerfectRaidFrame, "TOPLEFT", 0, 0) local last = f @@ -578,7 +590,7 @@ seperate = true end - for i=2,table.getn(sort) do + for i=i1, i2, i3 do local v = sort[i] local f = frames[v] @@ -591,6 +603,10 @@ else voffset = 0 end + + if growUp then + voffset = -1 * voffset + end if not truncate then vfont:SetText(UnitName(v)) @@ -599,7 +615,7 @@ end f:ClearAllPoints() - f:SetPoint("TOPLEFT", last, "BOTTOMLEFT", 0, voffset) + f:SetPoint(a1, last, a2, 0, voffset) last = self.frames[v] end @@ -871,6 +887,17 @@ self:RangeHooks() end, + ToggleGrowUp = function(self) + if self.opt.GrowUp then + self:Msg("Raid unit frames grow |cFF00FF00Downwards|r.") + self:SetOpt("GrowUp", false) + else + self:Msg("Raid unit frames grow |cFF00FF00Upwards|r.") + self:SetOpt("GrowUp", true) + end + self:UpdateVisibility() + end, + --[[--------------------------------------------------------------------------------- Utility functions ------------------------------------------------------------------------------------]]