remove ai generated comments
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

This commit is contained in:
2026-02-18 19:29:06 +01:00
parent 6303781534
commit 1cf09de1fb
15 changed files with 56 additions and 155 deletions

View File

@@ -1,28 +1,21 @@
-- Simplified PopupWindow module
local POPUP_X = 40
local POPUP_Y = 40
local POPUP_WIDTH = 160
local POPUP_HEIGHT = 80
local TEXT_MARGIN_X = POPUP_X + 10
local TEXT_MARGIN_Y = POPUP_Y + 10
local LINE_HEIGHT = 8 -- Assuming 8 pixels per line for default font
local LINE_HEIGHT = 8
function PopupWindow.show(content_strings)
Context.popup.show = true
Context.popup.content = content_strings or {} -- Ensure it's a table
GameWindow.set_state(WINDOW_POPUP) -- Set active window to popup
end
Context.popup.content = content_strings or {} GameWindow.set_state(WINDOW_POPUP) end
function PopupWindow.hide()
Context.popup.show = false
Context.popup.content = {} -- Clear content
GameWindow.set_state(WINDOW_GAME) -- Return to game window
end
Context.popup.content = {} GameWindow.set_state(WINDOW_GAME) end
function PopupWindow.update()
if Context.popup.show then
if Input.menu_confirm() or Input.menu_back() then -- Allow either A or B to close
PopupWindow.hide()
if Input.menu_confirm() or Input.menu_back() then PopupWindow.hide()
end
end
end
@@ -38,7 +31,6 @@ function PopupWindow.draw()
current_y = current_y + LINE_HEIGHT
end
-- Instruction to close
Print.text("[A] Close", TEXT_MARGIN_X, POPUP_Y + POPUP_HEIGHT - LINE_HEIGHT - 2, Config.colors.green)
Print.text("[A] Close", TEXT_MARGIN_X, POPUP_Y + POPUP_HEIGHT - LINE_HEIGHT - 2, Config.colors.green)
end
end