Files
impostor/inc/logic/logic.minigame.lua
mr.one 9a3c9ee28c
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
- ddr special logic seems to be working in solation
2026-03-21 17:26:39 +01:00

20 lines
658 B
Lua

-- Manages minigame configurations and initial states.
--- @section Minigame
--- Draws a unified win message overlay.
--- @within Minigame
function Minigame.draw_win_overlay(win_text)
local text = win_text or "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