QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

lua option menu?

This is a discussion on lua option menu? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; k what i wanna do if youve been folowing my code thus far is make like a start menu so ...

Reply
 
LinkBack Thread Tools
Old 10-21-2005, 09:31 PM   #1

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Talking lua option menu?

k what i wanna do if youve been folowing my code thus far is make like a start menu so i went to paint and made 3 images 1 without anything haveing been chosen and the 2nd image choose the top choice and 3rd image choose bottom choice but they both go to the same thing so i hope you understand that what i want to do is go to a menu choose between the 2 (which go to the same thing) then by pressing x it takes me there and the controls reset to what has been coded as you can see i had began writing it when i realized i had no idea how to reset the controls or make it go and start that line so i am ganna post my most current code:

Quote:
System.usbDiskModeActivat e()

green=Color.new(0,255,0)
orange=Color.new(255,128, 0)
teal=Color.new(64,128,128 )
blue=Color.new(0,0,255)
red=Color.new(255,0,0)
black=Color.new(0,0,0)
lightgreen=Color.new(0,25 5,128)
lightyellow=Color.new(255 ,255,128)
yellow=Color.new(255,255, 0)

redballX=200
redballY=150
redballColor=blue

background = Image.load("pic/background.png")
redball = Image.load("pic/redball.png")
redballblue = Image.load("pic/redballblue.png")
redballred = Image.load("pic/redballred.png")
redballorange = Image.load("pic/redballorange.png")
redballgreen = Image.load("pic/redballgreen.png")
redballteal = Image.load("pic/redballteal.png")
redballblack = Image.load("pic/redballblack.png")
redballlightgreen = Image.load("pic/redballlightgreen.png")
redballlightyellow = Image.load("pic/redballlightyellow.png")
optionchoose1 = Image.load("pic/optionchoose1.png")
optionchoose2 = Image.load("pic/optionchoose2.png")
optionchoose3 = Image.load("pic/optionchoose3.png")

CurrentBall=redballred

while true do
screen:clear()
pad=Controls.read()
screen:blit(480,272, optionchoose1)
if pad:up() then screen:blit(480,272,optio nchoose2)
elseif pad:cross() then

if pad:cross() then CurrentBall=redballred
elseif pad:triangle() then CurrentBall=redballblue
elseif pad:circle() then CurrentBall=redballlighty ellow
elseif pad:square() then CurrentBall=redballorange
elseif pad:start() then CurrentBall=redballgreen
elseif pad:l() then CurrentBall=redballteal
elseif pad:r() then CurrentBall=redballlightg reen
elseif pad:select() then break
end

if pad:up() then redballY=redballY-5
elseif pad:down() then redballY=redballY+5
elseif pad:left() then redballX=redballX-5
elseif pad:right() then redballX=redballX+5
end

screen:fillRect(0,0,480,2 72, yellow)
screen:blit(redballX, redballY, CurrentBall)
screen.waitVblankStart()
screen.flip()
end
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:32 PM   #2

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by slicer4ever
k what i wanna do if youve been folowing my code thus far is make like a start menu so i went to paint and made 3 images 1 without anything haveing been chosen and the 2nd image choose the top choice and 3rd image choose bottom choice but they both go to the same thing so i hope you understand that what i want to do is go to a menu choose between the 2 (which go to the same thing) then by pressing x it takes me there and the controls reset to what has been coded as you can see i had began writing it when i realized i had no idea how to reset the controls or make it go and start that line so i am ganna post my most current code:
You should use the search button or post in the lua help thread :icon_wink
__________________
F.A.L.O?
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:36 PM   #3

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Talking

first off when i do use search it seems to come up with nutin or do u mean google it which i dont know if it will help me very much(google) and i posted in that thread and they never helped me so i just thought it better to make my own thread and get responded to faster

but if you want me to hold off for the posts for a little bit then i will i just learn the stuff and then wanna do more so thats why i ask this stuff and so far my stuff is working good
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects

Last edited by slicer4ever; 10-21-2005 at 09:42 PM..
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:46 PM   #4
 
sumpaintballer41's Avatar
 
Join Date: Jul 2005
Location: Ware, MA
Posts: 868
Trader Feedback: 0
Default

Yeah i havent been able to actually find anything using the searchbar either...

I think thats justifiable, but im not even CLOSE to being a mod so I have no say in the matter. But anywhoo, You should clear the screen first then load the parameters and controls using WHILE 1(); so these controls are active looping while redball actions are in effect...Sry im sort of a newbie coder so dont flame me if im wrong!
__________________
Cover your eyes and run...
gmansixfo= STEPMANIA LEGEND!!
Halo2 Gamertag~PSPH4X0R

7/17/06
~The Day My PSP Almost Died~
Thank you
GrandTheftAutoJunkie
sumpaintballer41 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-22-2005, 01:18 PM   #5
 
Join Date: Aug 2005
Posts: 28
Trader Feedback: 0
Default

Here's what you're looking for this is how i've coded my options menu although you'll have to modify it to get it to work it won't be that difficult. But, since i have all my files and everything it calls it works perfectly.

Code:
function optionmenu()
	selectedoption = 1
	oldoptionpad = Controls.read()
	loopoptionmenu = true
	while loopoptionmenu do
		if selectedoption == 1 then
			screen:blit(0, 0, optionmenu1)
			screen.waitVblankStart()
		end
		if selectedoption == 2 then
			screen:blit(0, 0, optionmenu2)
			screen.waitVblankStart()
		end
	oldoptionpad = Controls.read()
	if optionpad ~= oldoptionpad then
      		if optionpad:down() then
			selectedoption = selectedoption + 1
			click:play()
				if selectedoption > 2 then
					selectedoption = 1
				end
		end
		if optionpad:up() then
			selectedoption = selectedoption - 1
			click:play()
				if selected option < 1 then
					selectedoption = 1
				end
		end
		if optionpad:cross() then
			if selectedoption == 1 then
				screen:clear()
				credits()
				screen:clear()
				mainmenu()	
				looppoptionmenu = false
			end
			if selectedoption == 2 then
				screen:clear()
				mainmenu()
				loopoptionmenu = false
			end
		end
	oldoptionpad = optionpad
	end
	screen.waitVblankStart()
	screen.flip()
	end
end
jazazel is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-24-2005, 09:53 PM   #6
 
sumpaintballer41's Avatar
 
Join Date: Jul 2005
Location: Ware, MA
Posts: 868
Trader Feedback: 0
Default

Dont forget the semi colons...does it not show them in the code box?? hmmm
__________________
Cover your eyes and run...
gmansixfo= STEPMANIA LEGEND!!
Halo2 Gamertag~PSPH4X0R

7/17/06
~The Day My PSP Almost Died~
Thank you
GrandTheftAutoJunkie
sumpaintballer41 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
lua , menu , option

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 05:47 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us