HideImage???
Blitz3D Forums/Blitz3D Programming/HideImage???
| ||
Hello friends, I am working on the menu of my project and I encounter a problem, I need to clik on the button to half, the others disappear, are not visible as the menu gives way to the game options. So if there is not a command like hideentity, or something, any suggestions in this regard. greetings. |
| ||
Images are only drawn when you tell them to draw? Can't you just 'not draw' the image if you don't want it visible? I assume you refer to 2d commands? ie drawimage/drawblock |
| ||
Hello I am grateful for your response, my English is bad and I help with a translator. What I need is that, on having given clik in an image, other one hides for then visible again, something like showentity or hideentity, but in the images. A greeting. |
| ||
No there is nothing.... you need to not draw them if you don't want them visible, as Matty said. |
| ||
: ( Please example code?? |
| ||
I think you just need some flag to know when to draw the image. Something likeif myFlag = True DrawImage myImage,x,y endif Also, if you have the funds I would recommend SpriteCandy. |
| ||
Now then, what I need is that, on having given clik in an image other one, it hides... |
| ||
> Now then, what I need is that, on having given clik in an image other one, it hides... I hate to say this, but if you need help with that I suggest a good basic programming book to start. |
| ||
:( |
| ||
Assuming you have it worked out to know what buttons have been clicked it should be easy. If not, check out the "hole in one" 2D sample. It has some buttons in it with simple checking of buttons. There are probably other good examples in the samples folder. Also check out this in the code arcs: http://www.blitzbasic.com/codearcs/codearcs_bb/608.bb |
| ||
You'll have to change the code at the place that you do your drawimages:if imagevisible:int=True then drawimage(image1,10,10) else ' don't do anything end if Then when you enable/disable the image, you can change the imagevisible variable to either 'true' or 'false' to change whether or not to draw it. |
| ||
Graphics 800,600,32,False Image = LoadImage("Botones.jpg") While Not KeyDown (1) If KeyHit(200) DrawImage(Image,0,0) Else ; Hide image?? End If Wend |
| ||
hello, I've achieved what I'm doing is a 3d menu for my apliación and the only way is as follows.Graphics3D 800,600,32,False Image = LoadImage("Botones.jpg") MaskImage image,255,255,255 Camara = CreateCamera() Cube = CreateCube() PositionEntity Cube,0,0,5 While Not KeyDown (1) RenderWorld If KeyDown(200) DrawImage(Image,0,0) Else End If Flip Wend I greatly appreciate your help friends. |
| ||
; Code FastImage cool :D. DrawImageEx (Salir,GraphicsWidth()-150,GraphicsHeight()-50,Estado) If TestImage(MouseX(),MouseY(),GraphicsWidth()-150,GraphicsHeight()-50,Salir) Then Estado = 1 Else Estado = 0 End If EndDraw |