a event on a image (gui->image)

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
chalien
Posts: 1
Joined: Tue May 20, 2008 8:13 pm

a event on a image (gui->image)

Post by chalien »

hi, i created a panel, but i created with a image (the options are gui->image)
and i want to put them event but i don't know how some can help me?


this is my panel the options are images and need that they works please help me:
[/url]http://www.facebook.com/photo.php?pid=5 ... =557964946
radiant
Posts: 112
Joined: Fri Feb 22, 2008 8:04 pm
Location: Mexico

Post by radiant »

first of all... this forum is an english forum, i understand what it says cause im mexican... but i doubth anyone else here does... second... the image doesnt tellme anything...

so... four options:
start no idea what does it do what does it starts?

Gallery gallery of what? im guessing it has pictures(duhh) but what about it?

Config Im guessing it does what every other config panel does in a 3d app

Exit im guessing it exits the app(yet another easy guess =P)

so... the picture doesnt tellme anything if u want help... describe what u need in words (in english so everyone here understand), we are not mind readers, and dont come here empty handed... read the docs, read the examples, etc

best regards
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

maybe use buttons with images... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
radiant
Posts: 112
Joined: Fri Feb 22, 2008 8:04 pm
Location: Mexico

Post by radiant »

one thing i can think of is putting buttons on top or under the image but set the alpha value to 0 thus...invisible buttons, i dont know if they will still trigger the events but im guessing they will... i hope someone wjth more experience corrects me if im wrong.

Best regards
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Why not just use gui->addButton(...) and button->setImage(...) instead of gui->addImage(...) as suggested above by Acki?

Travis
radiant
Posts: 112
Joined: Fri Feb 22, 2008 8:04 pm
Location: Mexico

Post by radiant »

because of this:

Image

he seems to want a very webpage-like interface.. so he uses a single image as gui... and wants to know when the user clicks on some parts of the image... (to the left and down are the buttons, those messages in spanish)

so i sugest that he uses that image and unter the image he puts buttons with alpha=0 so u cant see the actual buttons, just get the events.

Best regards
FuzzYspo0N
Posts: 914
Joined: Fri Aug 03, 2007 12:43 pm
Location: South Africa
Contact:

Post by FuzzYspo0N »

lol or he can do it the oldschool way,

Code: Select all

if ((mouseX > button1.X) && (mouse.X < (button1.X + button1.width)) && ((mouseY > button1.Y) && (mouse.Y < (button1.Y + buttonY.height)) 
{
   //do something;
}
lol. or he can search the forums, there are tons of useful things around using images as GUI in fact, i just released one recently with animated GUI elements, that works as a IMAGE based GUI.. would make things easier to look first, then ask..

http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=26343

it helps
Post Reply