Add countdown to UI

This commit is contained in:
David Vogel 2020-05-31 17:59:36 +02:00
parent b8fb1d67cf
commit 24fa53be27
2 changed files with 4 additions and 0 deletions

View File

@ -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
-- This prevents black blocks in areas without entites
UiHideCountdown = delay
for i = 1, delay, 1 do
GameSetCameraPos(x, y)
wait(1)
UiHideCountdown = UiHideCountdown - 1
end
GameSetCameraPos(x, y)

View File

@ -4,6 +4,7 @@
-- https://opensource.org/licenses/MIT
UiHide = false
UiHideCountdown = 0
local UiReduce = false
UiProgress = nil
UiCaptureProblem = nil
@ -117,6 +118,7 @@ async_loop(
if not UiHide then
local x, y = GameGetCameraPos()
GuiTextCentered(modGUI, 0, 0, string.format("Coordinates: %d, %d", x, y))
GuiTextCentered(modGUI, 0, 0, string.format("Countdown: %d", UiHideCountdown))
if UiProgress then
GuiTextCentered(
modGUI,