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
DRYAD
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: Greece
Posted: 16th Apr 2003 00:30
Hello again...
i was trying to make a graphic user interface.
for example i have 2 bitmaps on my screen.
one bitmap START and one bitmap OPTIONS
i want when mouse is over one bitmap to change the graphic and have some glow on it. i allready created all the bitmaps one without glow and one with glow but i dont know how to make bitmaps change when the mouse is over one bitmap.
please help me.
any idea?
a code snippet maybe??? )
thanks in advance
andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 16th Apr 2003 01:05 Edited at: 16th Apr 2003 01:09
Heres a snippet:



You use it like this:

If button(10,10,100,100,1,2,3,1,1) Then ...

Parameters are, respectively,
button position x
button position y
button size x
button size y
button image
image on mouse over
image on mouse click
click type for "true" return
sprite number - must be different from any other sprite number

All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Uh... Um... Oh I forgot
andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 16th Apr 2003 01:07
Source code below:

All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Uh... Um... Oh I forgot
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 16th Apr 2003 03:44
That's some great source code there andrew. Lol.

Chief Voyager
23
Years of Service
User Offline
Joined: 20th Mar 2003
Location: United States
Posted: 16th Apr 2003 04:03
click on the source button on the bottom of his post.

You're ate up like a soup sandwich.
andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 16th Apr 2003 04:37 Edited at: 16th Apr 2003 04:38

Ok then click here:

http://www.darkbasicpro.com/apollo/view_code.php?i=111

Besides, its the same as in the code box, it just looks nicer.

All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Uh... Um... Oh I forgot
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 16th Apr 2003 05:36
Well it least it works now. :-s

andrew11
23
Years of Service
User Offline
Joined: 23rd Feb 2003
Location: United States
Posted: 16th Apr 2003 06:06
Do you like it? I don't even get a "thank you"? Oh well, glad I could help.

All programmers are playwrights and all computers are lousy actors." -Anon.
<--- Uh... Um... Oh I forgot
DRYAD
23
Years of Service
User Offline
Joined: 20th Dec 2002
Location: Greece
Posted: 16th Apr 2003 20:07
thank you very much

Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 17th Apr 2003 14:45
yeah, just give a set of 4 co-ordinates, just like the box command:

r#=100
g#=100
b#=100

do

sync

cls

rem colour of box
ink rgb(r#,g#,b#),1

rem create button
box 0,0,50,50

rem mouse control
if mousex() > 0 and mousex() < 50 and mousey() > 0 and mousey() < 50
r#=255
g#=255
b#=255
if mouseclick()=1
cls rgb(255,0,0)
endif
else
r#=100
g#=100
b#=100
endif

sync

loop

Login to post a reply

Server time is: 2026-07-11 12:01:46
Your offset time is: 2026-07-11 12:01:46