Cross-platform version

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
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Re: Cross-platform version

Postby CrazyEddie » Tue Aug 30, 2005 08:36

Awesome stuff :hammer:

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Cross-platform version

Postby gcarlton » Wed Aug 31, 2005 06:46

Looking good!

I'd be keen to check out the new version when it arrives. One thing that would be great to jump on is the current splitting of properties into types, rather than having a proper list of them.

A table would be a way to go I reckon, a bit like the .NET property window, with the right hand column whatever type is required (edit box, drop list, etc).

I'm not sure if its easy to do or not in wxWidgets, but its high enough on my "niggle" list that I'd be willing to put some time into making it right. :)

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:

Re: Cross-platform version

Postby scriptkid » Wed Aug 31, 2005 07:21

Hey both thanks for the nice replies :-)

@gcarlton

I think i understand what you mean, but what do you mean by "splitting into types"? Making collapsable groups?

A property page should be possible to do it with wxWidgets. You can't create actual tables i guess, but it supports some sort of grid-like containers and such. Otherwise its possible to pre-create all widgets and add/remove them to a so-called "sizer".

Using such a property page would obsolete the now seperate positional and dimensional entry fields, which will gain some space on the dialog to use for the new ideas :-)

There's also some pending ideas about being able to add custom properties, which don't need necessarily have to be supported by CEGUI itself, but rather by the users' applications.

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Cross-platform version

Postby gcarlton » Wed Aug 31, 2005 10:15

Currently, users select a property from a combobox which has categories grouped by type, such as "Numerical Properties". They can then enter the new value below. Compare this with:

Image

In the above picture, all properties are listed, grouped by logical section such as "Appearance". The property types dictate the cell type on the right. Booleans have a combo dropdown of true/false, enums have their own dropdown, numerics have an editbox, and others have a ".." that opens a popup menu.

I think something of this style has definite advantages over the current way. Whether its feasible to do in wxWidgets is another question! :)

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:

Re: Cross-platform version

Postby scriptkid » Wed Aug 31, 2005 16:32

This is funny, i have exactly looked at such page to understand your message :-)

It sounds like a good idea to me, thanks for mentioning it!

Well i'll just have a look to see if it's feasable in wxWidgets, but won't modify anything before the first official release ;-)

User avatar
granx
Quite a regular
Quite a regular
Posts: 80
Joined: Fri Apr 29, 2005 21:58

Re: Cross-platform version

Postby granx » Thu Sep 01, 2005 17:50

scriptkid,
where is the code for this? i'm dying to start using it. also, i noticed there is no project file for the Samples/CELayoutEditor. Should I make a VC 7.1 project file for it or is this the old code and I should wait to make a project file for the new editor which uses wxWidgets?
Thanks, -granx

[edit]
Woops! I just found the VC 6.0 project files within the Samples/CELayoutEditor distro. Sorry.

I could really use this editor, today ! ;) Could you mail me and tell me how to get the code? Thanks! granx _at_ cyrf _dot_ com
[/edit]

[edit2]
Wow, I was looking at an old CVS snapshot of CEGUI. It appears the editor is completely missing from the current CVS. What's up with that? And where-o-where can I find this wxWidgets based editor? Many many thanks.
[\edit2]

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:

Re: Cross-platform version

Postby scriptkid » Thu Sep 01, 2005 19:20

Hi,

thanks for being so anxious about the new editor!

At this moment, the code cannot be downloaded or checked out yet, but you can still use the precompiled installer from the dowload section, but you are maybe looking for the new falagard support? (I bet you are ;-) )

How is your wxWidget knowledge? Let met know and i'll send you the latest sources with an explaination on how to start, ok?

I'm putting some last work on it this evening.

When compilation proves fine on Linux as well, i will "tag" the current cvs version, and then commit the new files.

I checked the repository; the layout editor is still in, but i had to try a few times...

Kind regards,
scriptkid.

User avatar
granx
Quite a regular
Quite a regular
Posts: 80
Joined: Fri Apr 29, 2005 21:58

Re: Cross-platform version

Postby granx » Thu Sep 01, 2005 21:26

scriptkid,
yeah, i'm definitely interested, that is an understatement. i have no knowledge of the wxWidgets API, but i can learn, fast if necessary. also, i have access to some linux machines, so i can help there too.

i'll try to hang out in #cegui on irc.freenode.net if you want some real time chatting.

i would really like to see this editor have an edit window like what was just proposed by another community member. the drop down style is not fun to use. if it looks like i can help, i'll be happy to do so.
-granx

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:

Re: Cross-platform version

Postby scriptkid » Sun Sep 04, 2005 13:07

Hi granx,

the new files are in cvs (and in your mailbox). For details, please read the wiki:

http://www.cegui.org.uk/wiki/index.php/ ... out_editor

Have fun!

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Cross-platform version

Postby gcarlton » Tue Sep 06, 2005 04:51

Ok, good work!

When it starts up without an ini file, I get a crash in options.cpp line 55:

Code: Select all

wxLogWarning (_T("The file '%s' could not be found; default settings will apply now."), INI_FILE);


Seems to crash if wxLogWarning is called before the general wx startup, so I commented that line out. Is this just me, or is it a wx problem?

