How???
Blitz3D Forums/Blitz3D Beginners Area/How???
| ||
How do I make an image sense it is being clicked and run a function??? |
| ||
Blitz3D!!! |
| ||
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 |
| ||
Sorry about the topic :( I'm trying to make a button. I am also trying to make a window system... got any ideas? |
| ||
got any ideas? purchase XLnt (But not FUI, otherwise you might as well code it yourself). |
| ||
Do you know how I can make the titlebar dissapear or use my own titlebar image? |
| ||
blitzsys.dll maybe can do it. |
| ||
alright, I'm a complete beginner, how do I use it? |
| ||
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. |
| ||
made a pong game, easy enough... complete beginner with ".dll"s |
| ||
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 |
| ||
Check'in it out |
| ||
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 |