GUIEditorControl
GUIEditorControl
Hi,
I searched a easy way to create and edit the GUI. The GUIEditor seems to be broken (i.e. textures could not be set, setting a big image to the background disable the window etc.) and i could not find another working editors.
So now there is a simple GUI-control which could be integrated into a game to edit the GUI directly. It bases on a treeview ( http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17422 ) and the CGUIPanel from the GUIEditor.
link: http://7bitfaster.de/downloads/Irrlicht ... ontrol.zip
Patches, tips, improvments are wellcome.
Updates:
14.01.09
-fixed ScaleGUI
-removed tooltips because else they get added to the treeview => crash if TreeView->GetSelected()->Text is called
15.01.09
-add workingdir (save old workingdir before adding filedialog, set workingdir and restore old workingdir if a workingdir was set)
-added UseBuiltInSkin (works only for the mainwindow, because else OnEvent got problems)
-Imagerect is loaded automatically after changing a imagepath.
I searched a easy way to create and edit the GUI. The GUIEditor seems to be broken (i.e. textures could not be set, setting a big image to the background disable the window etc.) and i could not find another working editors.
So now there is a simple GUI-control which could be integrated into a game to edit the GUI directly. It bases on a treeview ( http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=17422 ) and the CGUIPanel from the GUIEditor.
link: http://7bitfaster.de/downloads/Irrlicht ... ontrol.zip
Patches, tips, improvments are wellcome.
Updates:
14.01.09
-fixed ScaleGUI
-removed tooltips because else they get added to the treeview => crash if TreeView->GetSelected()->Text is called
15.01.09
-add workingdir (save old workingdir before adding filedialog, set workingdir and restore old workingdir if a workingdir was set)
-added UseBuiltInSkin (works only for the mainwindow, because else OnEvent got problems)
-Imagerect is loaded automatically after changing a imagepath.
Last edited by Nox on Thu Jan 15, 2009 9:36 pm, edited 4 times in total.
errr yeah....the ScalGUI function is brocken (sry, forgot to mention that).
The crashed device is a interesting issue. Could you find out at which point the device got killed? Could you try the pure treeview from the link? Just to be sure it is not the treeview. And you could remove the CGUIPanel to test if its the panel. Please just play a bit around, because i have no chance to find the bug without your help. (may be questions concerning the use of a debugger? just ask )
Update: fixed the ScaleGUI methode.
The crashed device is a interesting issue. Could you find out at which point the device got killed? Could you try the pure treeview from the link? Just to be sure it is not the treeview. And you could remove the CGUIPanel to test if its the panel. Please just play a bit around, because i have no chance to find the bug without your help. (may be questions concerning the use of a debugger? just ask )
Update: fixed the ScaleGUI methode.
When a dialog opens from the main section that dialog can only move within the main dialog. For instance, I tell it I want to load an image the image dialog box pops up. I try and move it away from the main dialog and it will only go as far as the edge of the main dialog. If I move the main dialog then the image dialog moves right along with it. Not a major issue but a small quirk.
As far as I could move the load image dialog left:
If I move the main dialog the load image is attached to it:
Edit: Also it isn't allowing me to load an image onto a selected button. Keep getting "Could not open file of texture:"
I will keep playing with it and hope to give you some more feedback. Looks good though.
As far as I could move the load image dialog left:
If I move the main dialog the load image is attached to it:
Edit: Also it isn't allowing me to load an image onto a selected button. Keep getting "Could not open file of texture:"
I will keep playing with it and hope to give you some more feedback. Looks good though.
Jon Jones
Portfolio - needs updating
Portfolio - needs updating
The "feature" you described is due to the fact that the filedialog is a child of the mainwindow (else the mainwindow never receive a fileinputmessage afaik).
I will create a version there the imagerect is adapted automatically.
EDIT: yeah....the window get drawed with the actual set skin. I could do a workaround but then the OnEvent is uneffected -> the tabbuttons get shifted (the click rect ist different to the draw rect).
I will create a version there the imagerect is adapted automatically.
EDIT: yeah....the window get drawed with the actual set skin. I could do a workaround but then the OnEvent is uneffected -> the tabbuttons get shifted (the click rect ist different to the draw rect).
@geckoman
May be the tree malfunction the skin or something like this? Did u removed that lines and everything went correct?
that code causes the crash? Strange because i just copied it from CGUIWindow and i only find it in CGUIEditorControl.cpp ll. 532// draw body fast
rect = skin->draw3DWindowBackground(this, true, skin->getColor(EGDC_ACTIVE_BORDER),
AbsoluteRect, &AbsoluteClippingRect);
May be the tree malfunction the skin or something like this? Did u removed that lines and everything went correct?
the editor isn't broken it's just unfinished.
I think bitplane intended to include his spritebank which never got finished and the function to add it on the fly was never finished either.
however it still outputs gui.xml files and you can alter irrlicht to change the attributes. this would be a better solution/inclusion then making an entirely new editor.
but this might be useful in other ways
I think bitplane intended to include his spritebank which never got finished and the function to add it on the fly was never finished either.
however it still outputs gui.xml files and you can alter irrlicht to change the attributes. this would be a better solution/inclusion then making an entirely new editor.
but this might be useful in other ways
Well...what is standard? That was everybody think it has to be?
By the way...the last change of the editor is about 2 months ago, and these were just adoption changes.
But...do you have a better solution for editing a irrlicht-gui at the moment which i.e. allows to set textures? You are wellcome to share it with us.
OR
Do you have a version of the guieditor with a working "open file" functionality for setting a texture?
My Solution is far away from being mature. Its just a hack and is buggy. It does not support all the functionality of the irrlicht gui either. But it allow to add, change and remove all the existing standard elements
But yeah, i guess you are right and i will wait now until someone spend its rare time to complete the guieditor. Maybe it will be done the next day or may be in 2 years. But i have time. I can wait...........
By the way...the last change of the editor is about 2 months ago, and these were just adoption changes.
But...do you have a better solution for editing a irrlicht-gui at the moment which i.e. allows to set textures? You are wellcome to share it with us.
OR
Do you have a version of the guieditor with a working "open file" functionality for setting a texture?
My Solution is far away from being mature. Its just a hack and is buggy. It does not support all the functionality of the irrlicht gui either. But it allow to add, change and remove all the existing standard elements
But yeah, i guess you are right and i will wait now until someone spend its rare time to complete the guieditor. Maybe it will be done the next day or may be in 2 years. But i have time. I can wait...........