Kali
25-11-2007 23:20:43
I've had quite a few issues building this on my system, problems fall into a few categories.
- forward declaration was used while a class declaration was required. If you use member functions or inherit from a class then a forward declaration is no longer sufficiënt, apparantly not all compilers are as strict.
- A few dos line endings.
- OGRE_PLATFORM was undeclared on my system allthough ogre was installed/QuickGui example worked. I worked around it by checking if OGRE_PLATFORM exists first, this shouldn't break anything but I'm uncertain if this is even a QuickGUI error, or my ogre, don't know where QuickGUI gets OGRE_PLATFORM.
- The Skinset and texture editor seemed inconsistent with the api, so I fixed a few of those error to make it to compile, but you're probably working on that yourself so you should probably ignore that
- forward declaration was used while a class declaration was required. If you use member functions or inherit from a class then a forward declaration is no longer sufficiënt, apparantly not all compilers are as strict.
- A few dos line endings.
- OGRE_PLATFORM was undeclared on my system allthough ogre was installed/QuickGui example worked. I worked around it by checking if OGRE_PLATFORM exists first, this shouldn't break anything but I'm uncertain if this is even a QuickGUI error, or my ogre, don't know where QuickGUI gets OGRE_PLATFORM.
- The Skinset and texture editor seemed inconsistent with the api, so I fixed a few of those error to make it to compile, but you're probably working on that yourself so you should probably ignore that
Index: QuickGUI/include/QuickGUIExportDLL.h
===================================================================
--- QuickGUI/include/QuickGUIExportDLL.h (revision 260)
+++ QuickGUI/include/QuickGUIExportDLL.h (working copy)
@@ -2,14 +2,18 @@
#define QUICKGUIEXPORTDLL_H
#ifndef _QuickGUIExport
- #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined ( __MINGW32__ )
- # if defined( QUICKGUI_EXPORTS )
- # define _QuickGUIExport __declspec( dllexport )
- # else
- # define _QuickGUIExport __declspec( dllimport )
- # endif
+ #if defined(OGRE_PLATFORM)
+ #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined ( __MINGW32__ )
+ # if defined( QUICKGUI_EXPORTS )
+ # define _QuickGUIExport __declspec( dllexport )
+ # else
+ # define _QuickGUIExport __declspec( dllimport )
+ # endif
+ #else
+ # define _QuickGUIExport
+ #endif
#else
- # define _QuickGUIExport
+ #define _QuickGUIExport
#endif
#endif
Index: QuickGUI/include/QuickGUISkinSet.h
===================================================================
--- QuickGUI/include/QuickGUISkinSet.h (revision 260)
+++ QuickGUI/include/QuickGUISkinSet.h (working copy)
@@ -36,6 +36,9 @@
IMAGE_TYPE_BMP
};
public:
+ // Delete this SkinSet
+ ~SkinSet();
+
/*
* Adds a texture name to the list of textures that will be included in the
* SkinSet texture.
@@ -131,8 +134,6 @@
private:
// Generate a new SkinSet using the skin's image files.
SkinSet(const Ogre::String& skinName, ImageType t, const Ogre::String &resourceGroup);
- // Delete this SkinSet
- ~SkinSet();
void _determineExtension(ImageType t);
void buildMaterial();
Index: QuickGUI/include/QuickGUICheckBox.h
===================================================================
--- QuickGUI/include/QuickGUICheckBox.h (revision 260)
+++ QuickGUI/include/QuickGUICheckBox.h (working copy)
@@ -17,7 +17,7 @@
*/
template<typename T> void addOnCheckChangedEventHandler(void (T::*function)(const EventArgs&), T* obj)
{
- mOnSelectUserEventHandlers.push_back(new MemberFunctionPointer<T>(function,obj));
+ mOnCheckChangedUserEventHandlers.push_back(new MemberFunctionPointer<T>(function,obj));
}
void addOnCheckChangedEventHandler(MemberFunctionSlot* function);
Index: QuickGUI/src/QuickGUIPanel.cpp
===================================================================
--- QuickGUI/src/QuickGUIPanel.cpp (revision 260)
+++ QuickGUI/src/QuickGUIPanel.cpp (working copy)
@@ -3,6 +3,7 @@
#include "QuickGUIManager.h"
#include "QuickGUIPanel.h"
#include "QuickGUISheet.h"
+#include "QuickGUITextArea.h"
#ifdef WIN32
// Turn off warnings generated by using 'this' in base member initializer list.
Index: QuickGUI/src/CMakeLists.txt
===================================================================
--- QuickGUI/src/CMakeLists.txt (revision 260)
+++ QuickGUI/src/CMakeLists.txt (working copy)
@@ -37,6 +37,8 @@
QuickGUIVerticalTrackBar.cpp
QuickGUIWidget.cpp
QuickGUIWindow.cpp
+ QuickGUITextHelper.cpp
+ QuickGUICheckBox.cpp
)
INCLUDE_DIRECTORIES (../include ${OGRE_INCLUDEDIR})
Index: QuickGUI/src/QuickGUIConsole.cpp
===================================================================
--- QuickGUI/src/QuickGUIConsole.cpp (revision 260)
+++ QuickGUI/src/QuickGUIConsole.cpp (working copy)
@@ -1,6 +1,7 @@
#include "QuickGUIPrecompiledHeaders.h"
#include "QuickGUIConsole.h"
+#include "QuickGUIManager.h"
namespace QuickGUI
{
Index: QuickGUI/src/QuickGUIImage.cpp
===================================================================
--- QuickGUI/src/QuickGUIImage.cpp (revision 260)
+++ QuickGUI/src/QuickGUIImage.cpp (working copy)
@@ -1,6 +1,7 @@
#include "QuickGUIPrecompiledHeaders.h"
#include "QuickGUIImage.h"
+#include "QuickGUIUtility.h"
namespace QuickGUI
{
Index: QuickGUI/src/QuickGUIWidget.cpp
===================================================================
--- QuickGUI/src/QuickGUIWidget.cpp (revision 260)
+++ QuickGUI/src/QuickGUIWidget.cpp (working copy)
@@ -6,6 +6,7 @@
#include "QuickGUIWindow.h"
#include "QuickGUISheet.h"
#include "QuickGUIBorder.h"
+#include "QuickGUITextArea.h"
namespace QuickGUI
{
Index: QuickGUI/src/QuickGUITextHelper.cpp
===================================================================
--- QuickGUI/src/QuickGUITextHelper.cpp (revision 260)
+++ QuickGUI/src/QuickGUITextHelper.cpp (working copy)
@@ -29,7 +29,7 @@
if(mFont.isNull())
throw Ogre::Exception( Ogre::Exception::ERR_ITEM_NOT_FOUND, "Font has not been set, cannot get font texture!","Text::getFontTexturePtr" );
- return mFontTexture;
+ return (Ogre::FontPtr)mFontTexture;
}
Ogre::Real TextHelper::getFontTextureHeight()
Index: QuickGUI/src/QuickGUINStateButton.cpp
===================================================================
--- QuickGUI/src/QuickGUINStateButton.cpp (revision 260)
+++ QuickGUI/src/QuickGUINStateButton.cpp (working copy)
@@ -1,6 +1,7 @@
#include "QuickGUIPrecompiledHeaders.h"
#include "QuickGUINStateButton.h"
+#include "QuickGUIUtility.h"
namespace QuickGUI
{
Index: QuickGUISheetEditor/include/QuickGUISheetEditorUI.h
===================================================================
--- QuickGUISheetEditor/include/QuickGUISheetEditorUI.h (revision 260)
+++ QuickGUISheetEditor/include/QuickGUISheetEditorUI.h (working copy)
@@ -1,9 +1,9 @@
#ifndef QuickGUISheetEditorUI_H
#define QuickGUISheetEditorUI_H
-
-#include "QuickGUI.h"^M
+
+#include "QuickGUI.h"
#include "ExampleFrameListener.h"
-
+
class QuickGUISheetEditorUI : public ExampleFrameListener, public OIS::KeyListener, public OIS::MouseListener
{
private:
@@ -51,4 +51,4 @@
bool keyReleased( const OIS::KeyEvent &arg );
};
-#endif //QuickGUISheetEditorUI
+#endif //QuickGUISheetEditorUI
Index: QuickGUISheetEditor/include/QuickGUISheetEditorApp.h
===================================================================
--- QuickGUISheetEditor/include/QuickGUISheetEditorApp.h (revision 260)
+++ QuickGUISheetEditor/include/QuickGUISheetEditorApp.h (working copy)
@@ -1,9 +1,9 @@
#ifndef QuickGUISheetEditorApp_H
#define QuickGUISheetEditorApp_H
-
-#include "QuickGUI.h"^M
+
+#include "QuickGUI.h"
#include "ExampleApplication.h"
-
+
class QuickGUISheetEditorApp : public ExampleApplication
{
public:
@@ -22,4 +22,4 @@
};
-#endif //QuickGUISheetEditorApp
+#endif //QuickGUISheetEditorApp
Index: QuickGUISheetEditor/src/QuickGUISheetEditorUI.cpp
===================================================================
--- QuickGUISheetEditor/src/QuickGUISheetEditorUI.cpp (revision 260)
+++ QuickGUISheetEditor/src/QuickGUISheetEditorUI.cpp (working copy)
@@ -1,5 +1,5 @@
#include "QuickGUISheetEditorUI.h"
-
+#include "QuickGUISkinSet.h"
using namespace Ogre;
@@ -19,7 +19,7 @@
mGUIManager = new QuickGUI::GUIManager(mCamera->getViewport());
mGUIManager->setSceneManager(mCamera->getSceneManager());
- QuickGUI::SkinSetManager::getSingleton().loadSkin("qgui", "quickgui");
+ QuickGUI::SkinSetManager::getSingleton().loadSkin("qgui", QuickGUI::SkinSet::IMAGE_TYPE_PNG, "quickgui");
mSheet = mGUIManager->getDefaultSheet();
mSheet->setFont("micross.12",true);
@@ -85,8 +85,7 @@
}
// skin part list.
{
- mWidgetListWindow = mSheet->createWindow();
- mWidgetListWindow->setName("SubTexture List");
+ mWidgetListWindow = mSheet->createWindow("SubTexture List");
mWidgetListWindow->setDimensions(Rect(0, 60, 255, mWindow->getHeight() - 60));
mWidgetListWindow->allowScrolling(true);
@@ -122,7 +121,7 @@
sheetImage->setDimensions(textureWidgetSize);
// TODO : RTT GUIMANAGER, CREATE RTT SHEET,
- sheetImage->setTexture(mRTTSheetTexture->getName(), false);
+ sheetImage->setTexture(mRTTSheetTexture->getName());
QuickGUI::Window *aWindow;
size_t iTexCount = 0;
@@ -131,7 +130,7 @@
it != widgetList->end();
++it)
{
- aWindow = mSheet->createWindow();
+ aWindow = mSheet->createWindow((*it)->getInstanceName());
const Rect dim((*it)->getDimensions());
Rect RelativeDim (
dim.x * textureWidgetSize.width + xPos, dim.y*textureWidgetSize.height + yPos,
@@ -139,8 +138,6 @@
aWindow->hideTitlebar();
aWindow->setDimensions(RelativeDim);
- aWindow->setName((*it)->getInstanceName());
-
aWindow->addEventHandler(
QuickGUI::Widget::EVENT_MOUSE_BUTTON_DOWN,
&QuickGUISheetEditorUI::handleSelect,this);
Index: QuickGUIDemo/include/ExampleApplication.h
===================================================================
--- QuickGUIDemo/include/ExampleApplication.h (revision 260)
+++ QuickGUIDemo/include/ExampleApplication.h (working copy)
@@ -25,6 +25,7 @@
#include "Ogre.h"
#include "OgreConfigFile.h"
#include "ExampleFrameListener.h"
+#include "config.h"
#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
#include <CoreFoundation/CoreFoundation.h>
Index: QuickGUISkinSetEditor/src/QuickGUISkinSetEditorUI.cpp
===================================================================
--- QuickGUISkinSetEditor/src/QuickGUISkinSetEditorUI.cpp (revision 260)
+++ QuickGUISkinSetEditor/src/QuickGUISkinSetEditorUI.cpp (working copy)
@@ -20,7 +20,7 @@
mGUIManager = new QuickGUI::GUIManager(mCamera->getViewport());
mGUIManager->setSceneManager(mCamera->getSceneManager());
- QuickGUI::SkinSetManager::getSingleton().loadSkin("qgui", "quickgui");
+ QuickGUI::SkinSetManager::getSingleton().loadSkin("qgui", QuickGUI::SkinSet::IMAGE_TYPE_PNG, "quickgui");
mSheet = mGUIManager->getDefaultSheet();
mSheet->setFont("micross.12",true);
@@ -86,8 +86,7 @@
}
// skin part list.
{
- mSkinTextureListWindow = mSheet->createWindow();
- mSkinTextureListWindow->setName("SubTexture List");
+ mSkinTextureListWindow = mSheet->createWindow("SubTexture List");
mSkinTextureListWindow->setDimensions(Rect(0, 60, 255, mWindow->getHeight() - 60));
mSkinTextureListWindow->allowScrolling(true);
@@ -99,7 +98,7 @@
void QuickGUISkinSetEditorUI::loadSkin(const String &name)
{
delete mSkinset;
- QuickGUI::SkinSetManager::getSingleton().loadSkin(name, ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
+ QuickGUI::SkinSetManager::getSingleton().loadSkin(name , QuickGUI::SkinSet::IMAGE_TYPE_PNG, ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME);
mSkinset = QuickGUI::SkinSetManager::getSingleton().getSkinSet(name);
mSkinsetTexture = Ogre::TextureManager::getSingleton().getByName(mSkinset->getTextureName());
@@ -155,7 +154,7 @@
QuickGUI::Image* skinImage = mSheet->createImage();
skinImage->setDimensions(textureWidgetSize);
- skinImage->setTexture(mSkinsetTexture->getName(), false);
+ skinImage->setTexture(mSkinsetTexture->getName());
QuickGUI::Window *aWindow;
size_t iTexCount = 0;
@@ -164,7 +163,7 @@
it != texNames.end();
++it)
{
- aWindow = mSheet->createWindow();
+ aWindow = mSheet->createWindow(*it);
const Vector4 dim(mSkinset->getTextureCoordinates(*it));
Rect RelativeDim (
dim.x * textureWidgetSize.width + xPos, dim.y*textureWidgetSize.height + yPos,
@@ -172,8 +171,6 @@
aWindow->hideTitlebar();
aWindow->setDimensions(RelativeDim);
- aWindow->setName(*it);
-
aWindow->addEventHandler(
QuickGUI::Widget::EVENT_MOUSE_BUTTON_DOWN,
&QuickGUISkinSetEditorUI::handleSelect,this);