mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-31 09:17:02 +00:00
0.1.157: Codex-Detailansicht: Zurueck, Favorit und Bearbeiten-Knoepfe in einer Reihe
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
+12
-4
@@ -1912,11 +1912,11 @@ local function Build(content)
|
||||
nameCtl = Codex.NameUI.Attach(f, function() return kind, selected end, function()
|
||||
dataVersion = dataVersion + 1
|
||||
Refresh()
|
||||
end, { x = LIST_W + 22, y = 34, relayout = function() if UpdateFavUIRef then UpdateFavUIRef() end end })
|
||||
end, { x = LIST_W + 22, y = 0, relayout = function() if UpdateFavUIRef then UpdateFavUIRef() end end })
|
||||
end
|
||||
|
||||
---------------- Favorit und Notiz ----------------
|
||||
local favButton = UI.CreateButton(f, L.CODEX_FAV_ADD, 140, 26, function()
|
||||
local favButton = UI.CreateButton(f, L.CODEX_FAV_ADD, 150, 26, function()
|
||||
if selected ~= nil and Codex.FavSupported(kind) then
|
||||
Codex.SetFav(kind, selected, not Codex.IsFav(kind, selected))
|
||||
dataVersion = dataVersion + 1
|
||||
@@ -1925,6 +1925,7 @@ local function Build(content)
|
||||
end, "default")
|
||||
favButton:SetPoint("TOPLEFT", f, "TOPLEFT", LIST_W + 22 + 108, 0)
|
||||
favButton:Hide()
|
||||
if nameCtl then nameCtl.lead = { backButton, favButton } end
|
||||
local noteBox = UI.CreatePanel(f, "bgDeep", "bronze")
|
||||
noteBox:SetHeight(24)
|
||||
noteBox:SetPoint("TOPLEFT", f, "TOPLEFT", LIST_W + 22, -34)
|
||||
@@ -1987,8 +1988,15 @@ local function Build(content)
|
||||
noteEdit:ClearFocus()
|
||||
end
|
||||
noteTarget = nil
|
||||
local devH = nameCtl and nameCtl.height or 0 -- Reihe mit den Bearbeiten-Knoepfen (nur fuer Berechtigte)
|
||||
local top = 34 + devH
|
||||
-- Favorit-Knopf zuerst ein-/ausblenden, dann die gemeinsame Knopfreihe (Zurueck, Favorit, Bearbeiten ...) legen
|
||||
if ok then
|
||||
favButton:Show()
|
||||
else
|
||||
favButton:Hide()
|
||||
end
|
||||
if nameCtl then nameCtl.Layout(true) end
|
||||
local devH = nameCtl and nameCtl.height or 32 -- eine gemeinsame Reihe von links nach rechts
|
||||
local top = devH + 2
|
||||
noteBox:ClearAllPoints()
|
||||
noteBox:SetPoint("TOPLEFT", f, "TOPLEFT", LIST_W + 22, -top)
|
||||
noteBox:SetPoint("TOPRIGHT", f, "TOPRIGHT", 0, -top)
|
||||
|
||||
Reference in New Issue
Block a user