Add files via upload
This commit is contained in:
+85
-34
@@ -2,7 +2,7 @@
|
||||
-- Author: Travis
|
||||
|
||||
local IGW = {}
|
||||
IGW.VERSION = "3.2"
|
||||
IGW.VERSION = "3.3"
|
||||
|
||||
-- Global function for keybind (must be defined early)
|
||||
function ImprovedGuildWindow_Toggle()
|
||||
@@ -481,7 +481,8 @@ function IGW:InitializeSavedVariables()
|
||||
showOffline = true,
|
||||
opacity = 1.0,
|
||||
bgColor = {r = 0.15, g = 0.15, b = 0.15}, -- Default dark grey
|
||||
officerRankCount = 3 -- Default: Guild Master + top 2 officer ranks (threshold = 2)
|
||||
officerRankCount = 3, -- Default: Guild Master + top 2 officer ranks (threshold = 2)
|
||||
showRaceFaction = true
|
||||
}
|
||||
end
|
||||
|
||||
@@ -495,6 +496,11 @@ function IGW:InitializeSavedVariables()
|
||||
ImprovedGuildWindowDB.officerRankCount = 3
|
||||
end
|
||||
|
||||
-- Ensure showRaceFaction exists (for existing saved variables)
|
||||
if ImprovedGuildWindowDB.showRaceFaction == nil then
|
||||
ImprovedGuildWindowDB.showRaceFaction = true
|
||||
end
|
||||
|
||||
-- Apply saved officer rank count: rankCount includes the GM (rank 0),
|
||||
-- so threshold = rankCount - 1 (e.g. 3 ranks → threshold 2 → indices 0,1,2)
|
||||
OFFICER_RANK_THRESHOLD = ImprovedGuildWindowDB.officerRankCount - 1
|
||||
@@ -1361,15 +1367,26 @@ headers = {
|
||||
{text = "Time Zone", width = 190, column = "timezone"}
|
||||
}
|
||||
else
|
||||
headers = {
|
||||
{text = "Name", width = 110, column = "name"},
|
||||
{text = "Level", width = 60, column = "level"},
|
||||
{text = "Class", width = 75, column = "class"},
|
||||
{text = "Race", width = 75, column = "race"},
|
||||
{text = "A/H", width = 50, column = "faction"},
|
||||
{text = "Location", width = 145, column = "zone"},
|
||||
{text = "Rank", width = 85, column = "rank"}
|
||||
}
|
||||
local showRF = not (ImprovedGuildWindowDB and ImprovedGuildWindowDB.showRaceFaction == false)
|
||||
if showRF then
|
||||
headers = {
|
||||
{text = "Name", width = 110, column = "name"},
|
||||
{text = "Level", width = 60, column = "level"},
|
||||
{text = "Class", width = 75, column = "class"},
|
||||
{text = "Race", width = 75, column = "race"},
|
||||
{text = "A/H", width = 50, column = "faction"},
|
||||
{text = "Location", width = 145, column = "zone"},
|
||||
{text = "Rank", width = 85, column = "rank"}
|
||||
}
|
||||
else
|
||||
headers = {
|
||||
{text = "Name", width = 175, column = "name"},
|
||||
{text = "Level", width = 60, column = "level"},
|
||||
{text = "Class", width = 75, column = "class"},
|
||||
{text = "Location", width = 210, column = "zone"},
|
||||
{text = "Rank", width = 80, column = "rank"}
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
local headerFrame = frame.headerFrame
|
||||
@@ -1499,7 +1516,9 @@ function IGW:ApplyRowLayout(tabName, headers)
|
||||
row.race:SetText("")
|
||||
row.faction:SetText("")
|
||||
else
|
||||
-- Guild Members tab uses: name, level, class, race, faction, (location -> row.rank), (rank -> row.note)
|
||||
-- Guild Members tab uses: name, level, class, [race, faction,] location, rank
|
||||
local showRF = not (ImprovedGuildWindowDB and ImprovedGuildWindowDB.showRaceFaction == false)
|
||||
|
||||
row.name:ClearAllPoints()
|
||||
row.name:SetPoint("LEFT", row, "LEFT", colX["name"] + 5, 0)
|
||||
row.name:SetWidth(colW["name"] - 10)
|
||||
@@ -1512,13 +1531,18 @@ function IGW:ApplyRowLayout(tabName, headers)
|
||||
row.class:SetPoint("LEFT", row, "LEFT", colX["class"] + 5, 0)
|
||||
row.class:SetWidth(colW["class"] - 10)
|
||||
|
||||
row.race:ClearAllPoints()
|
||||
row.race:SetPoint("LEFT", row, "LEFT", colX["race"] + 5, 0)
|
||||
row.race:SetWidth(colW["race"] - 10)
|
||||
if showRF then
|
||||
row.race:ClearAllPoints()
|
||||
row.race:SetPoint("LEFT", row, "LEFT", colX["race"] + 5, 0)
|
||||
row.race:SetWidth(colW["race"] - 10)
|
||||
|
||||
row.faction:ClearAllPoints()
|
||||
row.faction:SetPoint("LEFT", row, "LEFT", colX["faction"] + 5, 0)
|
||||
row.faction:SetWidth(colW["faction"] - 10)
|
||||
row.faction:ClearAllPoints()
|
||||
row.faction:SetPoint("LEFT", row, "LEFT", colX["faction"] + 5, 0)
|
||||
row.faction:SetWidth(colW["faction"] - 10)
|
||||
else
|
||||
row.race:SetText("")
|
||||
row.faction:SetText("")
|
||||
end
|
||||
|
||||
row.rank:ClearAllPoints()
|
||||
row.rank:SetPoint("LEFT", row, "LEFT", colX["zone"] + 5, 0)
|
||||
@@ -2588,21 +2612,26 @@ function IGW:UpdateRosterDisplay()
|
||||
row.class:SetTextColor(color.r, color.g, color.b)
|
||||
row.class:SetText(member.class or "")
|
||||
|
||||
-- Race
|
||||
local race = IGW_GetRace(member.officernote or "")
|
||||
row.race:SetText(race)
|
||||
row.race:SetTextColor(1, 1, 1)
|
||||
|
||||
-- Faction
|
||||
local faction = IGW_GetFaction(race)
|
||||
if faction == "Alliance" then
|
||||
row.faction:SetTextColor(0.2, 0.5, 1) -- Blue
|
||||
row.faction:SetText("A")
|
||||
elseif faction == "Horde" then
|
||||
row.faction:SetTextColor(1, 0.2, 0.2) -- Red
|
||||
row.faction:SetText("H")
|
||||
-- Race & Faction (only if setting is enabled)
|
||||
local showRF = not (ImprovedGuildWindowDB and ImprovedGuildWindowDB.showRaceFaction == false)
|
||||
if showRF then
|
||||
local race = IGW_GetRace(member.officernote or "")
|
||||
row.race:SetText(race)
|
||||
row.race:SetTextColor(1, 1, 1)
|
||||
|
||||
local faction = IGW_GetFaction(race)
|
||||
if faction == "Alliance" then
|
||||
row.faction:SetTextColor(0.2, 0.5, 1) -- Blue
|
||||
row.faction:SetText("A")
|
||||
elseif faction == "Horde" then
|
||||
row.faction:SetTextColor(1, 0.2, 0.2) -- Red
|
||||
row.faction:SetText("H")
|
||||
else
|
||||
row.faction:SetText("") -- Blank for unknown
|
||||
end
|
||||
else
|
||||
row.faction:SetText("") -- Blank for unknown
|
||||
row.race:SetText("")
|
||||
row.faction:SetText("")
|
||||
end
|
||||
|
||||
-- Location (use rank field for display)
|
||||
@@ -4070,7 +4099,7 @@ function IGW:ToggleOptionsWindow()
|
||||
divider1:SetPoint("TOP", content, "TOP", 103, yOffset)
|
||||
divider1:SetWidth(830)
|
||||
divider1:SetHeight(16)
|
||||
yOffset = yOffset - 30
|
||||
yOffset = yOffset - 20
|
||||
|
||||
-- Window Behavior Section
|
||||
local behaviorHeader = content:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
|
||||
@@ -4170,6 +4199,20 @@ function IGW:ToggleOptionsWindow()
|
||||
of.officerRankCount = savedOfficerRankCount
|
||||
of.officerRankDropdown = officerRankDropdown
|
||||
|
||||
yOffset = yOffset - 35
|
||||
|
||||
-- Show Race/Faction columns checkbox
|
||||
local showRaceFactionCheck = CreateFrame("CheckButton", "IGW_ShowRaceFactionCheck", content, "UICheckButtonTemplate")
|
||||
showRaceFactionCheck:SetPoint("TOPLEFT", content, "TOPLEFT", 10, yOffset)
|
||||
showRaceFactionCheck:SetWidth(24)
|
||||
showRaceFactionCheck:SetHeight(24)
|
||||
local savedShowRF = (ImprovedGuildWindowDB and ImprovedGuildWindowDB.showRaceFaction ~= false)
|
||||
showRaceFactionCheck:SetChecked(savedShowRF and 1 or 0)
|
||||
local showRaceFactionLabel = content:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
showRaceFactionLabel:SetPoint("LEFT", showRaceFactionCheck, "RIGHT", 5, 0)
|
||||
showRaceFactionLabel:SetText("Show Race & Faction columns (Guild Members tab)")
|
||||
of.showRaceFactionCheck = showRaceFactionCheck
|
||||
|
||||
yOffset = yOffset - 30
|
||||
|
||||
-- Divider
|
||||
@@ -4178,7 +4221,7 @@ function IGW:ToggleOptionsWindow()
|
||||
divider2:SetPoint("TOP", content, "TOP", 103, yOffset)
|
||||
divider2:SetWidth(830)
|
||||
divider2:SetHeight(16)
|
||||
yOffset = yOffset - 25
|
||||
yOffset = yOffset - 15
|
||||
|
||||
-- Default View Section
|
||||
local defaultViewHeader = content:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
|
||||
@@ -4346,6 +4389,14 @@ function IGW:SaveOptions()
|
||||
OFFICER_RANK_THRESHOLD = of.officerRankCount - 1
|
||||
end
|
||||
|
||||
-- Save show race/faction setting and refresh immediately
|
||||
if of.showRaceFactionCheck then
|
||||
ImprovedGuildWindowDB.showRaceFaction = of.showRaceFactionCheck:GetChecked() == 1
|
||||
-- Rebuild column headers and repopulate so change takes effect without reload
|
||||
IGW:UpdateColumnHeaders(currentTab)
|
||||
IGW:UpdateRosterDisplay()
|
||||
end
|
||||
|
||||
-- Save which windows are currently open (if remember is enabled)
|
||||
if ImprovedGuildWindowDB.rememberWindows then
|
||||
ImprovedGuildWindowDB.windowStates = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
## Title: Improved Guild Window
|
||||
## Notes: Enhanced guild management for World of Warcraft 1.12.1 (Octo)
|
||||
## Author: Olzon
|
||||
## Version: 3.2
|
||||
## Version: 3.3
|
||||
## SavedVariables: ImprovedGuildWindowDB
|
||||
|
||||
Bindings.xml
|
||||
|
||||
@@ -78,6 +78,7 @@ Click the "Options" button to customize:
|
||||
- **Show Offline by Default** - Member Details tab offline visibility
|
||||
- **Remember Sorting** - Persist column and direction across sessions
|
||||
- **# of Officer Ranks in Guild** - Choose how many top ranks count as officers (2, 3, or 4)
|
||||
- **Show Race & Faction Columns** - Toggle Race and A/H columns in the Guild Members tab
|
||||
|
||||
### Sorting & Filtering
|
||||
- Click column headers to sort
|
||||
@@ -255,10 +256,15 @@ Works bidirectionally - view any character to see their alts and main.
|
||||
|
||||
## Version
|
||||
|
||||
**3.2** - Latest stable release
|
||||
**3.3** - Latest stable release
|
||||
|
||||
### Changelog
|
||||
|
||||
**3.3**
|
||||
- Added option to hide Race and Faction (A/H) columns in the Guild Members tab
|
||||
- When hidden, Name and Location columns expand to use the freed space
|
||||
- Setting saved between sessions and applied immediately on save
|
||||
|
||||
**3.2**
|
||||
- Added configurable officer rank count setting in Options menu
|
||||
- New dropdown (2, 3, or 4 ranks) replaces the previous hardcoded value
|
||||
|
||||
Reference in New Issue
Block a user