unloadbuff()
System.powerGetBatteryLifePercent()

red = Color.new(255, 0, 0)
white = Color.new(255, 255, 255)
------------------------------------------------
Select=1
maxSelect=3
menuBackground = Image.load("img/bg1.png")
ico = Image.load("img/buton.png")
ico1 = Image.load("img/buton1.png")
oldpad=Controls.read()
------------------------------------------------
while true do
pad=Controls.read()
screen:clear()
screen:blit(0,0,menuBackground)
------------------------------------------------
-----------------------------icons--------------

if pad:left() and oldpad:left() ~= pad:left() then
Select = Select - 1
end
if pad:right() and oldpad:right() ~= pad:right() then
Select = Select + 1
end
if Select > maxSelect then
Select = 1
elseif Select <= 0 then
Select = maxSelect
end
if Select == 1 then
screen:blit(100,75,ico)
screen:blit(200,80,ico1)
end
if Select == 2 then
screen:blit(100,80,ico)
screen:blit(200,75,ico1)
end
if Select == 3 then
screen:blit(100,80,ico)
screen:blit(200,80,ico1)
end

if pad:cross() and Select == 1 then
dofile("ms/1.lua")
end
if pad:cross() and Select == 2 then
dofile("qs/1.lua")
end
screen:print(30,30,"Select a Category")
screen:print(50,50,"Every Category has 10 Questions")
screen.waitVblankStart()
screen.flip()
oldpad = pad
end
