Add files via upload
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
-- Author: Travis
|
||||
|
||||
local IGW = {}
|
||||
IGW.VERSION = "3.1"
|
||||
IGW.VERSION = "3.2"
|
||||
|
||||
-- Global function for keybind (must be defined early)
|
||||
function ImprovedGuildWindow_Toggle()
|
||||
@@ -480,7 +480,8 @@ function IGW:InitializeSavedVariables()
|
||||
sortAscending = true,
|
||||
showOffline = true,
|
||||
opacity = 1.0,
|
||||
bgColor = {r = 0.15, g = 0.15, b = 0.15} -- Default dark grey
|
||||
bgColor = {r = 0.15, g = 0.15, b = 0.15}, -- Default dark grey
|
||||
officerRankCount = 3 -- Default: Guild Master + top 2 officer ranks (threshold = 2)
|
||||
}
|
||||
end
|
||||
|
||||
@@ -489,6 +490,15 @@ function IGW:InitializeSavedVariables()
|
||||
ImprovedGuildWindowDB.bgColor = {r = 0.15, g = 0.15, b = 0.15}
|
||||
end
|
||||
|
||||
-- Ensure officerRankCount exists (for existing saved variables)
|
||||
if not ImprovedGuildWindowDB.officerRankCount then
|
||||
ImprovedGuildWindowDB.officerRankCount = 3
|
||||
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
|
||||
|
||||
-- Load saved opacity or use default
|
||||
IGW_BG_OPACITY = ImprovedGuildWindowDB.opacity or 0.95
|
||||
|
||||
@@ -3866,7 +3876,7 @@ function IGW:ToggleOptionsWindow()
|
||||
if not IGW.optionsFrame then
|
||||
local of = CreateFrame("Frame", "IGW_OptionsFrame", UIParent)
|
||||
of:SetWidth(650) -- Same width as main window
|
||||
of:SetHeight(500) -- Same height as main window
|
||||
of:SetHeight(580) -- Increased to accommodate officer rank setting
|
||||
of:SetFrameStrata("DIALOG")
|
||||
of:SetFrameLevel(50)
|
||||
of:SetMovable(true)
|
||||
@@ -4122,6 +4132,44 @@ function IGW:ToggleOptionsWindow()
|
||||
rememberSortingLabel:SetText("Remember sorting (column and direction)")
|
||||
|
||||
of.rememberSortingCheck = rememberSortingCheck
|
||||
yOffset = yOffset - 35
|
||||
|
||||
-- # of Officer Ranks in Guild Section
|
||||
local officerRankHeader = content:CreateFontString(nil, "OVERLAY", "GameFontNormalLarge")
|
||||
officerRankHeader:SetPoint("TOPLEFT", content, "TOPLEFT", 0, yOffset)
|
||||
officerRankHeader:SetText("# of Officer Ranks in Guild")
|
||||
yOffset = yOffset - 28
|
||||
|
||||
local officerRankLabel = content:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||
officerRankLabel:SetPoint("TOPLEFT", content, "TOPLEFT", 10, yOffset)
|
||||
officerRankLabel:SetText("Officer ranks (including Guild Master):")
|
||||
|
||||
local officerRankDropdown = CreateFrame("Button", "IGW_OfficerRankDropdown", content, "UIDropDownMenuTemplate")
|
||||
officerRankDropdown:SetPoint("LEFT", officerRankLabel, "RIGHT", -10, -2)
|
||||
UIDropDownMenu_SetWidth(60, officerRankDropdown)
|
||||
|
||||
local savedOfficerRankCount = (ImprovedGuildWindowDB and ImprovedGuildWindowDB.officerRankCount) or 3
|
||||
UIDropDownMenu_SetText(savedOfficerRankCount, officerRankDropdown)
|
||||
|
||||
UIDropDownMenu_Initialize(officerRankDropdown, function()
|
||||
local counts = {2, 3, 4}
|
||||
for i = 1, table.getn(counts) do
|
||||
local info = {}
|
||||
info.text = counts[i]
|
||||
info.value = counts[i]
|
||||
info.func = function()
|
||||
local val = this.value
|
||||
UIDropDownMenu_SetText(val, officerRankDropdown)
|
||||
of.officerRankCount = val
|
||||
end
|
||||
UIDropDownMenu_AddButton(info)
|
||||
end
|
||||
end)
|
||||
|
||||
-- Store current value on the frame for SaveOptions to read
|
||||
of.officerRankCount = savedOfficerRankCount
|
||||
of.officerRankDropdown = officerRankDropdown
|
||||
|
||||
yOffset = yOffset - 30
|
||||
|
||||
-- Divider
|
||||
@@ -4292,6 +4340,12 @@ function IGW:SaveOptions()
|
||||
-- Save remember sorting setting
|
||||
ImprovedGuildWindowDB.rememberSorting = of.rememberSortingCheck:GetChecked() == 1
|
||||
|
||||
-- Save officer rank count and apply immediately
|
||||
if of.officerRankCount then
|
||||
ImprovedGuildWindowDB.officerRankCount = of.officerRankCount
|
||||
OFFICER_RANK_THRESHOLD = of.officerRankCount - 1
|
||||
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.1
|
||||
## Version: 3.2
|
||||
## SavedVariables: ImprovedGuildWindowDB
|
||||
|
||||
Bindings.xml
|
||||
|
||||
@@ -77,6 +77,7 @@ Click the "Options" button to customize:
|
||||
- **Default View** - Set which tab opens by default
|
||||
- **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)
|
||||
|
||||
### Sorting & Filtering
|
||||
- Click column headers to sort
|
||||
@@ -240,10 +241,12 @@ Detection requires:
|
||||
|
||||
### Officer Detection
|
||||
|
||||
Edit `OFFICER_RANK_THRESHOLD` in the .lua file (default: 2)
|
||||
- 0 = Guild Master only
|
||||
- 1 = Guild Master + first officer rank
|
||||
- 2 = Guild Master + top 2 ranks (default)
|
||||
Configure via **Options → # of Officer Ranks in Guild** (default: 3).
|
||||
This controls which ranks are shown as online officers on Guild Info Page 2.
|
||||
|
||||
- **2** = Guild Master + 1 officer rank
|
||||
- **3** = Guild Master + 2 officer ranks (default)
|
||||
- **4** = Guild Master + 3 officer ranks
|
||||
|
||||
### Alt Detection
|
||||
|
||||
@@ -252,10 +255,16 @@ Works bidirectionally - view any character to see their alts and main.
|
||||
|
||||
## Version
|
||||
|
||||
**3.1** - Latest stable release
|
||||
**3.2** - Latest stable release
|
||||
|
||||
### Changelog
|
||||
|
||||
**3.2**
|
||||
- Added configurable officer rank count setting in Options menu
|
||||
- New dropdown (2, 3, or 4 ranks) replaces the previous hardcoded value
|
||||
- Setting is saved between sessions and applied immediately on save
|
||||
- Increased Options window height to accommodate new setting
|
||||
|
||||
**3.1**
|
||||
- Added clickable dungeon names on Guild Info Page 4
|
||||
- Dungeon details popup window with:
|
||||
|
||||
Reference in New Issue
Block a user