Simple ButtonImage Question Layout Editor


27-06-2013 23:53:15

hey guys, I'm stuck on an issue im positive is trivial. I'm using the layout editor and want to create a button that has an image. I believe the buttonimage widget is what i need. Under the properties tab for the buttonimage widget is a field entitled "image resource"

where do i need to but my custom image (for example custom.png) so that i can link this field to the appropriate place. is it in \MyGUI_3.2.0\Media or \MyGUI_3.2.0\Media\My_GUI Media or where? I'll owe you guys a lot.


01-07-2013 20:41:18

In the Layout Editor itself, I do not know how to assign an image to a Button Image. For something like an Image Box, I simply have my custom.png in MyGUI/Media/Common/Demos and type in "custom.png" onto the ImageTexture field of the Image Box within the Layout Editor.

If you want to have a button image, just use the Layout editor to lay out the position on the screen were you will want the Button Image. Then use the code generator to generate the .xml. After that, follow this tutorial to create the ButtonImage.resource file you need to specify which image you will have on your button. ... uttonImage

After all that, make sure you have your images in a folder that is specified in your resources.cfg file.