Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next

 
Reply
Posted 2006-03-12, 10:43 PM in reply to KittenRat's post starting "Bluecube? Hay new question but same..."
Since it is midnight I will give a vague outline on how to do it, if you need further instructions I'll post more tommorrow.


1) Get/Make a Picture for your cursor, and import it
2) Determine where the first choice will be on the screen, coordinates-wise (easy enough to do, most image-editing programs give you the coordinates of where you mouse is, go from there). This will be variables [cursor X] and [cursor Y] by default.
3) Determine the distance between menu items. Assuming that all menu choices are evenly-placed, of course. Set as [cursor Y Distance] if it's just a one-collumn list.
4) Determine maximum list items[listMax]
5) Set the current cursor location, probably the first position, so [cursor position] will be 1 by default



The basic way to do this in pseudocode:

Code:
<> Declare variable [ cursor X ]
<> Declare variable [ cursor Y ]
<> Declare variable [ cursor position ] 
<> Declare variable [ cursor Y distance ]
<> Declare variable [ listmax ]

<>  ================================= 
<>  ================================= 
<>  ================================= 

<> Loop

	<> Show picture 1 at [cursor X], [cursor Y]
	<> Get keystroke, put in variable [grabbed key]
	
	<> if [grabbedkey] = up
		<> if [cursor position] > 1
			<>Subract 1 from [cursor position]
			<>Subtract [cursor Y distance] from [cursor Y]
		:End
	:End
	
	<> if [grabbedkey] = down
		<> if [cursor position] <[listmax]
			<>Add 1 to [cursor position]
			<>Add [cursor Y distance] to [cursor Y]
		:End
	:End
	
	<> if [grabbedkey] = enter
		<> Go to label "Selected"
	:End
	
	<> if [grabbedkey] = esc
		<> Go to label "Escaped"
	:End
	
<>  Comment: Ends the main loop
:End 

<>  ================================= 
<>  ================================= 
<>  ================================= 

<> Label: "Selected"
<> if [cursor position] = 1
	<> Blah
	<>
	<>
:End
<> if [cursor position] = 2
	<> Blah
	<>
	<>
:End
<>  Comment: Obviously however many items you have, you'd put here
<>Go to label "End"

<>  ================================= 
<>  ================================= 
<>  ================================= 

<> Label: "Escaped"
<> Play sound effect "Bzzt" or whatever
<> Go to label "End"

<>  ================================= 
<>  ================================= 
<>  ================================= 

<> Label: "End"
<> Basic cleanup goes here, like clearing all images,
<> clearing all relevant switches, etc
<>
<>
If you wanted to, you could modify that so that the cursor "loops" from top to bottom, but that's the basic idea - the cursor just jumps a set number of pixels based on your input, with limits on how far it can go in either direction, and when you select something, you jump out of the loop and process whatever you're on.

Last edited by BlueCube; 2006-03-12 at 10:46 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum 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
Forum Jump


All times are GMT -6. The time now is 08:28 AM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.