How???

Blitz3D Forums/Blitz3D Beginners Area/How???

RRK1020(Posted 2005) [#1]
How do I make an image sense it is being clicked and run a function???


RRK1020(Posted 2005) [#2]
Blitz3D!!!


jfk EO-11110(Posted 2005) [#3]
Next time please use a title that actually descibes the problem please.

your problem is very simple. just ask if the mouse was hit, and if MouseX() and MouseY() is on the image.

If your image is not rectangular, you may use an additional cursor image that is positioned at the mouseX() and MouseY() position, then use the Command ImagesCollide.

Version 1
while not keydown(1)
drawblock image,x,y
mx=mousex()
my=mousey()

if mousehit(1)
 if (mx>= x) and (mx <=x+imagewidth(image))
  if (my>= y) and (my <=y+imagewidth(image))
   execfile "notepad.exe"
  endif
 endif
endif
wend

version 2

while not keydown(1)

drawimage image,x,y

mx=mousex()
my=mousey()

drawimage mouse2,mx,my

if mousehit(1) and imagescollide(image,x,y,0,mouse2,mx,my,0)
 execfile "notepad.exe"
endif
wend



RRK1020(Posted 2005) [#4]
Sorry about the topic :(

I'm trying to make a button. I am also trying to make a window system... got any ideas?


DH(Posted 2005) [#5]
got any ideas?


purchase XLnt (But not FUI, otherwise you might as well code it yourself).


RRK1020(Posted 2005) [#6]
Do you know how I can make the titlebar dissapear or use my own titlebar image?


jfk EO-11110(Posted 2005) [#7]
blitzsys.dll maybe can do it.


RRK1020(Posted 2005) [#8]
alright, I'm a complete beginner, how do I use it?


Rob Farley(Posted 2005) [#9]
If you're a complete beginner you need to go through the demos and tutorials that came with blitz.

Make a pong game.

Then start worrying about this sort of stuff.


RRK1020(Posted 2005) [#10]
made a pong game, easy enough...

complete beginner with ".dll"s


Rook Zimbabwe(Posted 2005) [#11]
Pong is a great first timer project... that or breakout which can be a little more challenging to POng first then breakout (because you will use the ball functions you did in pong for breakout...)

If you plan on some sort of GUI you need to check out the toolbox. BlitzUI is (IMHO) really fast and easy but requires a sharp learning curve that does need some familiarity with B3D to use.

-RZ


RRK1020(Posted 2005) [#12]
Check'in it out


jfk EO-11110(Posted 2005) [#13]
BlitzSys.dll can be downloaded somewhere, it includes a lot of examples, one of them shows how to use individual Window masks - a window can have any shape (and thus allows to mask the title bar etc.)

http://www.melog.ch/dl/blitzsys_v105.zip