Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 17th Dec 2011 04:23
I am messing around with menus and am hitting some road blocks.

First one is I got the clicking spot to work on the first background but when you click on it you have to hold the mouse button in to see the 2nd menu screen, and when you do it flickers.

Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 17th Dec 2011 13:58
G'day x_THOR_x,

Maybe spend some time figuring out the mouse, considering it'll be the main input to your menu system.

I've coded up my mouse function to detected the following;

Mouse Button Pressed
Mouse Button Released
Mouse Button Held Down
Mouse Button Up

Practice capturing these states of the left, right & middle mouse button, and you'll be well on your way to programming up your menu system.

Here's my current mouse code. Although I'm sure it's far from perfect, or optimised, it still works for everything I've needed it to work for so far.



Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 17th Dec 2011 14:49
Might add thia to my wiki... and optimise it

Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 18th Dec 2011 22:39
I wrote that a couple of years ago, and haven't revisited it in ages, but yeah, seems to work!

The same logic applies to the keyboard too, but I have to rewrite my keyboard function, as I accidentally wrote it around Scancode() and not Keystate(), which means only one keyboard key works at any time.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia

Login to post a reply

Server time is: 2026-07-09 15:47:36
Your offset time is: 2026-07-09 15:47:36