I selected a static image widget and put the file path in the image attribute but it doesn't do anything and reverts back to being blank if I select another window.
Basically what I am trying to do is create a HUD and I figured I'd start by adding some static images to the screen.
Does anyone know of any tutorials for creating a HUD withe CEGUILayout editor?
Thanks.
How do you add static images to a window?
Moderators: CEGUI MVP, CEGUI Team
-
- Just popping in
- Posts: 3
- Joined: Tue Apr 03, 2012 18:54
Re: How do you add static images to a window?
Here is a very good article with very simple sample files to learn how to create Widgets by code or by xml:
Here is the section about doing it in code: http://www.cegui.org.uk/wiki/index.php/Sample_code_for_all_Widgets#Files
And here is the section about doing it in xml: http://www.cegui.org.uk/wiki/index.php/Sample_code_for_all_Widgets#WidgetGalore.layout
There is an example for each kind of widget.
For your specific problem:
If you can't see your static image, the most probable reasons are:
hope it helps
Here is the section about doing it in code: http://www.cegui.org.uk/wiki/index.php/Sample_code_for_all_Widgets#Files
And here is the section about doing it in xml: http://www.cegui.org.uk/wiki/index.php/Sample_code_for_all_Widgets#WidgetGalore.layout
There is an example for each kind of widget.
For your specific problem:
If you can't see your static image, the most probable reasons are:
- You didn't defined a size for this widget, so it's size is (0,0).
- The URL of the image is wrong, so that it displays nothing. (I think that in this case an error is thrown)
hope it helps
Who is online
Users browsing this forum: No registered users and 11 guests