GUI Button mouse over

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
danieLs0xFF
Posts: 14
Joined: Wed Aug 16, 2006 6:58 pm

GUI Button mouse over

Post by danieLs0xFF »

I see thet GUIButton has setImage and setPressedImage but doesn;t have something like mouseOverImage,
how can i have a button that will have mouse over effect or at least a different image on mouser over will be good

i alos see that there is setSpriteBank and setSprite(EGUI_BUTTON_STATE, and there is a state for mouse over but CGUIButton::draw() doesn't handle it

what is this SpriteBank? can i use it to have a mouse over button, if not how else can i do it?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

yes, it should be possible to do with a sprite bank... ;)
look at the api for IGUIButton and there for setSpriteBank(...) and setSprite(...), also have a search at the api for EGUI_BUTTON_STATE...
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
danieLs0xFF
Posts: 14
Joined: Wed Aug 16, 2006 6:58 pm

Post by danieLs0xFF »

ok, but how do you use SpriteBank? :(
how do i make a sprite bank?
this is one of the things that there are no examples for it of how to use it
anybody used this ?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

please search the forum before asking... :roll:

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=25742
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
danieLs0xFF
Posts: 14
Joined: Wed Aug 16, 2006 6:58 pm

Post by danieLs0xFF »

thank you
danieLs0xFF
Posts: 14
Joined: Wed Aug 16, 2006 6:58 pm

Post by danieLs0xFF »

it doesn't handle mouse over :(,

it seems i'm stuck with my application,
any ideeas how can i make a button with mouse over?

right now the only way i am thinking that i can achieve this is using draw2dimage and check for mouse x and y and if over draw other image
CuteAlien
Admin
Posts: 9933
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

Yeah, I think it's not yet supported. So you have to make your own element or change it in the engine. Or simply don't use it - that's imho mostly the best option if a feature is not available ;-)
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Post Reply