GreenAndi
04-05-2006, 04:24 PM
Everyone :D
this is my first Lua script. i want to make PSP Lua Bible. [ that i know there is a Bible for PSP but need web browser...hate that]
here is my first code [system.lua]
-- PSP LUA Bible v1.0
-- By GreenAndi
-- colors
white = Color.new(255,255,255)
-- print on screen
screen:print(10, 10, "PSP LUA BIBLE v1.0", white)
screen:print(15, 30, "> Old Testament", white)
screen:print(15, 40, "> New Testament", white)
-- onscreen
screen.flip()
-- loops
while true do
screen.waitVblankStart()
end
next, what i want to do are [but i don't know how to write the code]
1. when the system.lua load[run in lua player], the "> Old Testament" , highlighted in green colour and black in the text.
2. when i push control pad down, it will be the same as the "> New Testament" highlighted in green colour and black in the text. and the Old Testament back to its original colour, white.
3. as if i push control pad up again, the something will happen as no. 2 - back to the Old testement.
3. got what i meant ? there is only 2 options, choose Old or New, then when if i chosen Old Testament, then push pad cross [load] will be bring me to the other script [Old.lua] <<< think about it later
4. last, maybe i will add sounds to the menu option, like when move to the next option down or up, "blink" sound will hear. [just an idea, see how it will be going]
5 for the next develompmnt, i will add more features. like file browser, picture viewer, text reader ,etc [ see later]
the important bit is number 1, 2 and 3
could someone give me hits how to coding them
thank you very much
--- PSP LUA BIBLE v1.0, freely distributed, develop ... do whatever you want as you like :D ---
this is my first Lua script. i want to make PSP Lua Bible. [ that i know there is a Bible for PSP but need web browser...hate that]
here is my first code [system.lua]
-- PSP LUA Bible v1.0
-- By GreenAndi
-- colors
white = Color.new(255,255,255)
-- print on screen
screen:print(10, 10, "PSP LUA BIBLE v1.0", white)
screen:print(15, 30, "> Old Testament", white)
screen:print(15, 40, "> New Testament", white)
-- onscreen
screen.flip()
-- loops
while true do
screen.waitVblankStart()
end
next, what i want to do are [but i don't know how to write the code]
1. when the system.lua load[run in lua player], the "> Old Testament" , highlighted in green colour and black in the text.
2. when i push control pad down, it will be the same as the "> New Testament" highlighted in green colour and black in the text. and the Old Testament back to its original colour, white.
3. as if i push control pad up again, the something will happen as no. 2 - back to the Old testement.
3. got what i meant ? there is only 2 options, choose Old or New, then when if i chosen Old Testament, then push pad cross [load] will be bring me to the other script [Old.lua] <<< think about it later
4. last, maybe i will add sounds to the menu option, like when move to the next option down or up, "blink" sound will hear. [just an idea, see how it will be going]
5 for the next develompmnt, i will add more features. like file browser, picture viewer, text reader ,etc [ see later]
the important bit is number 1, 2 and 3
could someone give me hits how to coding them
thank you very much
--- PSP LUA BIBLE v1.0, freely distributed, develop ... do whatever you want as you like :D ---