20 lines
638 B
Lua
20 lines
638 B
Lua
-- Manages minigame configurations and initial states.
|
|
--- @section Minigame
|
|
|
|
--- Draws a unified win message overlay.
|
|
--- @within Minigame
|
|
function Minigame.draw_win_overlay()
|
|
local text = "SUCCESS"
|
|
local tw = #text * 6
|
|
local th = 6
|
|
local padding = 4
|
|
local box_w = tw + padding * 2
|
|
local box_h = th + padding * 2
|
|
local box_x = (Config.screen.width - box_w) / 2
|
|
local box_y = (Config.screen.height - box_h) / 2
|
|
|
|
rect(box_x, box_y, box_w, box_h, Config.colors.dark_grey)
|
|
rectb(box_x, box_y, box_w, box_h, Config.colors.white)
|
|
Print.text_center(text, Config.screen.width / 2, box_y + padding, Config.colors.white)
|
|
end
|