0.1.176: Unter-Reiter der Einstellungen klickbar (Lua-5.0-Schleifenvariable)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
Lacustat
2026-10-29 16:24:19 +01:00
co-authored by Claude Sonnet 5.5
parent 99e6820776
commit f9583c0303
2 changed files with 24 additions and 11 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
## Notes: Base addon of the Freewood family: data storage, UI kit, export/import and the main window.
## Notes-deDE: Basis-Addon der Freewood-Familie: Datenspeicher, UI-Bausteine, Export/Import und Hauptfenster.
## Author: Lacustat
## Version: 0.1.175
## Version: 0.1.176
## SavedVariables: FreewoodDB
## SavedVariablesPerCharacter: FreewoodCharDB
+23 -10
View File
@@ -325,15 +325,8 @@ local function LeftWidth(W)
end
local layingOut, pendingLayout, layoutDepth = false, false, 0
local function LayoutSections()
if not settingsBody then
return
end
if layingOut then
pendingLayout = true -- eine Hoehe hat sich waehrend des Anordnens geaendert: danach noch einmal
return
end
layingOut = true
local LayoutSections
local function DoLayout()
local W = settingsBody:GetWidth() or 0
if W < 200 then
W = 1000
@@ -349,7 +342,7 @@ local function LayoutSections()
xs[i] = x0 + (i - 1) * (colW + SECTION_GAP)
ypos[i] = 0
end
settingsLeft:SetShown(general)
if general then settingsLeft:Show() else settingsLeft:Hide() end
settingsLeft:SetWidth(leftW)
for _, def in ipairs(settingsSections) do
local frame = def.frame
@@ -398,7 +391,26 @@ local function LayoutSections()
end
end
UpdateCatBar()
end
LayoutSections = function()
if not settingsBody then
return
end
if layingOut then
pendingLayout = true -- eine Hoehe hat sich waehrend des Anordnens geaendert: danach noch einmal
return
end
layingOut = true
local ok, err = pcall(DoLayout)
layingOut = false
if not ok then
pendingLayout = false
if DEFAULT_CHAT_FRAME then
DEFAULT_CHAT_FRAME:AddMessage("|cffff5555Freewood: Fehler in den Einstellungen: " .. tostring(err) .. "|r")
end
return
end
if pendingLayout and layoutDepth < 4 then
pendingLayout = false
layoutDepth = layoutDepth + 1
@@ -457,6 +469,7 @@ local function BuildSettings(content)
catBar:SetHeight(28)
catButtons = {}
for _, cat in ipairs(CATS) do
local cat = cat -- Lua 5.0: Schleifenvariable fuer die Closure sichern
local b = UI.CreateButton(catBar, L[CAT_LABEL[cat]], 160, 26, function() SelectCategory(cat) end)
b.cat = cat
catButtons[#catButtons + 1] = b