Layout Editor and resizing

Use this forum for:
- Discussion regarding unofficial CEGUI related tools, scripts and utilities.
- User to user help for the obsoleted CELayoutEditor and CEImagesetEditor tools.

Moderators: CEGUI MVP, CEGUI Team

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Layout Editor and resizing

Postby Ludi » Tue Aug 15, 2006 22:22

Hi,

I was playing around with the LayoutEditor and it was a positive experience. It was strange at the beginning to work with the relativ position system, but when you create some windows, you get the feeling for it.

But there was one problem when resizing a FrameWindow, because all the widgets in it get resized too. So, I was creating a bag with 16 item slots, everything looked good, but the window was a little bit so big, resized it and arrgh! So, is there any possibility to add a property, that a widget should stick at the same size (for the x and the y coordiantes). I mean it should be possible to calculate internally the new relativ size of a widget, when the parent widget gets resized.

But I'm sure something similar is already on the todo list Smile

Greetings

PS: I found a bug: Add a static text to a new layout, clone it (copy/paste), save the file and reload it. The layout editor adds some "crap" to the xml file, which he can't read when opening it again.

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Tue Aug 15, 2006 23:31

I've already seen, that you are working on that, so forget my post :)

But here's a small other request: the config file of the layout editor takes only absolute path to the gui dirs. Would it be possible to use relativ path?

And I have the problem, that the grid is above all widgets and the widgets don't snap to the grid.

Greetings

Edit: And every time I start the editor, I get the error message "A GUI Scheme named 'TaharezLook' is already present in the system".

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Aug 16, 2006 07:36

Hi Ludi,

thanks for checking out the editor :-) The relative position system might feel rather different from using absolute positions. But if you need absolute positions, you can find the how-to in the manual: http://www.cegui.org.uk/wiki/index.php/ ... trics_mode

Indeed, the automatically resizing is on the todo lists. I will try to reproduce the static image issue. You may also add it to mantis: http://www.cegui.org.uk/mantis/

I think the editor allows relative paths aswell. However when you launch the editor for the first time, it will ask for a datafiles directory. And those are saved as full paths. But you may edit the INI file to have a try.

Yeah the grid is a bit annoying. Because of rearrangments, the background is a Static Image ATM. So it's not possible (at least not that i know of) to draw the grid lines between CEGUI windows (Z values). I hope you understand what i just said ;-)

The manual (see above) also explains how to snap to grid :-) But expect changes to that too, such as auto-snap, which you probably expected to happen.

The error message means that there are duplicates for the TaharezLook in your datafiles/schemes folder. You probabaly have a TaharezLook and a TaharezLookSkin or something. It doesn't harm though, but you could try to remove one of them.

Good luck :-)

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 09:33

The relative position system might feel rather different from using absolute positions. But if you need absolute positions, you can find the how-to in the manual: http://www.cegui.org.uk/wiki/index.php/ ... trics_mode

I like the relativ position system, it's awesome. I always wanted a resolution independet GUI system. It's really great work :) One quick question: How is this handled, when I create a GUI for a 4:3 screen, but another person has a 16:10 ratio?

I will try to reproduce the static image issue. You may also add it to mantis: http://www.cegui.org.uk/mantis/

Done.

I think the editor allows relative paths aswell. However when you launch the editor for the first time, it will ask for a datafiles directory. And those are saved as full paths. But you may edit the INI file to have a try.

I've tried to edit the INI file, but that didn't work. I get only error messages.
Yeah the grid is a bit annoying. Because of rearrangments, the background is a Static Image ATM. So it's not possible (at least not that i know of) to draw the grid lines between CEGUI windows (Z values). I hope you understand what i just said ;-)

absolutely ;)

Good luck :-)

Thanks :)

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 13:13

scriptkid wrote:Yeah the grid is a bit annoying. Because of rearrangments, the background is a Static Image ATM. So it's not possible (at least not that i know of) to draw the grid lines between CEGUI windows (Z values). I hope you understand what i just said ;-)


How are you drawing the grid? Are you using CEGUI for it? Why don't you easily draw some lines via OGL with an Z-Value of 1.0 or draw them, before you draw the gui? I tried to edit/compile the editor on my own, but I needed to download wxWidgets and ... so I deleted the source files again :P

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 14:19

Okay, I took the challenge and downloaded wxWidgets :P The source wasn't for the 0.5.0 RC2, there were still setWindowX functions, so I replaced them.

To the grid: In order to show it correct, you only have to change the order of the render calls. First draw the grid, than the layout. It worked so far for me. This all happens in EditorCanvas::Render(). As I don't know, how to create a patch file, I post this here.

here's a screenshot:
Image

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 19:26

One more thing:

You must add

Code: Select all

      DrawGrid();


in the EditorCanvas::RenderLayout too, otherwise it won't show up, when the window gets resized.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Aug 16, 2006 20:14

Hi Ludi,

thanks for your efforts, but now you won't be able to use both a grid and a background, right? Because background (StaticImage) is part of the layout.

Btw. what do you mean with not RC2 compatible? What code did you download? Maybe an old zipfile or SVN?

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 20:24

thanks for your efforts, but now you won't be able to use both a grid and a background, right? Because background (StaticImage) is part of the layout.


Oh, sorry, I didn't see that it's possible to use a background image :oops:

Btw. what do you mean with not RC2 compatible? What code did you download? Maybe an old zipfile or SVN?


I downloaded the layout edtior source from here http://www.cegui.org.uk/wiki/index.php/Downloads_0.5.0-RC2

And I had to change all the set/getWindowPosition/Size.. with set/getPosition/Size.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Wed Aug 16, 2006 20:45

Don't worry about it :-)

Sorry those links where still old. I've updated the links. Everything can now be found on sourceforge.

I will remove the other files to avoid such confusions in the future ;-)

User avatar
Ludi
Quite a regular
Quite a regular
Posts: 59
Joined: Sun Aug 13, 2006 12:33

Postby Ludi » Wed Aug 16, 2006 21:33

Is this better ;)

Image

I can email you the modification, if you want.

User avatar
scriptkid
Home away from home
Home away from home
Posts: 1178
Joined: Wed Jan 12, 2005 12:06
Location: The Hague, The Netherlands
Contact:

Postby scriptkid » Thu Aug 17, 2006 07:15

Hi,

cool! Yeah this looks more like it :-)

Sure, can you send me a patch to 'pkooman at gmail.com'?

Thanks!


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: No registered users and 2 guests