mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-23 02:29:03 -06:00
Add support for many options
This commit is contained in:
parent
3a67e15966
commit
45b247939e
@ -59,9 +59,23 @@ function GamemodeConfigScene:render()
|
||||
love.graphics.printf(setting, 100 + 110 * j, 100 + i * 20, 100, "center")
|
||||
end
|
||||
else
|
||||
local curr_index = new_config[option[1]]
|
||||
local prev_index = Mod1(curr_index-1, #option[3])
|
||||
local next_index = Mod1(curr_index+1, #option[3])
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 0.5)
|
||||
love.graphics.printf(option[3][prev_index],
|
||||
100 + 110 * 1, 100 + i * 20, 100, 'center')
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.printf("< " .. option[3][curr_index] .. " >",
|
||||
100 + 110 * 2.5, 100 + i * 20, 100, 'center')
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 0.5)
|
||||
love.graphics.printf(option[3][next_index],
|
||||
100 + 110 * 4, 100 + i * 20, 100, 'center')
|
||||
|
||||
love.graphics.setColor(1, 1, 1, 1)
|
||||
love.graphics.printf(option[3][new_config[option[1]]], -- what an indexer
|
||||
100 + 110 * 1, 100 + i * 20, 100, 'center')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -254,6 +254,15 @@ function MarathonA1Game:provideSettings()
|
||||
{"allowHardDrop", "Allow hard drop", {"No", "Yes"}}
|
||||
}
|
||||
|
||||
--[[
|
||||
local opts = {}
|
||||
for i=1, 10 do
|
||||
opts[i] = i
|
||||
end
|
||||
|
||||
table.insert(t, {"manyOptions", "Many options", opts})
|
||||
]]
|
||||
|
||||
return t
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user