configuration window
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
function Input.up() return btnp(0) end
|
||||
function Input.down() return btnp(1) end
|
||||
function Input.left() return btn(2) end
|
||||
function Input.right() return btn(3) end
|
||||
function Input.left() return btnp(2) end
|
||||
function Input.right() return btnp(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
|
||||
|
||||
@@ -29,6 +29,10 @@ local STATE_HANDLERS = {
|
||||
PopupWindow.draw()
|
||||
PopupWindow.update()
|
||||
end,
|
||||
[WINDOW_CONFIGURATION] = function()
|
||||
ConfigurationWindow.update()
|
||||
ConfigurationWindow.draw()
|
||||
end,
|
||||
}
|
||||
|
||||
function TIC()
|
||||
|
||||
@@ -65,3 +65,15 @@ function UI.word_wrap(text, max_chars_per_line)
|
||||
return lines
|
||||
end
|
||||
|
||||
function UI.create_numeric_stepper(label, value_getter, value_setter, min, max, step, format)
|
||||
return {
|
||||
label = label,
|
||||
get = value_getter,
|
||||
set = value_setter,
|
||||
min = min,
|
||||
max = max,
|
||||
step = step,
|
||||
format = format or "%.1f",
|
||||
type = "numeric_stepper"
|
||||
}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user