Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6a4c7d57ae | ||
|
|
2a5ce470ad | ||
|
|
fc9fe1ffe6 | ||
|
|
bc255a125d | ||
|
|
8e74c63f84 |
@@ -0,0 +1,3 @@
|
|||||||
|
* export-ignore
|
||||||
|
*.lua -export-ignore
|
||||||
|
*.toc -export-ignore
|
||||||
Executable
+44
@@ -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
|
||||||
+45
-13
@@ -11,7 +11,7 @@ local modeSetting
|
|||||||
|
|
||||||
local DEFAULTS = {
|
local DEFAULTS = {
|
||||||
mode = "default",
|
mode = "default",
|
||||||
lastState = nil,
|
-- lastState = nil,
|
||||||
}
|
}
|
||||||
|
|
||||||
local MODES = {
|
local MODES = {
|
||||||
@@ -19,7 +19,7 @@ local MODES = {
|
|||||||
{ value = "collapsed", label = "Always collapsed" },
|
{ value = "collapsed", label = "Always collapsed" },
|
||||||
{ value = "expanded", label = "Always expanded" },
|
{ value = "expanded", label = "Always expanded" },
|
||||||
-- Not working, to fix later
|
-- Not working, to fix later
|
||||||
-- { value = "remember", label = "Remember previous state" },
|
{ value = "remember", label = "Remember previous state" },
|
||||||
}
|
}
|
||||||
|
|
||||||
local function InitDB()
|
local function InitDB()
|
||||||
@@ -92,18 +92,44 @@ local function SetAllHeaders(expand)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local function ApplyDefaultState()
|
local function SnapshotHeaders()
|
||||||
local mode = GetMode()
|
local state = {}
|
||||||
local target
|
for i = 1, C_QuestLog.GetNumQuestLogEntries() do
|
||||||
|
local info = C_QuestLog.GetInfo(i)
|
||||||
if mode == "expanded" or mode == "collapsed" then
|
if info and info.isHeader then
|
||||||
target = mode
|
state[info.title] = info.isCollapsed and true or false
|
||||||
-- elseif mode == "remember" then
|
end
|
||||||
-- target = QuestLogHeaderExpanderDB.lastState
|
end
|
||||||
|
QuestLogHeaderExpanderDB.headerState = state
|
||||||
end
|
end
|
||||||
|
|
||||||
if target then
|
local function RestoreHeaders()
|
||||||
SetAllHeaders(target == "expanded")
|
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()
|
||||||
|
|
||||||
|
if mode == "expanded" or mode == "collapsed" then
|
||||||
|
SetAllHeaders(mode == "expanded")
|
||||||
|
elseif mode == "remember" then
|
||||||
|
RestoreHeaders()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -171,6 +197,12 @@ local function CreateExpandButton()
|
|||||||
local parent = QuestMapFrame and QuestMapFrame.QuestsFrame
|
local parent = QuestMapFrame and QuestMapFrame.QuestsFrame
|
||||||
if not parent then return end
|
if not parent then return end
|
||||||
|
|
||||||
|
QuestMapFrame:HookScript("OnHide", function()
|
||||||
|
if GetMode() == "remember" then
|
||||||
|
SnapshotHeaders()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
button = CreateFrame("Button", "QuestLogHeaderExpanderButton", parent, "UIPanelButtonTemplate")
|
button = CreateFrame("Button", "QuestLogHeaderExpanderButton", parent, "UIPanelButtonTemplate")
|
||||||
button:SetSize(50, 20)
|
button:SetSize(50, 20)
|
||||||
|
|
||||||
@@ -190,7 +222,7 @@ local function CreateExpandButton()
|
|||||||
|
|
||||||
local expanding = not AreAllHeadersExpanded()
|
local expanding = not AreAllHeadersExpanded()
|
||||||
SetAllHeaders(expanding)
|
SetAllHeaders(expanding)
|
||||||
QuestLogHeaderExpanderDB.lastState = expanding and "expanded" or "collapsed"
|
-- QuestLogHeaderExpanderDB.lastState = expanding and "expanded" or "collapsed"
|
||||||
end)
|
end)
|
||||||
|
|
||||||
button:SetScript("OnEnter", function(self)
|
button:SetScript("OnEnter", function(self)
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
## Interface: 16001
|
## Interface: 16001
|
||||||
## Title: Quest Log Header Expander
|
## Title: Quest Log Header Expander
|
||||||
## SavedVariables: QuestLogHeaderExpanderDB
|
## SavedVariables: QuestLogHeaderExpanderDB
|
||||||
|
## X-License: MIT
|
||||||
|
## X-Website: https://github.com/Recka50/QuestLogHeaderExpander
|
||||||
## Notes: Adds an Expand All button to the quest log.
|
## Notes: Adds an Expand All button to the quest log.
|
||||||
## Author: Drink_Bepis
|
## Author: Drink_Bepis
|
||||||
## Version: 0.4
|
## Version: 0.5.0
|
||||||
|
|
||||||
QuestLogHeaderExpander.lua
|
QuestLogHeaderExpander.lua
|
||||||
|
|||||||
@@ -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)
|
- **Default**: Blizzard's standard behaviour (only the current zone is expanded)
|
||||||
- **Always collapsed**
|
- **Always collapsed**
|
||||||
- **Always expanded**
|
- **Always expanded**
|
||||||
|
- **Remember previous state**
|
||||||
- **Right-click the button** for a quick context menu to change the mode.
|
- **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.
|
- Resizes the quest log search box so the button fits alongside it.
|
||||||
|
|
||||||
## Installation
|
## 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.
|
1. Download or clone this repository.
|
||||||
2. Make sure the folder is named `QuestLogHeaderExpander` (it must match the `.toc` file name).
|
2. Make sure the folder is named `QuestLogHeaderExpander` (it must match the `.toc` file name).
|
||||||
3. Copy it into your game's addons directory:
|
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).
|
||||||
```
|
|
||||||
<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.
|
|
||||||
|
|
||||||
Your folder should look like this:
|
Your folder should look like this:
|
||||||
|
|
||||||
@@ -46,7 +48,7 @@ QuestLogHeaderExpander/
|
|||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Left-click the button | Expand or collapse all zone headers |
|
| Left-click the button | Expand or collapse all zone headers |
|
||||||
| Right-click the button | Open the mode context menu |
|
| 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
|
## Configuration
|
||||||
|
|||||||
Reference in New Issue
Block a user