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.

Newcomers DBPro Corner / Making buttons

Author
Message
Data
20
Years of Service
User Offline
Joined: 26th Nov 2004
Location: Winnipeg,Canada
Posted: 5th Oct 2005 00:42 Edited at: 5th Oct 2005 00:58
How would I make a button you can click and it will take you to the another screen? I know its a noobie question.....

I think therefore I am.
Data
20
Years of Service
User Offline
Joined: 26th Nov 2004
Location: Winnipeg,Canada
Posted: 5th Oct 2005 01:45
can someone please answer............

I think therefore I am.
Slayer93
20
Years of Service
User Offline
Joined: 5th Aug 2004
Location: I wish I knew
Posted: 5th Oct 2005 02:16
I made a code exactly like that except with text but it exactly the same heres the code:


this is how it works first you print the text or paste a button if you want to use a button in the loop

then you use the if then command to click the buttons

this code


the mousex() > 0 and mousex() < 100 and mousey() > 100 and mousey() < 120 this puts a range

first line of if mousex() ect makes it turn a different color or different button

2nd line is when u click it then it goes somewhere if u replace the text 100,120,"YOU CLICKED NEW GAME"

hope that helps

NARUTO IS THE NINJA.....not really
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 5th Oct 2005 02:28
http://forum.thegamecreators.com/?m=forum_view&t=59061&b=7

If you enter the word 'button' into the search box at the bottom of the screen, it returns loads of other posts about buttons too.

TDK_Man

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 5th Oct 2005 04:20

can u actually use 'and' in your code???!!!?
Deep Thought 42
19
Years of Service
User Offline
Joined: 31st Jul 2005
Location: New Jersey, USA
Posted: 5th Oct 2005 05:56
@Data
Next time be a little more patient! This isn't instant messaging.

"There are no stupid questions, just a lot of inquisitive idiots."
Heckno
20
Years of Service
User Offline
Joined: 8th Sep 2004
Location: Palm Coast, FL
Posted: 5th Oct 2005 08:10
Quote: "If you enter the word 'button' into the search box at the bottom of the screen, it returns loads of other posts about buttons too."


Lol, do a thread/forum search, that would be way too easy
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 5th Oct 2005 20:45
i prefer using sprites cuse to many mouse variables get in the way and take up a lot of space an u usaly end up using a while loop.

make a button a sprite
put a small sprite at the cursor position make it invisible
set sprite collision on


hope this helps

A child's dream never dies.
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 5th Oct 2005 21:13
the bad thing about sprites is that theyre limited.. here a function for my simple buttons



call it like: button("Text",position x,position y,scale x,scale y)


Silent Knight
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: In Your Mind
Posted: 6th Oct 2005 00:25
oh btw will a GUI made in liberty basic (with the gui editor) work with dark basic? also, is there a command in DB such as the "nomainwin" command when used in liberty basic?

Version--DB Classic
900 mhz AMD Athlon, 128 MB RAM,
16 MB NVidia Vanta gfx card, Windows ME System software
smerf
19
Years of Service
User Offline
Joined: 24th Feb 2005
Location: nm usa
Posted: 6th Oct 2005 10:56 Edited at: 6th Oct 2005 10:57
sprites are not limited only bitmaps
and if you need more than 36 buttons then somthing is seriously wrong with you.
mabey you should go see a doctor for obsessive compulsive disorder lol.

A child's dream never dies.

Login to post a reply

Server time is: 2024-11-27 16:31:53
Your offset time is: 2024-11-27 16:31:53