changeset 4:e66407f67848

TOC bump for 4.1, grow to fit new flag columns.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Tue, 26 Apr 2011 23:08:53 +0000
parents 001b15e07b87
children d2068b0740aa
files WhichRankDoesWhat.toc main.lua
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/WhichRankDoesWhat.toc	Sat Feb 12 19:09:57 2011 +0000
+++ b/WhichRankDoesWhat.toc	Tue Apr 26 23:08:53 2011 +0000
@@ -1,4 +1,4 @@
-## Interface: 40000
+## Interface: 40100
 ## Title: Which Rank Does What
 ## Version: @project-version@
 ## Notes: Displays a grid of guild ranks versus permissions.
--- a/main.lua	Sat Feb 12 19:09:57 2011 +0000
+++ b/main.lua	Tue Apr 26 23:08:53 2011 +0000
@@ -74,6 +74,7 @@
 local AceGUI = LibStub("AceGUI-3.0")
 local st_rowheight         = 25
 local st_displayed_rows    = 15 --math.floor(366/st_rowheight)
+local st_colwidth          = 65
 local sidetabs
 local incomplete
 
@@ -134,6 +135,9 @@
 		local function onclick() addon:BuildWindow() end
 		local function onenter(this) GameTooltip_AddNewbieTip(this, GUILDCONTROL, 1.0, 1.0, 1.0, "/wrdw", 1) end
 		GuildFrame_LoadUI()
+		if not NUM_RANK_FLAGS then
+			UIParentLoadAddOn("Blizzard_GuildControlUI")
+		end
 		hooksecurefunc("GuildFrame_CheckPermissions", function()
 			GuildControlButton:Enable()
 			GuildControlButton:SetScript("OnClick", onclick)
@@ -319,7 +323,7 @@
 	for i = 1, NUM_RANK_FLAGS do if i ~= 14 then
 		table.insert(cols,{
 			name = _G['GUILDCONTROL_OPTION'..i],
-			width = 62,
+			width = st_colwidth,
 		})
 	end end
 
@@ -371,7 +375,8 @@
 		self.display:SetTitle("Which Rank Does What")
 		self.display:SetLayout("Fill")
 		self.display:SetStatusTable{
-			width = 1225,
+			width = (st_colwidth+4) * (NUM_RANK_FLAGS-1)  -- flag columns
+			        + 105,                                -- rank label column
 			height = 500,
 		}
 		self.display:ApplyStatus()