Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Main Menu GUI with source edit


Lenton
 Share

Recommended Posts

I'm working on GUI's and working with the source for my game, "Mayhem Online". I thought i might as well post something so you can rate it out of 10.

Main Menu
![](http://www.freewebs.com/mayhemonline/Main%20Menu%20screenshot.gif)

PS - The "53 Players Online" thing is a little bit of a lie. =P

So do you like it?
Link to comment
Share on other sites

@Robin:

> You ruined it with default controls. It's not hard to make a custom one with normal, mouse_over and clicked.

Yeah, i will be making my own buttons, it was either using the TE buttons or them. (temporarily)

Also i'm not sure how to make them change when mouse is over or clicked.
Link to comment
Share on other sites

Double click the image you're using for the button, go to the little drop-down list on the top right and select 'Mouse Over' or 'Mouse Down'. In the code add something like this:

```
imgButton.picture = loadpicture(app.path & "\gfx\buttons\button_mouseover.jpg")

```
Obviously, that'll re-load the image every time you move your mouse, so some more advanced code is required. Basically, for Winds Whisper, I store all the button states in a type.

```
Type ButtonRec
Login as byte
NewAcc as byte
Options as byte.
etc. etc.
end type

```
Then use that to make a global.

```
Public Buttons as buttonrec

```
Then I can simply store the states in that type, to make it optimised and it doesn't keep re-loading images.

Something like this in Mouse Over:

```
If Buttons.Login = BUTTONMOUSEOVER then exit sub

If Buttons.Login = BUTTONNORMAL then
imgLogin.picture = loadpicture(login.jpg)
buttons.login = BUTTONMOUSEOVER
end if

```
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...