Dateien nach "/" hochladen
This commit is contained in:
+9
-4
@@ -738,7 +738,7 @@ function NameUI.Attach(f, getSel, onChanged, origin)
|
||||
if staged ~= nil then return staged end
|
||||
return Codex:IsBad(kind, id)
|
||||
end
|
||||
local badButton = UI.CreateButton(f, L.CODEX_BAD_MARK, 170, 26, function()
|
||||
local badButton = UI.CreateButton(f, L.CODEX_BAD_MARK, 150, 26, function()
|
||||
local kind, id = getSel()
|
||||
if kind and id and kind ~= "items" then
|
||||
Codex:SetBad(kind, id, not BadNow(kind, id))
|
||||
@@ -747,15 +747,20 @@ function NameUI.Attach(f, getSel, onChanged, origin)
|
||||
end
|
||||
end, "default")
|
||||
badButton:Hide()
|
||||
UI.AttachTooltip(badButton, function() return L.CODEX_BAD_MARK end, function() return L.CODEX_BAD_TIP end)
|
||||
|
||||
-- Die Knoepfe stehen in einer eigenen Reihe unter "Zurueck/Favorit", von links nach rechts;
|
||||
-- ist der Platz zu knapp, laufen sie in die naechste Reihe. ctl.height ist die belegte Hoehe.
|
||||
local strip = { propsButton, badButton, importButton, editButton }
|
||||
function ctl.Layout()
|
||||
ctl.lead = {} -- Knoepfe vor der Reihe (Zurueck, Favorit), von Codex-UI gesetzt
|
||||
function ctl.Layout(silent)
|
||||
local avail = (f:GetWidth() or 0) - origin.x
|
||||
if avail < 240 then avail = 640 end
|
||||
local x, y, any = 0, 0, false
|
||||
for _, b in ipairs(strip) do
|
||||
local all = {}
|
||||
for _, b in ipairs(ctl.lead) do all[#all + 1] = b end
|
||||
for _, b in ipairs(strip) do all[#all + 1] = b end
|
||||
for _, b in ipairs(all) do
|
||||
if b:IsShown() then
|
||||
local w = b:GetWidth() or 150
|
||||
if x > 0 and x + w > avail then
|
||||
@@ -771,7 +776,7 @@ function NameUI.Attach(f, getSel, onChanged, origin)
|
||||
local h = any and (y + 32) or 0
|
||||
if h ~= ctl.height then
|
||||
ctl.height = h
|
||||
if origin.relayout then origin.relayout() end
|
||||
if origin.relayout and not silent then origin.relayout() end
|
||||
end
|
||||
end
|
||||
ctl.strip = strip
|
||||
|
||||
Reference in New Issue
Block a user