GUI question -> Clickable Images
GUI question -> Clickable Images
I wonder if there are a way to get the EventHandler to "react" when I click in IGUIImage images... alt. to set a button without borders... and add an image so that the visual result would be the same...
-
- Posts: 81
- Joined: Sun Sep 09, 2007 7:01 pm
- Location: BW, Germany
AFAIK there is no way for this...
You could code it on your own (check if the mouse is inside the image rect and if the button was clicked)...
Or you can set the button transparent (look at tutorial 05.UserInterface how to do this), this maybe works too...
But this acts on all buttons...
In my IrrExtensions I made a function for the button especially for this purpose to set a single button completely transparent, only the image is shown then and it still reacts like a button...
You could code it on your own (check if the mouse is inside the image rect and if the button was clicked)...
Or you can set the button transparent (look at tutorial 05.UserInterface how to do this), this maybe works too...
But this acts on all buttons...
In my IrrExtensions I made a function for the button especially for this purpose to set a single button completely transparent, only the image is shown then and it still reacts like a button...
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
It's works fine.
Just add button with image. Borders wouldn't be draw, becouse Irrlicht draw it before image. You can also turn borders off.
Just add button with image. Borders wouldn't be draw, becouse Irrlicht draw it before image. You can also turn borders off.
Code: Select all
gui::IGUIButton *MyButton = Gl.Irr.gui->addButton(Position, parent, ID, L"", L"");
MyButton->setImage( TextureForButton, FirstRect);
MyButton->setPressedImage(TextureForButton, SecondRect);
MyButton->setDrawBorder(false);
hahaha, and another new feature in 1.3 probably inspired by my Extensions !!!
Maybe I should now get a credit in the sdk for my inspirations !?!?!
Maybe I should now get a credit in the sdk for my inspirations !?!?!
while(!asleep) sheep++;
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
IrrExtensions:
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java