mirror of
https://github.com/bryanthaboi/gen1recomp.git
synced 2026-08-17 03:02:39 +02:00
bingus dingus
This commit is contained in:
@@ -1845,12 +1845,18 @@ end
|
||||
local function buildConfirmModal(imp, m)
|
||||
local c = imp._modConfirm
|
||||
local overlay = modalOverlay(imp, m, "confirm-out")
|
||||
local panel = modalPanel(overlay, m, 420 * m.s)
|
||||
label(panel, c.title or Strings("Confirm"), 15 * m.s + 2, C("white"))
|
||||
-- roomier than the shared 420 default: the install confirm carries the
|
||||
-- compat issue list and the trust warning, and those lines need air
|
||||
local panel = modalPanel(overlay, m, 520 * m.s, {
|
||||
gap = 12 * m.s, padding = { horizontal = 22, vertical = 20 },
|
||||
})
|
||||
label(panel, c.title or Strings("Confirm"), 17 * m.s + 2, C("white"))
|
||||
for _, line in ipairs(c.lines or {}) do
|
||||
label(panel, line, 12 * m.s + 1, C("detail"))
|
||||
label(panel, line, 13 * m.s + 1, C("detail"))
|
||||
end
|
||||
local btnRow = mk({ parent = panel, width = "100%",
|
||||
-- explicit height: an auto-sized row measures short while the panel
|
||||
-- auto-sizes, which clipped the buttons at the panel's bottom border
|
||||
local btnRow = mk({ parent = panel, width = "100%", height = m.btnH,
|
||||
positioning = "flex", flexDirection = "horizontal", gap = 10 * m.s })
|
||||
button(imp, btnRow, "confirm-yes", c.yesLabel or Strings("OK"), {
|
||||
flex = 1, h = m.btnH, size = 13 * m.s + 1, kind = "primary",
|
||||
|
||||
@@ -1830,6 +1830,18 @@ function RomImporter:update(dt)
|
||||
end
|
||||
local tab = os.getenv("POKEPORT_LAUNCHER_TAB")
|
||||
if tab and tab ~= "" then self:_switchTab(tab) end
|
||||
-- POKEPORT_LAUNCHER_CONFIRM=1 arms a representative install confirm so
|
||||
-- a capture can see the modal (it is otherwise only reachable by click)
|
||||
if os.getenv("POKEPORT_LAUNCHER_CONFIRM") == "1" then
|
||||
self._modConfirm = {
|
||||
kind = "update",
|
||||
title = "Install mod",
|
||||
yesLabel = "Install",
|
||||
lines = { "JP GREEN - Poketto Monsuta Midori v0.4.4",
|
||||
"by bryanthaboi",
|
||||
"Mods are not reviewed - trust the author." },
|
||||
}
|
||||
end
|
||||
local query = os.getenv("POKEPORT_LAUNCHER_QUERY")
|
||||
if query and query ~= "" then
|
||||
self.findQuery = query
|
||||
|
||||
Reference in New Issue
Block a user