MessageBox Size

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
rtr_18
Posts: 60
Joined: Thu Jun 10, 2010 8:35 am
Location: Programmer

MessageBox Size

Post by rtr_18 »

Hi!
I've added a MessageBox with YES and NO Buttons using addMessageBox() method. I want the message box to be of smaller size than the default size. Why I want this is : I want to set an image as background to the Message Box. I've passed the image name as a last argument to the addMessageBox() function. But the message Box is only partly filled by the image.

(i) How to make the image occupy the whole message Box?

(ii) Also I want to set images for YES and NO buttons? How to do this?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Post by CuteAlien »

The MessageBox is specifically written to get this typical MessageBox layout with image to the left and text to the right. I think the easiest solution for you is to write an own element. All you need are a window as parent, an image as child and 2 buttons. Maybe also take a look at the way CGUIMessageBox is implemented (in CGUIMessageBox.cpp/.h).
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