How to make a start new game/load game screen?
How do you make a screen that lets the user click on whther he/she wants to start a new game or load a previous one? Do you just display the bitmap with the words New Game and Load Game on and then use mouse coordinates to decide of the user clicks in the area of one of the choices? or do you actually use buttons? if so how? I can get the buttons up but i dont want them to look like regular windows buttons, i want a full screen bitmap with buttons on that go with the picture. Erm am i making myself clear? i think i have confused myself lol. Anyway if anyone knows what I mean and can help me Id be very grateful.
Thanks for your time
Just my thoughts take them as you will.
"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
I use the bitmaps and get mouse co-ords approach it works well enough for me.
Thanks crazy-vasey that is the way I was going to do it but I thought there might be an easier way using buttons.
Cheers
Just my thoughts take them as you will.
"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Cheers
Just my thoughts take them as you will.
"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Well, if you know the x,y coordinates of your bitmaps (which you should know ) It realy is fairly simple.
All you are looking for is a specific compination of x,y coordinates. if bitmap 1 was (0,0) to (100,120) and bitmap 2 was (0,130) to (100,250) then all you have to do for each btimap is create a simple if statement.
//bitmap 1
if(((GetMouseX() <= 100)&&(GetMouseX() >=0)&&(GetMouseY() <= 120)&&(GetMouseY() >= 0))){
... make your changes here...
}
//bitmap 2
else if(((GetMouseX() <=100)&&(GetMouseX() >=0)^^(GetMouseY() <=250)&&(GetMouseY() >=130))){
.. Make changes here...
}
All this does is first check that everything is within the X range of bitmap 1, if not... it tests to see if it is in bitmap 2. If the X range matchs any one bitmap, it will then continue by testing the Y range, if that tests true, then your event can take place to that bitmap.
Hope this helps.
Kurifu Roushu
All you are looking for is a specific compination of x,y coordinates. if bitmap 1 was (0,0) to (100,120) and bitmap 2 was (0,130) to (100,250) then all you have to do for each btimap is create a simple if statement.
//bitmap 1
if(((GetMouseX() <= 100)&&(GetMouseX() >=0)&&(GetMouseY() <= 120)&&(GetMouseY() >= 0))){
... make your changes here...
}
//bitmap 2
else if(((GetMouseX() <=100)&&(GetMouseX() >=0)^^(GetMouseY() <=250)&&(GetMouseY() >=130))){
.. Make changes here...
}
All this does is first check that everything is within the X range of bitmap 1, if not... it tests to see if it is in bitmap 2. If the X range matchs any one bitmap, it will then continue by testing the Y range, if that tests true, then your event can take place to that bitmap.
Hope this helps.
Kurifu Roushu
Gamedev's AI Auto-Reply bot.
If you don''t want to keep testing coordinates and you don''t want to use buttons either, but you do want to be able to have buttons which can be any shape (not just rectangular) then:
Make a second bitmap and use it as a mask. Every time the user clicks, get the pixel colour of the mask bitmap where they clicked and this will tell you which options was clicked on (if you use a diffeent colour for each option). That way, you can also make your options different shapes.
It''s a bit more work and you have to load an extra bitmap but it''s very easy to code and also more flexible. Just an idea...
Make a second bitmap and use it as a mask. Every time the user clicks, get the pixel colour of the mask bitmap where they clicked and this will tell you which options was clicked on (if you use a diffeent colour for each option). That way, you can also make your options different shapes.
It''s a bit more work and you have to load an extra bitmap but it''s very easy to code and also more flexible. Just an idea...
Simon PriceSi@VBgames.co.ukwww.VBgames.co.uk
Thanks for the info guys. Im gonna code the start screen tomorrow and hopefully ill be able to think straight when im sober lol.
Thanks again
Just my thoughts take them as you will.
"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Thanks again
Just my thoughts take them as you will.
"People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
Just my thoughts take them as you will. "People spend too much time thinking about the past, whatever else it is, its gone"-Mel Gibson, Man Without A Face
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement