Page 1 of 1

setting metrics mode in layout editor 0.4

Posted: Tue Apr 04, 2006 01:31
by turkeypotpie
Is there a way to set a window's metrics mode in the layout editor, v0.4 ?

I was able to do this in a previous version of the editor, when creating the window, but I don't see the option anymore.

So it looks like I'm stuck with relative mode?

Posted: Tue Apr 04, 2006 03:15
by lindquist
I think the editor is working in unified dimensions now.
This means that metric modes are'nt needed as you have both modes available at the same time.

Posted: Tue Apr 04, 2006 07:37
by scriptkid
Hi,

indeed, things have gone Udim :-)

If you want a window of a fixed size at any resolution (absolute), you can set all the "scales" to 0, and the offsets to an absolute position. For example to create a window from 50,50 to 250,250 at any resolution, the grid should look like this:

Left Scale: 0
Left Offset: 50
Top Scale: 0
Top Offset: 50
Right Scale: 0
Right Offset: 250
Bottom Scale: 0
Bottom Offset: 250

But note that the resizing of the windows with the drag points only affects the relative part. The absolute part (offsets) must be setup from the grid.

HTH! Good luck! :-)

Posted: Tue Apr 04, 2006 19:47
by turkeypotpie
ok, this works. It's a little tedious to lay things out without the mouse, but it works.

So, as I understand it, with universal dimensions, the metrics mode per se is no longer relevant?

Thanks for the help :)

Posted: Tue Apr 04, 2006 21:14
by lindquist
turkeypotpie wrote:So, as I understand it, with universal dimensions, the metrics mode per se is no longer relevant?


correct :) In 0.5 it has been removed.

Posted: Fri Apr 21, 2006 15:57
by Evenstar
lindquist wrote:
turkeypotpie wrote:So, as I understand it, with universal dimensions, the metrics mode per se is no longer relevant?

correct :) In 0.5 it has been removed.


Does this mean 0.5 will not be backward compatible with 0.4? I've been using the AbsoluteRect and RelativeRect properties almost exclusively in my layout.

Posted: Mon Apr 24, 2006 07:41
by scriptkid
Yeah, sorry to tell you but 0.5 will break with some important 0.4 way of doing things. However Udim is already available in 0.4.1, so you can try to load your layouts in the layout editor and save them (in a different name), to see whether they are saved with Udim values. I think it will do that.

Good luck! :-)

Posted: Mon Apr 24, 2006 16:44
by Evenstar
scriptkid wrote:Yeah, sorry to tell you but 0.5 will break with some important 0.4 way of doing things. However Udim is already available in 0.4.1, so you can try to load your layouts in the layout editor and save them (in a different name), to see whether they are saved with Udim values. I think it will do that.

Good luck! :-)


This is not good news! :( Why has this approach been taken? Luckily, I am just getting started with CEGUI, so I don't have a huge problem with this. However, for those that have actually written complex GUIs, it is going to be REALLY annoying to have to go in and modify ALL of their dimensions to UDims instead of relative or absolutes. Just be prepared to receive some criticism.

Perhaps a poll is in order here?

Posted: Mon Apr 24, 2006 21:47
by granx
Polls are probably a good idea, but the users must expect some changes when using a rapidly developing project. In fact, if backward compatibility is the biggest concern, using a project that hasn't even released it's 0.5 version is probably wrong for you.

The developers at CEGUI work very hard not to impose changes like this, so rest assured that this was taken into consideration already.

An easy way to upgrade the many layout files using the old format would be to quickly type up a XSL Transform to apply the layout changes and generate a new improved layout file.

As far as criticism, I think I speak for a big part of the community when I say that we are lucky to have a project as professional and powerful as CEGUI to take on the enormous task of implementing a generic GUI system.

Thanks guys :)

Posted: Mon Apr 24, 2006 23:06
by Evenstar
granx wrote:Polls are probably a good idea, but the users must expect some changes when using a rapidly developing project. In fact, if backward compatibility is the biggest concern, using a project that hasn't even released it's 0.5 version is probably wrong for you.

The developers at CEGUI work very hard not to impose changes like this, so rest assured that this was taken into consideration already.


Yes, I see your point, and I understand that some changes are going to be made. But it would be beneficial, I think, if the changes that are coming were made a little more obvious so that the community could evaluate the situation and how it will ultimately effect them. I very seldom read the CEGUI Library Development Discussion forum. Perhaps I should pay more attention to it.

After doing a search on the main page, I see that there are a lot of changes being made to improve the overall system. I am glad that I found out about this so that it wasn't a complete surprise. Plus, I can start tailoring my layout files to use unified dimensions ahead of time.

granx wrote:An easy way to upgrade the many layout files using the old format would be to quickly type up a XSL Transform to apply the layout changes and generate a new improved layout file.


Sounds great! Ummm.... but I haven't a clue as to how to do that. :?

granx wrote:As far as criticism, I think I speak for a big part of the community when I say that we are lucky to have a project as professional and powerful as CEGUI to take on the enormous task of implementing a generic GUI system.

Thanks guys :)


I'm not going to argue with that. Earlier today I was commenting about how I really appreciate the tool as a whole to one of my coworkers. For instance, being able to add child windows and have them maintain their relative positions and sizes to their parent window when the parent window is resized -- all without having to code a thing -- is so wonderfully appreciated that words cannot describe it.

The fact of the matter is that unless people are actively looking for information regarding 0.5.0's release, they probably aren't going to notice it until it has been released. Perhaps making the 0.5.0 changes more obvious to the masses will help better prepare them for what is coming. Maybe making note on the main CEGUI site of the Porting to the 0.5.0 Release document that is in progress would be a good idea? Or perhaps making a sticky out of the 0.5.0 topic in the CEGUI Library Development Discussion.

I'm not trying to start an argument here. Really. The developers who make this system do what it does have done a great job. The sheer fact that they do it FOR FREE is mind boggling, but greatly appreciated.

Thank you for your dedication, Crazy Eddie and colleagues. I, too, appreciate what you have done.

Brian