package.path=package.path..";C:\\Users\\micro\\AppData\\Roaming\\com.nesbox.tic\\TIC-80\\rift\\?.lua"	-- jtruk
package.path=package.path..";C:\\Users\\Ronan\\AppData\\Roaming\\com.nesbox.tic\\TIC-80\\rift\\?.lua"	-- Mantratronic
package.path=package.path..";C:\\Users\\Matt\\AppData\\Roaming\\com.nesbox.tic\\TIC-80\\rift\\?.lua"	-- jynx

R={}
require("./sys/sys")(R)
require("./debug/menu")(R)

LAST_CHANGE=""
function changeCb(key,value)
    LAST_CHANGE=string.format("Change (T%d) %s => %s",time()//1,key,value)
end

MENU=R.Menu:new(changeCb)
MENU:addItem('fruit',"Choose Fruit",R.MenuItemSelect:new()
    :add('apple','Red apple')
    :add('orange','Tangerine')
    :add('banana','Yellow one')
)
MENU:addItem('weight',"Amount/kg",R.MenuItemNumber:new(-1,3,.3,1))

function TIC()
    R.tryBreak()
    cls()

    MENU:update()
    MENU:draw(10,10,12)

    print(MENU:getValue('fruit'),0,80,4)
    print(MENU:getValue('weight'),0,90,4)

    print(LAST_CHANGE,0,120,14)
end

-- <PALETTE>
-- 000:1a1c2c5d275db13e53ef7d57ffcd75a7f07038b76425717929366f3b5dc941a6f673eff7f4f4f494b0c2566c86333c57
-- </PALETTE>

