5 Commits
5 changed files with 104 additions and 21 deletions
+3
View File
@@ -0,0 +1,3 @@
* export-ignore
*.lua -export-ignore
*.toc -export-ignore
Executable
+44
View File
@@ -0,0 +1,44 @@
# Changelog
All notable changes to Quest Log Header Expander are documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project uses [Semantic Versioning](https://semver.org/) (pre-1.0 while the game is in beta).
## [0.5.0] - 2026-10-01
### Added
- Option to remember previous quest log state. Keeps state of the quest log headers from when the map is closed.
### Changed
-
### Fixed
-
## [0.4.1] - 2026-09-31
First public release.
### Added
- `+ All` / `- All` button next to the quest counter that expands or collapses every zone header at once.
- Startup behaviour applied each time the map opens: Default (Blizzard), Always collapsed, Always expanded
- Right-click menu on the button for switching modes.
- Options panel under *Options → AddOns → Quest Log Header Expander*.
- Quest log search box is resized so the button fits alongside it.
### Changed
- Quest log scans are coalesced to once per frame and skipped while the quest log is hidden, reducing garbage and CPU use.
### Fixed
- Search box resize now retries until the box exists, since it isn't created until the map is first opened.
- Duplicate `OnShow` hooks on the search box are no longer added repeatedly.
[0.4.1]: https://gitea.recka.tech/bepis/QuestLogHeaderExpander/releases/tag/v0.4
[0.5.0]: https://gitea.recka.tech/bepis/QuestLogHeaderExpander/releases/tag/v0.5
+43 -11
View File
@@ -11,7 +11,7 @@ local modeSetting
local DEFAULTS = {
mode = "default",
lastState = nil,
-- lastState = nil,
}
local MODES = {
@@ -19,7 +19,7 @@ local MODES = {
{ value = "collapsed", label = "Always collapsed" },
{ value = "expanded", label = "Always expanded" },
-- Not working, to fix later
-- { value = "remember", label = "Remember previous state" },
{ value = "remember", label = "Remember previous state" },
}
local function InitDB()
@@ -92,18 +92,44 @@ local function SetAllHeaders(expand)
end
end
local function SnapshotHeaders()
local state = {}
for i = 1, C_QuestLog.GetNumQuestLogEntries() do
local info = C_QuestLog.GetInfo(i)
if info and info.isHeader then
state[info.title] = info.isCollapsed and true or false
end
end
QuestLogHeaderExpanderDB.headerState = state
end
local function RestoreHeaders()
local saved = QuestLogHeaderExpanderDB.headerState
if not saved then return end
-- Go backwards: expanding/collapsing shifts the indices after it
for i = C_QuestLog.GetNumQuestLogEntries(), 1, -1 do
local info = C_QuestLog.GetInfo(i)
if info and info.isHeader then
local wantCollapsed = saved[info.title]
if wantCollapsed ~= nil and wantCollapsed ~= info.isCollapsed then
if wantCollapsed then
CollapseQuestHeader(i)
else
ExpandQuestHeader(i)
end
end
end
end
end
local function ApplyDefaultState()
local mode = GetMode()
local target
if mode == "expanded" or mode == "collapsed" then
target = mode
-- elseif mode == "remember" then
-- target = QuestLogHeaderExpanderDB.lastState
end
if target then
SetAllHeaders(target == "expanded")
SetAllHeaders(mode == "expanded")
elseif mode == "remember" then
RestoreHeaders()
end
end
@@ -171,6 +197,12 @@ local function CreateExpandButton()
local parent = QuestMapFrame and QuestMapFrame.QuestsFrame
if not parent then return end
QuestMapFrame:HookScript("OnHide", function()
if GetMode() == "remember" then
SnapshotHeaders()
end
end)
button = CreateFrame("Button", "QuestLogHeaderExpanderButton", parent, "UIPanelButtonTemplate")
button:SetSize(50, 20)
@@ -190,7 +222,7 @@ local function CreateExpandButton()
local expanding = not AreAllHeadersExpanded()
SetAllHeaders(expanding)
QuestLogHeaderExpanderDB.lastState = expanding and "expanded" or "collapsed"
-- QuestLogHeaderExpanderDB.lastState = expanding and "expanded" or "collapsed"
end)
button:SetScript("OnEnter", function(self)
+3 -1
View File
@@ -1,8 +1,10 @@
## Interface: 16001
## Title: Quest Log Header Expander
## SavedVariables: QuestLogHeaderExpanderDB
## X-License: MIT
## X-Website: https://github.com/Recka50/QuestLogHeaderExpander
## Notes: Adds an Expand All button to the quest log.
## Author: Drink_Bepis
## Version: 0.4
## Version: 0.5.0
QuestLogHeaderExpander.lua
+11 -9
View File
@@ -15,21 +15,23 @@ Built for **World of Warcraft Forever** using the retail UI API. Interface versi
- **Default**: Blizzard's standard behaviour (only the current zone is expanded)
- **Always collapsed**
- **Always expanded**
- **Remember previous state**
- **Right-click the button** for a quick context menu to change the mode.
- **Options panel** under *Options → AddOns → Quest Expand All* with the same setting.
- **Options panel** under *Options → AddOns → Quest Log Header Expander* with the same setting.
- Resizes the quest log search box so the button fits alongside it.
## Installation
1. Download the latest release from the [releases](https://github.com/Recka50/QuestLogHeaderExpander/releases) page. Don't use "Source code (zip)", as it has the wrong folder name.
2. Extract it into your `Interface/AddOns/` folder so you end up with `Interface/AddOns/QuestLogHeaderExpander/`.
3. Fully restart the game (Required for first-time run).
### Or
1. Download or clone this repository.
2. Make sure the folder is named `QuestLogHeaderExpander` (it must match the `.toc` file name).
3. Copy it into your game's addons directory:
```
<WoW install>/Interface/AddOns/QuestLogHeaderExpander/
```
4. Fully restart the game (or at least fully log out/in). This is required for a first-time run.
3. Extract it into your `Interface/AddOns/` folder so you end up with `Interface/AddOns/QuestLogHeaderExpander/`.
4. Fully restart the game (Required for first-time run).
Your folder should look like this:
@@ -46,7 +48,7 @@ QuestLogHeaderExpander/
| --- | --- |
| Left-click the button | Expand or collapse all zone headers |
| Right-click the button | Open the mode context menu |
| Options → AddOns → Quest Expand All | Choose the startup mode from a dropdown |
| Options → AddOns → Quest Log Header Expander | Choose the startup mode from a dropdown |
## Configuration