One thing I'd like to see eventually is a more expressive left/top/width/height. I'm not exactly sure what would be my ideal layout, but it would need to be able to combine abs+rel coordinates.

For instance, I may want a button to go across the left half of the screen, but with 10 pixels padding. Thus, the left would be +10, the (implicit) right would be 50%-10, and the width would be 50%-20.

It could be represented as 8 boxes (abs left, rel left, abs top, ...). Or alternatively, the editbox could support some basic parsing. It could be hooked up to cegui's own parsing, so something like "rel:0.5 abs:-20"?

Also, I wonder whether it would be worthwhile to allow a mode where it has left/top/right/bottom rather than left/top/width/height. We'd be able to convert between the two, obviously.

Anybody got any thoughts on this? I can launch in and whip up something myself, but I'd rather try to settle on a desired "standard".

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:

Re: Cross-platform version

Postby scriptkid » Tue Sep 06, 2005 07:18

gcarlton wrote:
Ok, good work!


Thanks! :-)

Seems to crash if wxLogWarning is called before the general wx startup, so I commented that line out. Is this just me, or is it a wx problem?


mmm i'll have to give that a try myself. The warning happens during the applications OnInit method, which means that wxwidgets has started up enough to show dialogs or such.

You're right about the whole UDim part. The port is actually still targetted at the previous way of editing layouts. There must definitely be made some changes to support the new powerfull properties.

Don't be shy to give it a try yourself! (if other people don't post too many objections here) :-)

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:

Re: Cross-platform version

Postby scriptkid » Tue Sep 06, 2005 19:30

Oops! The crash was a serious bug indeed. The singleton instance was a real static instance, so it got called before OnInit. Changed the instance into a pointer, which fixes the issue. I committed the changes into CVS.

User avatar
gcarlton
Just can't stay away
Just can't stay away
Posts: 149
Joined: Wed Jan 12, 2005 12:06

Re: Cross-platform version

Postby gcarlton » Wed Sep 07, 2005 10:38

Ok, a couple of small niggles I wanted to fix before doing any real work. I've added a very small patch which should be easy to apply, fingers crossed.

1.) There is a nested "i" variable, which I renamed, because it confuses the compiler.

2.) Currently wxstring is converted via casts of (utf8*)(LPCSTR)mystr. This is potentially unsafe, so its better to just call mystr.c_str() to get the char*, which CEGUI can then convert itself to a utf8*, hence no cast is needed.

BTW, if you want to check out what is in these patches before applying it, check out a small tool I wrote for that purpose

http://www.hotboxgames.com/index.php?op ... &Itemid=27

It allows you to open up a patch file and lays out the contents in a treeview so you can see what each change is.

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:

Re: Cross-platform version

Postby scriptkid » Wed Sep 07, 2005 18:56

Hi!

thanks for the reply. However Eddie already sent me a pretty large patch to fix the linux build, which includes just the issues you mentione... sorry... ;-)

I'll have a look at your utility though! :-)

User avatar
Exsortis
CEGUI Team (Retired)
Posts: 42
Joined: Mon Feb 07, 2005 17:13
Location: Palmdale, CA
Contact:

Re: Cross-platform version

Postby Exsortis » Wed Sep 07, 2005 22:33

I started creating the Xcode project last night to get the editor to build on the Mac. After wrestling with building wx for the Mac :hammer:, I finally came up with the following:

* EditorFrame.h
The <direct.h> include needs to be wrapped in #ifdef/#ifndef for at least the Mac build (don't know about Linux), so I have this currently:

Code: Select all

#ifndef __APPLE__
#    include <direct.h> // for _chdir
#endif


* I'm assuming the LPCSTR casts will be fixed after CE's patch is applied.

* I get a few "no matching function" errors during build:

Code: Select all

/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/src/DialogAddWindow.cpp:173: error: no matching function for call to 'DialogAddWindow::isWindowTypeSelectable(int&, CEGUI::String)'
/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/inc/DialogAddWindow.h:78: note: candidates are: bool DialogAddWindow::isWindowTypeSelectable(int, CEGUI::String&)


Code: Select all

/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/src/DialogMain.cpp:497: error: no matching function for call to 'DialogMain::findWindow(wxTreeItemId)'
/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/inc/DialogMain.h:154: note: candidates are: void DialogMain::findWindow(wxTreeItemId&)


Code: Select all

/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/src/DialogMain.cpp:762: error: no matching function for call to 'DialogMain::initLayoutTree(CEGUI::Window*&, wxTreeItemId)'
/Users/pauly/Projects/Frameworks/cegui/CELayoutEditor/src/DialogMain.cpp:466: note: candidates are: void DialogMain::initLayoutTree(CEGUI::Window*, wxTreeItemId&)


Mind you, this is building on OS X 10.4 with Xcode 2 / gcc 4.0.

scriptkid, thanks for making the editor cross-platform. I figured I'd be relegated to hand-editing XML files for the rest of my Mac build days. :lol:

Keep up the good work. :pint:

-E


Return to “Unofficial CEGUI-Related Tools”

Who is online

Users browsing this forum: Bing [Bot] and 3 guests