Hello,
I would like to load a frame window from a layout file for displaying a file selection dialog.
Should I start the layout file with a root GUISheet creation aswell?
Offtopic: Why does UnifiedAreaRect need 8 arguments?
(<Property Name="UnifiedAreaRect" Value="{{0.2,0.0},{0.2,0.0},{0.6,0.0},{0.4,0.0}}" />)
All suggestions are welcome,
Thank You..
[SOLVED] a dialog layout
Moderators: CEGUI MVP, CEGUI Team
[SOLVED] a dialog layout
Last edited by IndrekSnt on Tue Jun 19, 2007 10:31, edited 1 time in total.
Offtopic: Why does UnifiedAreaRect need 8 arguments?
(<Property Name="UnifiedAreaRect" Value="{{0.2,0.0},{0.2,0.0},{0.6,0.0},{0.4,0.0}}" />)
I can answer the offtopic bit. The eight values are {scale, offset} for each corner of the rectangle.
Scale is a modifier based on the parents? width, and offset is a pixel offset from wherever scale leaves you.
Thank You,
Actually I used a better solution for the dialog - I put everything in one layout file with the dialogs not visible at first. Then I just show ()-ed and hide ()-d them..
I think I just got it.
Without the root window in the layout I would have to create one in the program and add all the child windows manually.
With only one dialog in the layout file, this probably isn't a problem - loadWindowLayout returns the one and only window..
So I don't need any root window in the dialog layout file..
Thank You
Actually I used a better solution for the dialog - I put everything in one layout file with the dialogs not visible at first. Then I just show ()-ed and hide ()-d them..
I think I just got it.
Without the root window in the layout I would have to create one in the program and add all the child windows manually.
With only one dialog in the layout file, this probably isn't a problem - loadWindowLayout returns the one and only window..
So I don't need any root window in the dialog layout file..
Thank You
For a sample file dialog look at CEGUICommonFileDialog from the Ogre Wiki.
For dialog stuff have a look at DialogSystem for an implementation of dialogs with an Ok, Cancel, and an Apply button as well as DialogConfigurations to save a dialog/window's position and dimentions as well as restoring them the next time they are called. In my opinion DialogConfigurations is required with any GUI; there's nothing that I hate more than a game that forces me to reorganise the layout every single time I start it.
And yes, editing the .layout to remove the automatically created root window is the correct way to go to have one dialog per .layout file; that's what I've been doing for some time now.
For dialog stuff have a look at DialogSystem for an implementation of dialogs with an Ok, Cancel, and an Apply button as well as DialogConfigurations to save a dialog/window's position and dimentions as well as restoring them the next time they are called. In my opinion DialogConfigurations is required with any GUI; there's nothing that I hate more than a game that forces me to reorganise the layout every single time I start it.
And yes, editing the .layout to remove the automatically created root window is the correct way to go to have one dialog per .layout file; that's what I've been doing for some time now.
Who is online
Users browsing this forum: No registered users and 14 guests