If you've played rpg games like chrono trigger, final fantasy series, etc...
Then you should know how the menu(s) look like
Any idea on how i can do something similar in VB
using GDI or DDraw?
Please include source code if possible
Printable View
If you've played rpg games like chrono trigger, final fantasy series, etc...
Then you should know how the menu(s) look like
Any idea on how i can do something similar in VB
using GDI or DDraw?
Please include source code if possible
sorry it's so long ago I saw FF. can you tell me how the menues looked like? I'm sure you could do something like this with the help of DDraw! In the worst case with help of D3D
mmm...
it look like this
you'll select the choices
|===>==Status====|
|======Item=====|
|======Equipment=|
the '>' indicate's the arrow. users will use their keyboard to select not mouse
I'm using one picture box with some textures (=):
|================|
|================|
|================|
(the picture)
the three wordings are labels
but i'm hoping to use the whole menu(including the text) as a picture to and an arrow for the user which is seperated
any help though?
thans
[Edited by nameJack on 10-08-2000 at 04:58 AM]
Hm I allready did this for my 3D pong game:
PseudoCode:
ActSelection as byte
do
x=0
y= ActSelection * labelheight
dds_back.bltfast x, y, ddsArrow
if key = up then ActSelection = ActSelection -1
if key = down then ActSelection = ActSelection +1
loop
of course you got to check, that the ActSelection doesn't become smaller 0 or higher than the count of your options.
Ps Are you German? Because of your name. If not: Of course the name doesn't sound very German, but there is an internet service!
Actually I am not German though I always wanted to go there.
ANyway can I have the game you mention... the 3D Pong izzit?
where can I get it?
I get a little idea on how the code works
Can you give me a simpler one?
Regards
Hm I send the pong to you, but give me your graphicboaerdname first.
the code is the easiest i can give.
Ill send you an example soon, so you'll get it!
Did you use D3D for it? I have a 3D pong example that is kind of like a wireframe and I forgot who made it...
I programmed it without any examples for pong, only some D3D example stuff form the SDK
give me your email
graphicbooardname
what is that?
only wanted to know what graphics board you use.
Oh...
I uses AGP card
resl: 800 x 600
mmm....
Anyway...
I hope I'll understand what you'll send me cos what I want now is learning how to create the menu...
Regards
Hm man all you need is to change the y value of the where to blit thing! that's all!
Oh... Thanks though
I'm looking forward to your mail
Regards
Didn't I mail you already?
I don't think so
Have you mailed it to me?
Maybe I gave you a wrong one
Try sending again
Thanks a lot
Bye
Regards
Hm what exactly do you need? the menu?
all you got to do is:
set a variable
In this variable is the selection stored!
Than:
You use a loop. In this loop you can change the selection. Just if you press up then selection = selection -1
and when down then the same with +1!!!
Than when you pressed enter exit the loop execute the selection!
That's really all.
Because you wrote about DDraw, I think you know how to draw something, so just draw it to your selection!
Hmm...
Sounds simple
It'll be easier if you could include the codes as well
Actually I only now GDI and not DDraw
But I do understand what you meant
Anyway a code will do (not pseudo code)
Regards
You'll get it as soon as I get it finished in school.
Oh...
Thanks
Regards
I post this to get the thread to the top again, cause I can't help NameJack in the moment cause I'm gettig sick in the moment!
Try to do something like This:
Note that my code is very messed up and hardly works...
Code:Option Explicit
Dim selected As Integer
Private Sub Form_KeyPress(KeyAscii As Integer)
Select Case selected
Case 0:
If KeyAscii = vbKeyUp Then
selected = 3 'start over
ElseIf KeyAscii = vbKeyDown Then
selected = 1 'selected + 1
End If
Case 1:
If KeyAscii = vbKeyUp Then
selected = 0 'selected - 1
ElseIf KeyAscii = vbKeyDown Then
selected = 2 'selected + 1
End If
Case 2:
If KeyAscii = vbKeyUp Then
selected = 1 'selected - 1
ElseIf KeyAscii = vbKeyDown Then
selected = 3 'selected + 1
End If
Case 3:
If KeyAscii = vbKeyUp Then
selected = 2 'selected - 1
ElseIf KeyAscii = vbKeyDown Then
selected = 0 'start over
End If
End Select
''refresh the images;
Call refreshImages
If KeyAscii = vbKeyReturn Then
Call images_Click(selected)
End If
End Sub
Private Sub Form_Load()
'''load images
'''call the images fucntion
selected = 0
Call refreshImages
End Sub
Sub refreshImages()
Dim tmpStr As String
Dim i As Integer
tmpStr = "\image"
''load images first
For i = 0 To 3
images(i) = LoadPicture(App.Path & tmpStr & i + 1 & ".gif")
Next i
''hi-lite the selected image
images(selected) = LoadPicture(App.Path & tmpStr & selected + 1 & "_up.gif")
End Sub
Private Sub images_Click(Index As Integer)
Select Case Index
Case 0:
' do something
MsgBox ("image" & Index + 1 & " is selected")
Case 1:
' do something else
MsgBox ("image" & Index + 1 & " is selected")
Case 2:
' do something else
MsgBox ("image" & Index + 1 & " is selected")
Case 3:
' do something else
MsgBox ("image" & Index + 1 & " is selected")
Case Else:
' this is probably an error, so
' display an appropriate message
End Select
End Sub
Private Sub Timer1_Timer()
Call refreshImages
End Sub
''My form properties:
''what name
''''''''''''''''''''''''''''''''''''''
''Form1 Form1
''Timer1 Timer1
''Picture1(0 to 3) images(0 to 3)
''''''''''''''''''''''''''''''''''''''''''''''
Please let me know if you have problems with this code because i know its really lame, i didnt debug it.
Cheers!
It's really decent of you guys to help me out here
I have not tried the code up there coz right now I'm taking an exam. Just came in to see the growth
If I manage to finish the game... credits will be given to everyone who help me especially friends from vb-forum
However, u guys gotta still help me
I'm still green
Thanks
:)
Be back on 3 November 2000