mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-22 21:17:33 +00:00
Add countdown to UI
This commit is contained in:
parent
b8fb1d67cf
commit
24fa53be27
@ -37,9 +37,11 @@ local function captureScreenshot(x, y, rx, ry)
|
|||||||
|
|
||||||
-- Set pos several times, so that chunks will load even if nothing happens in the surrounding
|
-- Set pos several times, so that chunks will load even if nothing happens in the surrounding
|
||||||
-- This prevents black blocks in areas without entites
|
-- This prevents black blocks in areas without entites
|
||||||
|
UiHideCountdown = delay
|
||||||
for i = 1, delay, 1 do
|
for i = 1, delay, 1 do
|
||||||
GameSetCameraPos(x, y)
|
GameSetCameraPos(x, y)
|
||||||
wait(1)
|
wait(1)
|
||||||
|
UiHideCountdown = UiHideCountdown - 1
|
||||||
end
|
end
|
||||||
GameSetCameraPos(x, y)
|
GameSetCameraPos(x, y)
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
-- https://opensource.org/licenses/MIT
|
-- https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
UiHide = false
|
UiHide = false
|
||||||
|
UiHideCountdown = 0
|
||||||
local UiReduce = false
|
local UiReduce = false
|
||||||
UiProgress = nil
|
UiProgress = nil
|
||||||
UiCaptureProblem = nil
|
UiCaptureProblem = nil
|
||||||
@ -117,6 +118,7 @@ async_loop(
|
|||||||
if not UiHide then
|
if not UiHide then
|
||||||
local x, y = GameGetCameraPos()
|
local x, y = GameGetCameraPos()
|
||||||
GuiTextCentered(modGUI, 0, 0, string.format("Coordinates: %d, %d", x, y))
|
GuiTextCentered(modGUI, 0, 0, string.format("Coordinates: %d, %d", x, y))
|
||||||
|
GuiTextCentered(modGUI, 0, 0, string.format("Countdown: %d", UiHideCountdown))
|
||||||
if UiProgress then
|
if UiProgress then
|
||||||
GuiTextCentered(
|
GuiTextCentered(
|
||||||
modGUI,
|
modGUI,
|
||||||
|
Loading…
Reference in New Issue
Block a user