CEImagesetEditor - Now official tool!
Moderators: CEGUI MVP, CEGUI Team
- martignasse
- Just can't stay away
- Posts: 227
- Joined: Thu Apr 14, 2005 08:10
- Location: Lyon, FRANCE
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Yeah, generally sounds like a good idea. If you're going to do that then a separate area in the dialog should be created (or maybe a sub-dialog invoked from a 'Default Groups' button, though that may be overkill).
The new control group should basically consist of a Combobox with a selection for each resource type that can have a default group, and when the 'set default' button is pushed the current selected group is made the default for the resource type selected in the combo.
Not sure if I explained it all that well, but that's the way that I'd want it done
CE.
The new control group should basically consist of a Combobox with a selection for each resource type that can have a default group, and when the 'set default' button is pushed the current selected group is made the default for the resource type selected in the combo.
Not sure if I explained it all that well, but that's the way that I'd want it done
CE.
While I'm reading this, the Resource Group dialog had already been updated...
To tell you the truth, I just made it as simple as I could, but functionnal.
But, you're right, I don't find this very user friendly and clean:
I will update it before my release with a combo system
I'm not totally sure I have anderstand your vision:
But, if it consists of only one combo to select the default group and an update button, I see a little problem with this.
It's ok for updating Default Groups, but you won't have the current config for all default groups displayed in a single shoot...
What about just replacing the "Update Group" buttons and the TextCtrls, for each default group, by a Combo offering to choose from the list of defined groups ?
To tell you the truth, I just made it as simple as I could, but functionnal.
But, you're right, I don't find this very user friendly and clean:
I will update it before my release with a combo system
I'm not totally sure I have anderstand your vision:
But, if it consists of only one combo to select the default group and an update button, I see a little problem with this.
It's ok for updating Default Groups, but you won't have the current config for all default groups displayed in a single shoot...
What about just replacing the "Update Group" buttons and the TextCtrls, for each default group, by a Combo offering to choose from the list of defined groups ?
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Yeah, I agree, my original idea was not all it could have been
Having seen the updated dialog, I now think that we should split off the 'default groups' part into its own dialog which can be invoked via a button on the main dialog.
The default groups sub-dialog could then have, as you suggested, a combo which lists the available groups for each resource type, and the usual ok / cancel buttons.
CE.
Having seen the updated dialog, I now think that we should split off the 'default groups' part into its own dialog which can be invoked via a button on the main dialog.
The default groups sub-dialog could then have, as you suggested, a combo which lists the available groups for each resource type, and the usual ok / cancel buttons.
CE.
Good news, it works !
I still have the usual boring removals of defined groups to report into the default groups, but it's no big deal
I have tested it by loading layouts, and no problem to report.
We can now load any kind of CEGUI data according to the default groups settings.
There's a lot to do on the embedded layout:
But if nothing crazy happens , I still expect a release at the end of the next week.
PS: As I'm more at ease with wxWidgets now.
I will surely add a tiny Wizard to propose autoconfiguration of resource at first launch, with the samples datafiles provided in the binaries.
I still have the usual boring removals of defined groups to report into the default groups, but it's no big deal
I have tested it by loading layouts, and no problem to report.
We can now load any kind of CEGUI data according to the default groups settings.
There's a lot to do on the embedded layout:
But if nothing crazy happens , I still expect a release at the end of the next week.
PS: As I'm more at ease with wxWidgets now.
I will surely add a tiny Wizard to propose autoconfiguration of resource at first launch, with the samples datafiles provided in the binaries.
- martignasse
- Just can't stay away
- Posts: 227
- Joined: Thu Apr 14, 2005 08:10
- Location: Lyon, FRANCE
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
That's great - just what I was after . Don't forget to submit some patches (once you release the code I'll generate them if I have to, but I'm lazy!).
Things may not get updated in SVN until the new year now - I'm supposed to be on a break from development based things. Though I may be able to score a couple of days work on the thing here and there
CE.
Things may not get updated in SVN until the new year now - I'm supposed to be on a break from development based things. Though I may be able to score a couple of days work on the thing here and there
CE.
No problem with the patch, I'm not an expert with them, but if TortoiseSVN produces them correctly it won't be a problem...
About not updating SVN before the next year:
Well it's not a problem for me either.
On the opposite it would be a better idea for me to submit standalone binaries and source code here, and let people test improve, and report bugs.
Don't forget I'm relatively new to CEGUI and WXWidgets, I'm quite sure I will miss important things...
More over, the simple fact I have not tested this under linux yet, is revelant enough to postpone a real commit...
The latest addon, a tiny Resource wizard:
It will autoconfig the six needed system groups to the datafiles folder provided with the next binary archive.
(This datafiles folder is a simple copy of the original one from CEGUI)
This Wizard is called only at first launch or if no config is found.
Using this, a newbie is 100% ready to work with the Editor, just by downloading it.
Well, While we're on it, some words about the datafiles copy:
I decided to bundle them with my coming binaries, without asking advices to anyone here...
Of course it's just my choice, and when it will comes to commit a release to the real SVN, the final decision belongs to the CEGUI team and nobody else...
But there's one thing, I really would like to insist on:
When I first downloaded this tool, it really took me times to make it load something for the first time.
More over, it's really obvious this editor must be designed to target casual users, including artists... Without them, no skin...
Beeing myself a game developper for now a long time, I'm very used to deal with this kind of strange people... And you know what ?
They're really lazy when it involves editing texts...
And if you expect them to open an XMLStuff thing...
Just stop dreaming !
So don't be surprise if I will focus a lot, on wizards, cutting down dependencies or improving controls...
In my opinion, performance is important, but it's a second nature for this kind of tool.
About not updating SVN before the next year:
Well it's not a problem for me either.
On the opposite it would be a better idea for me to submit standalone binaries and source code here, and let people test improve, and report bugs.
Don't forget I'm relatively new to CEGUI and WXWidgets, I'm quite sure I will miss important things...
More over, the simple fact I have not tested this under linux yet, is revelant enough to postpone a real commit...
The latest addon, a tiny Resource wizard:
It will autoconfig the six needed system groups to the datafiles folder provided with the next binary archive.
(This datafiles folder is a simple copy of the original one from CEGUI)
This Wizard is called only at first launch or if no config is found.
Using this, a newbie is 100% ready to work with the Editor, just by downloading it.
Well, While we're on it, some words about the datafiles copy:
I decided to bundle them with my coming binaries, without asking advices to anyone here...
Of course it's just my choice, and when it will comes to commit a release to the real SVN, the final decision belongs to the CEGUI team and nobody else...
But there's one thing, I really would like to insist on:
When I first downloaded this tool, it really took me times to make it load something for the first time.
More over, it's really obvious this editor must be designed to target casual users, including artists... Without them, no skin...
Beeing myself a game developper for now a long time, I'm very used to deal with this kind of strange people... And you know what ?
They're really lazy when it involves editing texts...
And if you expect them to open an XMLStuff thing...
Just stop dreaming !
So don't be surprise if I will focus a lot, on wizards, cutting down dependencies or improving controls...
In my opinion, performance is important, but it's a second nature for this kind of tool.
- martignasse
- Just can't stay away
- Posts: 227
- Joined: Thu Apr 14, 2005 08:10
- Location: Lyon, FRANCE
martignasse wrote:wow,
relatively new but you already make really good job.
If you want my personnal opinion:
I would recommend you to post such nice comments after checking my code !
Even, if I'm quite ok with WxWidgets now, I'm really not confident at all when it comes to CEGUI, I need more experience on it !
Ok now, times for the real problems:
I have strong refresh/redraw problems with both OpenGL canvas running at same time.
To add the layout, I simply created a Layout class based on the EditorLayout used for the Tga display ! The problem is now you need to use SetCurrent almost anywhere to select which window will receive the commands (OnResize, OnMouseMove, OnRedraw etc...)
In the ImageSetRender, I also put something like this:
Code: Select all
m_GUISystem->setGUISheet( m_imagesetStaticImage );
// CEGUI rendering
renderCEGUILayout();
Same for the LayoutRender, so I set the needed sheet as root before each rendering !
I'm really not sure at all about this, but without this, it's not working...
Is it safe ?
I will surely post some code, this week-end, but don't expect something clean or ready to use...
It will be here more for cool guyz to help me, this time I really need it !
I must also admit it's really very hard for me to implement 2 CEGUI sheets in only one CEGUI::System, mostly because even after long search I haven't found a working exemple of this anywhere...
If someone know, where I could find something like this, please let me know !
More, very soon, Thanks.
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
i don't get the 'two GuiSheets' part. Which is your second sheet? One should be the preview layout, which i understand.
It is not possible to have two GuiSheets, but maybe you can do something with one sheet and two child-sheets?
As for toggling input, do you want your preview layout to receive input? In the layout editor this is not done either.
If you have the code available, i will certainly have a look at it
Good luck!
i don't get the 'two GuiSheets' part. Which is your second sheet? One should be the preview layout, which i understand.
It is not possible to have two GuiSheets, but maybe you can do something with one sheet and two child-sheets?
As for toggling input, do you want your preview layout to receive input? In the layout editor this is not done either.
If you have the code available, i will certainly have a look at it
Good luck!
Hey Scriptkid !
Nice to know you're around to help !
I'm on CEGUI IRC right now
Could we meet me there ?
You're right for the 2 guisheets, little mistake from me, there's only one for the preview, the other render is the old good Static Image for the main ImageSet...
And, yes events are injected in the preview layout, it's working except for texts input and a wrong size problem at init.
I also sent you a PM, for more infos
Nice to know you're around to help !
I'm on CEGUI IRC right now
Could we meet me there ?
You're right for the 2 guisheets, little mistake from me, there's only one for the preview, the other render is the old good Static Image for the main ImageSet...
And, yes events are injected in the preview layout, it's working except for texts input and a wrong size problem at init.
I also sent you a PM, for more infos
Ok so here it is, and I must admit I'm very reluctant to post it !
Why ?
Simply because it crashes, and it crashes a lot !
Don't use this for work, it's unstable... I'm just posting it for people who want to help !
It's ok for testing, that's all !
Windows Binaries: http://yoyo2k1.free.fr/cegui/CEImageSet ... naries.zip
Sources: http://yoyo2k1.free.fr/cegui/CEImageSet ... ources.zip
My Recommandations:
- Use the wizard at first launch.
- All the needed resources are provided inside the bin/release/datafiles folder, and the wizard configure CEGUI to use them.
- Load Vanilla.imageset as imageset
- Commonwealth-10.font as font
- Vanilla.looknfeel as looknfeel
- VanillaConsole.layout or VanillaWindows.layout as layout
- Press the Load/Refresh button
(You can load something else, but I have mostly work with Vanilla)
Missing Features or Limitations:
- You need to change the layout for the Refresh button to work
- Your imageSet must contains an image called "MouseArrow" or "MouseCursor" for the cursor to be displayed in the test Layout
- Not tested under Linux
Bugs:
- If the test Layout is using the same imageSet as the main one, it will crash if you try to save the imageset!
- Resizing the window will corrupt the imageSet surface, same if zooming the imageset makes it larger than the size of the window (scrollbars)
- The mouse coord is wrong for the Layout.
- Dragging an Elastic box in the main ImageSet fired mouse events into test Layout with correct positions !
And there's more !!!
Seriously, I'm mostly facing 2 big problems:
- I'm not sure at all , about the 2 OpenGl renderers in one CEGUI::System. I have surely done something wrong by mixing the drawing events, causing surfaces to be corrupted after a resize...
- My refresh Layout code is also very suspicious, it's called everytime you press the Load / Refresh button:
The unloadScheme must be the problem, causing save crash if the main ImageSet was using it, but How to refresh a layout without unload/reload ?
About the invalid mouse pos in the test Layout:
I have not even an idea, after checking the window size it looks good !
There's perhaps something from the main ImageSet window which interfere?
One last thing about the code itself, don't be too crude, it's full of commented parts (dirty) but I'm still in the playing stage with it !
A cleaning will comes just after those layout problems are solved...
I hope someone could help me a little, as I told you before I'm still a newbie at CEGUI
Cheers.
EDIT:
After few hours working on this, I finally noticed my Renderer inits are totally wrong, It looks like I must only use one. It fixed the layout size problem and wrong mouse pos
Why ?
Simply because it crashes, and it crashes a lot !
Don't use this for work, it's unstable... I'm just posting it for people who want to help !
It's ok for testing, that's all !
Windows Binaries: http://yoyo2k1.free.fr/cegui/CEImageSet ... naries.zip
Sources: http://yoyo2k1.free.fr/cegui/CEImageSet ... ources.zip
My Recommandations:
- Use the wizard at first launch.
- All the needed resources are provided inside the bin/release/datafiles folder, and the wizard configure CEGUI to use them.
- Load Vanilla.imageset as imageset
- Commonwealth-10.font as font
- Vanilla.looknfeel as looknfeel
- VanillaConsole.layout or VanillaWindows.layout as layout
- Press the Load/Refresh button
(You can load something else, but I have mostly work with Vanilla)
Missing Features or Limitations:
- You need to change the layout for the Refresh button to work
- Your imageSet must contains an image called "MouseArrow" or "MouseCursor" for the cursor to be displayed in the test Layout
- Not tested under Linux
Bugs:
- If the test Layout is using the same imageSet as the main one, it will crash if you try to save the imageset!
- Resizing the window will corrupt the imageSet surface, same if zooming the imageset makes it larger than the size of the window (scrollbars)
- The mouse coord is wrong for the Layout.
- Dragging an Elastic box in the main ImageSet fired mouse events into test Layout with correct positions !
And there's more !!!
Seriously, I'm mostly facing 2 big problems:
- I'm not sure at all , about the 2 OpenGl renderers in one CEGUI::System. I have surely done something wrong by mixing the drawing events, causing surfaces to be corrupted after a resize...
- My refresh Layout code is also very suspicious, it's called everytime you press the Load / Refresh button:
Code: Select all
void LayoutGLCanvas::loadLayout( const wxString& layoutName,const wxString& schemeName,const wxString& fontName )
{
SetCurrent();
try
{
if (m_scheme)
CEGUI::SchemeManager::getSingleton().unloadScheme(m_scheme->getName());
m_scheme = CEGUI::SchemeManager::getSingleton().loadScheme(CEGUIHelper::ToCEGUIString(schemeName));
}
catch ( Exception& guiException )
{
wxLogError ( wxT( "%s" ), CEGUIHelper::ToWXString( guiException.getMessage() ).c_str() );
}
// Set default mouse cursor: Must be defined as MouseArrow or MouseCursor in the ImageSet
CEGUI::ImagesetManager* imgsetmgr = CEGUI::ImagesetManager::getSingletonPtr();
CEGUI::ImagesetManager::ImagesetIterator iter = imgsetmgr->getIterator();
while( !iter.isAtEnd() )
{
if ((*iter)->isImageDefined("MouseArrow"))
{
const CEGUI::Image& img = (*iter)->getImage("MouseArrow");
CEGUI::System::getSingletonPtr()->setDefaultMouseCursor(&img);
break;
}
if ((*iter)->isImageDefined("MouseCursor"))
{
const CEGUI::Image& img = (*iter)->getImage("MouseCursor");
CEGUI::System::getSingletonPtr()->setDefaultMouseCursor(&img);
break;
}
iter++;
}
try
{
if (m_font)
FontManager::getSingleton().destroyFont(m_font);
m_font = FontManager::getSingleton().createFont(CEGUIHelper::ToCEGUIString(fontName));
}
catch ( Exception& guiException )
{
wxLogError ( wxT( "%s" ), CEGUIHelper::ToWXString( guiException.getMessage() ).c_str() );
}
m_GUISystem->setDefaultFont(m_font);
if (m_layoutImage)
{
CEGUI::WindowManager::getSingletonPtr()->destroyWindow(m_layoutImage);
}
// FIXME: crash the save of the main imageset, if this layout is using it !
m_layoutImage = CEGUI::WindowManager::getSingletonPtr()->loadWindowLayout(CEGUIHelper::ToCEGUIString(layoutName));
m_layoutImage->setMaxSize( UVector2( UDim( 0.0f, 20480.0f ), UDim( 0.0f, 20480.0f ) ) );
m_layoutImage->setPosition( UVector2( UDim( 0.0f, 0.0f ), UDim( 0.0f, 0.0f ) ) );
int clientWidth, clientHeight;
GetClientSize( &clientWidth, &clientHeight );
changeSize(clientWidth,clientHeight);
//m_imagesetStaticImage->setSize(
// UVector2( UDim( 0, clientWidth ), UDim( 0, clientHeight ) ) );
m_GUISystem->setGUISheet(m_layoutImage);
// save layout data in ini file
COptions::GetInstancePtr()->saveCurrentScheme(schemeName);
COptions::GetInstancePtr()->saveCurrentFont(fontName);
COptions::GetInstancePtr()->saveCurrentLayout(layoutName);
}
The unloadScheme must be the problem, causing save crash if the main ImageSet was using it, but How to refresh a layout without unload/reload ?
About the invalid mouse pos in the test Layout:
I have not even an idea, after checking the window size it looks good !
There's perhaps something from the main ImageSet window which interfere?
One last thing about the code itself, don't be too crude, it's full of commented parts (dirty) but I'm still in the playing stage with it !
A cleaning will comes just after those layout problems are solved...
I hope someone could help me a little, as I told you before I'm still a newbie at CEGUI
Cheers.
EDIT:
After few hours working on this, I finally noticed my Renderer inits are totally wrong, It looks like I must only use one. It fixed the layout size problem and wrong mouse pos
Return to “Unofficial CEGUI-Related Tools”
Who is online
Users browsing this forum: No registered users and 0 guests