Split settings into two columns with proper alignment

This commit is contained in:
Emik 2026-07-15 13:15:08 +02:00
parent 798a92b148
commit 179cecd9fa
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 46 additions and 40 deletions

View file

@ -3,7 +3,7 @@
"id": "Roland", "id": "Roland",
"name": "Roland", "name": "Roland",
"prefix": "Roland", "prefix": "Roland",
"version": "2.9.56", "version": "2.9.57",
"badge_colour": "8BE9FD", "badge_colour": "8BE9FD",
"display_name": "Roland", "display_name": "Roland",
"main_file": "src/main.lua", "main_file": "src/main.lua",

View file

@ -13,46 +13,44 @@ q {
return false return false
end end
f(assert(SMODS.load_file "src/credits.lua")() or require "credits"):each(function(v, k) f(assert(SMODS.load_file("src/credits.lua", "Roland"))() or require "credits"):each(function(v, k)
contributors["Roland_" .. k] = v contributors["Roland_" .. k] = v
end) end)
if not SMODS.Mods.DebugPlus or not SMODS.Mods.Roland.config.import_funky then if SMODS.Mods.DebugPlus and SMODS.Mods.Roland.config.import_funky then
return _G.f, _G.q, _G.u, _G.c = unpack(qol)
end end
_G.f, _G.q, _G.u, _G.c = unpack(qol)
end, end,
} }
f { f {"challenge", "spectral", "edition", "voucher", "tweaks", "blind", "charm", "joker", "tarot", "back", "seal", "tag"}
"challenge", :each(function(v)
"spectral", assert(SMODS.load_file("src/" .. v .. ".lua"))(qol)
"edition", end)
"voucher",
"tweaks",
"blind",
"charm",
"joker",
"tarot",
"back",
"seal",
"tag",
}:each(function(v)
assert(SMODS.load_file("src/" .. v .. ".lua"))(qol)
end)
local _ = Balatest and f {"joker", "blind", "spectral"}:each(function(v) local _ = Balatest and f {"joker", "blind", "spectral"}:each(function(v)
assert(SMODS.load_file("src/tests/" .. v .. ".tests.lua"))(qol) assert(SMODS.load_file("src/tests/" .. v .. ".tests.lua"))(qol)
end) end)
local function realign(tbl, align)
f(tbl):where(function(v, k)
if k == "align" and type(v) == "string" then
tbl[k] = align
end
return k ~= "nodes" and type(v) == "table"
end):each(realign)
return tbl
end
local function toggle(id) local function toggle(id)
return create_toggle { return realign(create_toggle {
label = localize {type = "variable", key = "b_Roland_" .. id}, label = localize {type = "variable", key = "b_Roland_" .. id},
ref_table = SMODS.Mods.Roland.config, ref_table = SMODS.Mods.Roland.config,
ref_value = id, ref_value = id,
scale = 1.5, scale = 1.5,
} }, "tr")
end end
SMODS.current_mod.qol = qol SMODS.current_mod.qol = qol
@ -71,22 +69,30 @@ SMODS.Atlas {
function SMODS.current_mod.config_tab() function SMODS.current_mod.config_tab()
return { return {
n = G.UIT.ROOT, n = G.UIT.ROOT,
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.BLACK}, config = {minw = 1, minh = 1, align = "tr", padding = 0.1, colour = G.C.BLACK},
nodes = {{ nodes = {
n = G.UIT.C, {
config = {minw = 1, minh = 1, align = "tl", padding = 0.1, colour = G.C.CLEAR}, n = G.UIT.C,
nodes = { config = {minw = 1, minh = 1, align = "tr", padding = 0.1, colour = G.C.CLEAR},
toggle "animated_icon", nodes = {
toggle "cool_phones", toggle "animated_icon",
toggle "faster_planets", toggle "cool_phones",
-- toggle "illusion_seal", toggle "vitriol",
-- toggle "no_wild_debuff", toggle "equinox_assist",
toggle "vitriol", G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket",
toggle "equinox_assist", },
SMODS.Mods.DebugPlus and toggle "import_funky",
G.P_CENTERS.c_Bakery_Scribe and toggle "scribable_basket",
Talisman and toggle "harsh_ante_scaling",
}, },
}}, {
n = G.UIT.C,
config = {minw = 1, minh = 1, align = "tr", padding = 0.1, colour = G.C.CLEAR},
nodes = {
toggle "faster_planets",
toggle "illusion_seal",
toggle "no_wild_debuff",
SMODS.Mods.DebugPlus and toggle "import_funky",
Talisman and toggle "harsh_ante_scaling",
},
},
},
} }
end end