#UI - Helper functions for building balatro UIs

1 messages · Page 1 of 1 (latest)

rotund citrus
#

NOTE: This mod is an AML mod. To use elsewhere, delete all aml.globals. and replace aml.game. with G., and rename the exports table.

Currently no documentation -- read the source for the API.

Here's a demo:

local ui
function preload()
    ui = assert(aml.require("ui"))
end
local function show_list()
    aml.game.SETTINGS.paused = true
    local items = {}
    for i = 1,5 do
        items[i] = ui.button(tostring(i),"pressed_" .. i,
            ui.config()
              :zoom(0.7)
              :background_color(aml.game.C.CHIPS)
        )
    end
    ui.spawn_dialog(ui.default_popup(
        ui.flex_column(
            items,
            ui.config():gap(0.2)
        )
    ))
end