Can I integrate cegui into hge?
Moderators: CEGUI MVP, CEGUI Team
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
Can I integrate cegui into hge?
Can I integrate cegui into hge game engine??
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Can I integrate cegui into hge?
I'm tempted to just answer "Yes" and leave it at that
It's clearly possible because when you searched, you found this thread: viewtopic.php?f=4&t=496 right? Errrm.. You did search didn't you? While the original download links are long gone, I did fine this: http://relishgames.com/forum/viewtopic. ... 1734#11734 posted on the HGE forum (see how good I am to you guys!). The code may need updating and certainly so for 0.7.0 compatibility, but there you go! Have fun, and let us know how it goes!
CE.
It's clearly possible because when you searched, you found this thread: viewtopic.php?f=4&t=496 right? Errrm.. You did search didn't you? While the original download links are long gone, I did fine this: http://relishgames.com/forum/viewtopic. ... 1734#11734 posted on the HGE forum (see how good I am to you guys!). The code may need updating and certainly so for 0.7.0 compatibility, but there you go! Have fun, and let us know how it goes!
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
Re: Can I integrate cegui into hge?
http://relishgames.com/forum/viewtopic. ... 1734#11734
above is a hero's solution.
I did all he said, but when it run, pop a problem which I can not resolve.
this is problem is, it is possible that it can not read imageset?
in hge fourm, I can not register my account, because of e-mail, can not use 163 e-mail???
so I pop it to you, my CE hero. I need help
above is a hero's solution.
I did all he said, but when it run, pop a problem which I can not resolve.
Code: Select all
void Imageset_xmlHandler::elementImagesetStart(const XMLAttributes& attributes)
{
d_imageset->d_name = attributes.getValueAsString(ImagesetNameAttribute);
// get native horizontal resolution
float hres = static_cast<float>(attributes.getValueAsInteger(ImagesetNativeHorzResAttribute, 640));
// get native vertical resolution
float vres = static_cast<float>(attributes.getValueAsInteger(ImagesetNativeVertResAttribute, 480));
// set native resolution for imageset
d_imageset->setNativeResolution(Size(hres, vres));
// enable / disable auto-scaling for this Imageset according to the setting
d_imageset->setAutoScalingEnabled(attributes.getValueAsBool(ImagesetAutoScaledAttribute, false));
// get texture image filename
String filename(attributes.getValueAsString(ImagesetImageFileAttribute));
// get resource group to use.
String resourceGroup(attributes.getValueAsString(ImagesetResourceGroupAttribute));
Logger::getSingleton().logEvent("Started creation of Imageset from XML specification:");
Logger::getSingleton().logEvent("---- CEGUI Imageset name: " + d_imageset->d_name);
Logger::getSingleton().logEvent("---- Source texture file: " + filename +
" in resource group: " + (resourceGroup.empty() ? "(Default)" : resourceGroup));
// Create a Texture object via the specified filename, and set it as the texture for the Imageset
try
{
d_imageset->d_texture = System::getSingleton().getRenderer()->createTexture(
filename, resourceGroup.empty() ? Imageset::getDefaultResourceGroup() : resourceGroup);
}
catch(...)
{
throw RendererException("Imageset::xmlHandler::startElement - An unexpected error occurred while creating a Texture object from file '" + filename + "'");
}
d_imageset->d_textureFilename = filename;
}
Code: Select all
problem is here:
d_imageset->d_texture = System::getSingleton().getRenderer()->createTexture(
filename, resourceGroup.empty() ? Imageset::getDefaultResourceGroup() : resourceGroup);
this is problem is, it is possible that it can not read imageset?
in hge fourm, I can not register my account, because of e-mail, can not use 163 e-mail???
so I pop it to you, my CE hero. I need help
Last edited by songge3604 on Thu Sep 10, 2009 02:53, edited 2 times in total.
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
Re: Can I integrate cegui into hge?
This is CEGUI log:
10/09/2009 10:31:43 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/09/2009 10:31:43 (Std) + Crazy Eddie's GUI System - Event log +
10/09/2009 10:31:43 (Std) + (http://www.cegui.org.uk/) +
10/09/2009 10:31:43 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/09/2009 10:31:43 (Std) CEGUI::Logger singleton created. (0133F1F0)
10/09/2009 10:31:43 (Std) ---- Begining CEGUI System initialisation ----
10/09/2009 10:31:43 (Std) CEGUI::ImagesetManager singleton created (01334720)
10/09/2009 10:31:43 (Std) CEGUI::FontManager singleton created. (0121D538)
10/09/2009 10:31:43 (Std) CEGUI::WindowFactoryManager singleton created
10/09/2009 10:31:43 (Std) CEGUI::WindowManager singleton created (01335B78)
10/09/2009 10:31:43 (Std) CEGUI::SchemeManager singleton created. (013365F0)
10/09/2009 10:31:43 (Std) CEGUI::MouseCursor singleton created. (01336A78)
10/09/2009 10:31:43 (Std) CEGUI::GlobalEventSet singleton created. (0133CF60)
10/09/2009 10:31:43 (Std) CEGUI::WidgetLookManager singleton created. (0133CA88)
10/09/2009 10:31:43 (Std) CEGUI::WindowRendererManager singleton created (0133CAE0)
10/09/2009 10:31:43 (Std) WindowFactory for 'DefaultWindow' windows added. (00A1E1F8)
10/09/2009 10:31:43 (Std) WindowFactory for 'DragContainer' windows added. (00A1E5B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'ScrolledContainer' windows added. (00A1DCE0)
10/09/2009 10:31:43 (Std) WindowFactory for 'ClippedContainer' windows added. (00A1E478)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Checkbox' windows added. (00A1E0B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/PushButton' windows added. (00A1E838)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/RadioButton' windows added. (00A1E8D8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Combobox' windows added. (00A1DB98)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ComboDropList' windows added. (00A1EA18)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Editbox' windows added. (00A1DA58)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/FrameWindow' windows added. (00A1DED8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ItemEntry' windows added. (00A1E158)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Listbox' windows added. (00A1E978)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ListHeader' windows added. (00A1EB58)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (00A1DC38)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Menubar' windows added. (00A1EAB8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/PopupMenu' windows added. (00A1DF78)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MenuItem' windows added. (00A1D730)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MultiColumnList' windows added. (00A1DE38)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (00A1E798)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ProgressBar' windows added. (00A1E338)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ScrollablePane' windows added. (00A1E518)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Scrollbar' windows added. (00A1DAF8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Slider' windows added. (00A1E3D8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Spinner' windows added. (00A1E018)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/TabButton' windows added. (00A1E6F8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/TabControl' windows added. (00A1DD98)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Thumb' windows added. (00A1D910)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Titlebar' windows added. (00A1D870)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Tooltip' windows added. (00A1D7D0)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ItemListbox' windows added. (00A1E658)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/GroupBox' windows added. (00A1D9B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Tree' windows added. (00A1E298)
10/09/2009 10:31:43 (Std) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
10/09/2009 10:31:43 (Std) CEGUI::System singleton created. (0133EA90)
10/09/2009 10:31:43 (Std) ---- CEGUI System initialisation completed ----
10/09/2009 10:31:43 (Std) ---- Version 0.6.2 ----
10/09/2009 10:31:43 (Std) ---- Renderer module is: HGE Renderer ----
10/09/2009 10:31:43 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
10/09/2009 10:31:43 (Std) ---- Scripting module is: None ----
10/09/2009 10:31:46 (Std) Attempting to load Scheme from file 'TaharezLook.scheme'.
10/09/2009 10:32:14 (Std) Attempting to create an Imageset from the information specified in file 'TaharezLook.imageset'.
10/09/2009 10:32:22 (Std) Started creation of Imageset from XML specification:
10/09/2009 10:32:22 (Std) ---- CEGUI Imageset name: TaharezLook
10/09/2009 10:32:22 (Std) ---- Source texture file: TaharezLook.tga in resource group: (Default)
10/09/2009 10:31:43 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/09/2009 10:31:43 (Std) + Crazy Eddie's GUI System - Event log +
10/09/2009 10:31:43 (Std) + (http://www.cegui.org.uk/) +
10/09/2009 10:31:43 (Std) +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
10/09/2009 10:31:43 (Std) CEGUI::Logger singleton created. (0133F1F0)
10/09/2009 10:31:43 (Std) ---- Begining CEGUI System initialisation ----
10/09/2009 10:31:43 (Std) CEGUI::ImagesetManager singleton created (01334720)
10/09/2009 10:31:43 (Std) CEGUI::FontManager singleton created. (0121D538)
10/09/2009 10:31:43 (Std) CEGUI::WindowFactoryManager singleton created
10/09/2009 10:31:43 (Std) CEGUI::WindowManager singleton created (01335B78)
10/09/2009 10:31:43 (Std) CEGUI::SchemeManager singleton created. (013365F0)
10/09/2009 10:31:43 (Std) CEGUI::MouseCursor singleton created. (01336A78)
10/09/2009 10:31:43 (Std) CEGUI::GlobalEventSet singleton created. (0133CF60)
10/09/2009 10:31:43 (Std) CEGUI::WidgetLookManager singleton created. (0133CA88)
10/09/2009 10:31:43 (Std) CEGUI::WindowRendererManager singleton created (0133CAE0)
10/09/2009 10:31:43 (Std) WindowFactory for 'DefaultWindow' windows added. (00A1E1F8)
10/09/2009 10:31:43 (Std) WindowFactory for 'DragContainer' windows added. (00A1E5B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'ScrolledContainer' windows added. (00A1DCE0)
10/09/2009 10:31:43 (Std) WindowFactory for 'ClippedContainer' windows added. (00A1E478)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Checkbox' windows added. (00A1E0B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/PushButton' windows added. (00A1E838)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/RadioButton' windows added. (00A1E8D8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Combobox' windows added. (00A1DB98)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ComboDropList' windows added. (00A1EA18)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Editbox' windows added. (00A1DA58)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/FrameWindow' windows added. (00A1DED8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ItemEntry' windows added. (00A1E158)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Listbox' windows added. (00A1E978)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ListHeader' windows added. (00A1EB58)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ListHeaderSegment' windows added. (00A1DC38)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Menubar' windows added. (00A1EAB8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/PopupMenu' windows added. (00A1DF78)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MenuItem' windows added. (00A1D730)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MultiColumnList' windows added. (00A1DE38)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/MultiLineEditbox' windows added. (00A1E798)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ProgressBar' windows added. (00A1E338)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ScrollablePane' windows added. (00A1E518)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Scrollbar' windows added. (00A1DAF8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Slider' windows added. (00A1E3D8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Spinner' windows added. (00A1E018)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/TabButton' windows added. (00A1E6F8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/TabControl' windows added. (00A1DD98)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Thumb' windows added. (00A1D910)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Titlebar' windows added. (00A1D870)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Tooltip' windows added. (00A1D7D0)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/ItemListbox' windows added. (00A1E658)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/GroupBox' windows added. (00A1D9B8)
10/09/2009 10:31:43 (Std) WindowFactory for 'CEGUI/Tree' windows added. (00A1E298)
10/09/2009 10:31:43 (Std) Window type alias named 'DefaultGUISheet' added for window type 'DefaultWindow'.
10/09/2009 10:31:43 (Std) CEGUI::System singleton created. (0133EA90)
10/09/2009 10:31:43 (Std) ---- CEGUI System initialisation completed ----
10/09/2009 10:31:43 (Std) ---- Version 0.6.2 ----
10/09/2009 10:31:43 (Std) ---- Renderer module is: HGE Renderer ----
10/09/2009 10:31:43 (Std) ---- XML Parser module is: CEGUI::ExpatParser - Official expat based parser module for CEGUI ----
10/09/2009 10:31:43 (Std) ---- Scripting module is: None ----
10/09/2009 10:31:46 (Std) Attempting to load Scheme from file 'TaharezLook.scheme'.
10/09/2009 10:32:14 (Std) Attempting to create an Imageset from the information specified in file 'TaharezLook.imageset'.
10/09/2009 10:32:22 (Std) Started creation of Imageset from XML specification:
10/09/2009 10:32:22 (Std) ---- CEGUI Imageset name: TaharezLook
10/09/2009 10:32:22 (Std) ---- Source texture file: TaharezLook.tga in resource group: (Default)
-
- Quite a regular
- Posts: 60
- Joined: Tue Oct 28, 2008 10:46
Re: Can I integrate cegui into hge?
OH,I resolve it!
Reason is here: filename is "TaharezLook.tga" rather than "datafiles\imageset\TaharezLook.tga"!
So, HGE can not find it.
How can I change the source code? The resourceGroup I print, it is just "imagesets" rather than "datafiles\imagesets".
But I have used the function to set resource group: rp->setResourceGroupDirectory("imagesets", "datafiles/imagesets/");
Code: Select all
d_imageset->d_texture = System::getSingleton().getRenderer()->createTexture(
filename, resourceGroup.empty() ? Imageset::getDefaultResourceGroup() : resourceGroup);
Reason is here: filename is "TaharezLook.tga" rather than "datafiles\imageset\TaharezLook.tga"!
So, HGE can not find it.
How can I change the source code? The resourceGroup I print, it is just "imagesets" rather than "datafiles\imagesets".
But I have used the function to set resource group: rp->setResourceGroupDirectory("imagesets", "datafiles/imagesets/");
- CrazyEddie
- CEGUI Project Lead
- Posts: 6760
- Joined: Wed Jan 12, 2005 12:06
- Location: England
- Contact:
Re: Can I integrate cegui into hge?
Did you initialise the resource group directories according to the tutorial? http://www.cegui.org.uk/wiki/index.php/ ... rce_Groups
CE.
CE.
Useful Links: Forum Guidelines | Documentation | Tutorials | HOWTO | Videos | Donate to CEGUI | CEGUI Twitter
Return to “Offtopic Discussion”
Who is online
Users browsing this forum: No registered users and 5 guests