save/load functionality (WIP)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
function Input.up() return btnp(0) end
|
||||
function Input.down() return btnp(1) end
|
||||
function Input.left() return btnp(2) end
|
||||
function Input.right() return btnp(3) end
|
||||
function Input.left() return btn(2) end
|
||||
function Input.right() return btn(3) end
|
||||
function Input.player_jump() return btnp(4) end
|
||||
function Input.menu_confirm() return btnp(4) end
|
||||
function Input.player_interact() return btnp(5) end -- B button
|
||||
function Input.menu_back() return btnp(5) end
|
||||
function Input.menu_back() return btnp(7) end
|
||||
|
||||
@@ -35,7 +35,18 @@ local STATE_HANDLERS = {
|
||||
end,
|
||||
}
|
||||
|
||||
local initialized_game = false
|
||||
|
||||
function init_game()
|
||||
if initialized_game then return end
|
||||
|
||||
MenuWindow.refresh_menu_items()
|
||||
initialized_game = true
|
||||
end
|
||||
|
||||
function TIC()
|
||||
init_game()
|
||||
|
||||
cls(Config.colors.black)
|
||||
local handler = STATE_HANDLERS[Context.active_window]
|
||||
if handler then
|
||||
|
||||
@@ -77,3 +77,11 @@ function UI.create_numeric_stepper(label, value_getter, value_setter, min, max,
|
||||
type = "numeric_stepper"
|
||||
}
|
||||
end
|
||||
|
||||
function UI.create_action_item(label, action)
|
||||
return {
|
||||
label = label,
|
||||
action = action,
|
||||
type = "action_item"
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user