Files
impostor/inc/window/window.intro.lua
Zoltan Timar 66af47c483
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
feat: ring timer drawn at top-left of screen, Meter.set_timer_duration(f) controls speed, Meter.set_timer_decay(a) controls decay amount, all decay pauses during any minigame window
2026-02-26 15:43:39 +01:00

42 lines
944 B
Lua
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
--- @section IntroWindow
IntroWindow.y = Config.screen.height
IntroWindow.speed = 0.5
IntroWindow.text = [[
Norman Reds everyday life
seems ordinary: work,
meetings, coffee, and
endless notifications.
But beneath him, or around
him — something is
constantly building, and
it soon becomes clear
that there is more going
on than meets the eye.
]]
--- Draws the intro window.
--- @within IntroWindow
function IntroWindow.draw()
local x = (Config.screen.width - 132) / 2
Print.text(IntroWindow.text, x, IntroWindow.y, Config.colors.light_blue)
end
--- Updates the intro window logic.
--- @within IntroWindow
function IntroWindow.update()
IntroWindow.y = IntroWindow.y - IntroWindow.speed
local lines = 1
for _ in string.gmatch(IntroWindow.text, "\n") do
lines = lines + 1
end
if IntroWindow.y < -lines * 8 then
Window.set_current("menu")
end
if Input.menu_confirm() then
Window.set_current("menu")
end
end