mirror of
https://github.com/Lacustat/Freewood-OctoWoW-Codex.git
synced 2026-10-31 10:17:03 +00:00
0.1.171: Startdaten ohne Pruefung und lazy zusammengefuehrt, Listen-Regler 10-100
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016onJCSHLwhs9udhC9ZLzk9
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
9194096d50
commit
b94d8a1b44
+7
-4
@@ -15,11 +15,14 @@ local Util = FW.Util
|
||||
|
||||
local LIST_W = 540
|
||||
local ROW_H, ROW_GAP = 44, 4
|
||||
local DEFAULT_ROWS = 300
|
||||
local DEFAULT_ROWS, MIN_ROWS, MAX_ROWS_LIMIT = 100, 10, 100
|
||||
local function MaxRows()
|
||||
local n = Codex.db and Codex.db.settings and tonumber(Codex.db.settings.listMax)
|
||||
if not n or n < 50 then return DEFAULT_ROWS end
|
||||
return math.floor(n)
|
||||
if not n then return DEFAULT_ROWS end
|
||||
n = math.floor(n)
|
||||
if n < MIN_ROWS then return MIN_ROWS end
|
||||
if n > MAX_ROWS_LIMIT then return MAX_ROWS_LIMIT end
|
||||
return n
|
||||
end
|
||||
local LINE_H = 24
|
||||
|
||||
@@ -4419,7 +4422,7 @@ if UI.RegisterSettingsSection then
|
||||
local val = UI.CreateLabel(f, "", { size = 12 })
|
||||
stack:Add(val, { fit = true, gap = 6 })
|
||||
local slider = UI.CreateSlider(f, 240, {
|
||||
min = 100, max = 6000, step = 100,
|
||||
min = MIN_ROWS, max = MAX_ROWS_LIMIT, step = 10,
|
||||
get = function() return MaxRows() end,
|
||||
set = function(v)
|
||||
Codex.db.settings.listMax = v
|
||||
|
||||
Reference in New Issue
Block a user