forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Creating a working rollover image.

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development
View previous topic :: View next topic  
Author Message
stonerifik



Joined: 15 Aug 2005
Posts: 3

PostPosted: Tue Aug 23, 2005 1:37 pm    Post subject: Creating a working rollover image. Reply with quote

Hello all, I have been browsing around the forums and I am very impressed, although I am not quite upto your level in the Lua programming, I am striving to get better. Anyways heres what I need some help with.

I have a start menu for my game with the options: Play Now, Settings, Credits.

I am using this code to display my pictures:

Code:

   screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
   screen:blit(300,75, menu1img)
   screen:blit(300,125, menu2img)
   screen:blit(300,175, menu3img)


What I would like to learn is how to make use of the d-pad with the UP and DOWN arrows to select these images and call another image to act as a rollover image...

That is it for now, any help or reference to something like this would be very much appriciated. Thank you for your time.

- stonerifik
Back to top
View user's profile Send private message
0x0001



Joined: 21 Jul 2005
Posts: 11

PostPosted: Tue Aug 23, 2005 2:51 pm    Post subject: Reply with quote

this belongs in the lua player
forum please do post in the right
forum ...as would reduce confusion
and clutter and more lua specific
devs coud help you out more in
that forum
Back to top
View user's profile Send private message Send e-mail
stonerifik



Joined: 15 Aug 2005
Posts: 3

PostPosted: Tue Aug 23, 2005 2:54 pm    Post subject: Reply with quote

Oh my bad, :P I apologize, could anyone move this post?
Back to top
View user's profile Send private message
Oobles
Site Admin


Joined: 17 Jan 2004
Posts: 362
Location: Melbourne, Australia

PostPosted: Tue Aug 23, 2005 3:49 pm    Post subject: Reply with quote

Moved.
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
nevyn



Joined: 31 Jul 2005
Posts: 136
Location: Sweden

PostPosted: Tue Aug 23, 2005 6:02 pm    Post subject: Re: Creating a working rollover image. Reply with quote

stonerifik wrote:
Hello all, I have been browsing around the forums and I am very impressed, although I am not quite upto your level in the Lua programming, I am striving to get better. Anyways heres what I need some help with.

I have a start menu for my game with the options: Play Now, Settings, Credits.

I am using this code to display my pictures:

Code:

   screen:blit(0, 0, background, 0, 0, background:width(), background:height(), false)
   screen:blit(300,75, menu1img)
   screen:blit(300,125, menu2img)
   screen:blit(300,175, menu3img)


What I would like to learn is how to make use of the d-pad with the UP and DOWN arrows to select these images and call another image to act as a rollover image...

That is it for now, any help or reference to something like this would be very much appriciated. Thank you for your time.

- stonerifik


I do this in Lowser. It's pretty simple: use a number variable as an index for the currently selected item. When down is pressed, increase the index, and opposite for up. In the blit section, blit the overlay image according to the index;
Code:
screen:blit(300,75+50*menuIndex, menuOverlayimg)
Back to top
View user's profile Send private message Send e-mail Visit poster's website
stonerifik



Joined: 15 Aug 2005
Posts: 3

PostPosted: Wed Aug 24, 2005 8:15 am    Post subject: Reply with quote

Quote:
use a number variable as an index for the currently selected item.


How would I do that? Sorry if this is a stupid question, I will keep searching.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Lua Player Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group