[Python-ogre-commit] SF.net SVN: python-ogre: [539] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
From: <and...@us...> - 2008-01-12 06:01:51
|
Revision: 539 http://python-ogre.svn.sourceforge.net/python-ogre/?rev=539&view=rev Author: andy_miller Date: 2008-01-11 22:01:54 -0800 (Fri, 11 Jan 2008) Log Message: ----------- Verious updates to QuickGUI, OgreForests - fixes to alais std::string to String Modified Paths: -------------- trunk/python-ogre/PythonOgreConfig_nt.py trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp trunk/python-ogre/ThirdParty/forests/GrassLoader.h trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp trunk/python-ogre/ThirdParty/forests/ImpostorPage.h trunk/python-ogre/ThirdParty/forests/PagedGeometry.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp trunk/python-ogre/code_generators/et/python_et_aliases.h trunk/python-ogre/code_generators/navi/python_navi_aliases.h trunk/python-ogre/code_generators/ogreode/python_ogreode_aliases.h trunk/python-ogre/code_generators/ois/generate_code.py trunk/python-ogre/code_generators/ois/python_ois_aliases.h trunk/python-ogre/code_generators/quickgui/generate_code.py trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h trunk/python-ogre/demos/ogre/Demo_Water.py trunk/python-ogre/demos/ogre/plugins.cfg trunk/python-ogre/scripts/updatesource.bat Added Paths: ----------- trunk/python-ogre/ThirdParty/nxogreOld/ Removed Paths: ------------- trunk/python-ogre/ThirdParty/nxogre/ Modified: trunk/python-ogre/PythonOgreConfig_nt.py =================================================================== --- trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/PythonOgreConfig_nt.py 2008-01-12 06:01:54 UTC (rev 539) @@ -6,6 +6,12 @@ module_dir = os.path.abspath(os.path.dirname(__file__) ) BASE_DIR, ignore = os.path.split(module_dir) +# the base of the /usr/... dircetory structure that we are using +ROOT_DIR = os.path.join(BASE_DIR,'root') +LOCAL_LIB = os.path.join(ROOT_DIR,'usr/lib') +LOCAL_INCLUDE = os.path.join(ROOT_DIR, 'usr/include') + + ## path to the root of your boost dir, should have 'libs', 'boost' subdirectories PATH_Boost = os.path.join(BASE_DIR, 'boost') ## Path to your boost_pythonxxxx lib file Modified: trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h =================================================================== --- trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h 2008-01-12 06:01:54 UTC (rev 539) @@ -25,19 +25,19 @@ #include "Ogre.h" // Define the dll export qualifier if compiling for Windows -// #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 -// #ifdef CAELUM_LIB -// #define DllExport __declspec (dllexport) -// #else -// #ifdef __MINGW32__ -// #define DllExport -// #else -// #define DllExport __declspec (dllimport) -// #endif -// #endif -// #else +#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 + #ifdef CAELUM_LIB + #define DllExport __declspec (dllexport) + #else + #ifdef __MINGW32__ + #define DllExport + #else + #define DllExport __declspec (dllimport) + #endif + #endif +#else #define DllExport -// #endif +#endif // Define the version code #define CAELUM_VERSION_MAIN 0 Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -69,6 +69,12 @@ return layer; } +void GrassLoader::deleteLayer(GrassLayer *layer) +{ + layerList.remove(layer); + delete layer; +} + void GrassLoader::frameUpdate() { unsigned long currentTime = windTimer.getMilliseconds(); @@ -632,7 +638,6 @@ return mesh.getPointer(); } - GrassLayer::GrassLayer(PagedGeometry *geom, GrassLoader *ldr) { GrassLayer::geom = geom; Modified: trunk/python-ogre/ThirdParty/forests/GrassLoader.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/forests/GrassLoader.h 2008-01-12 06:01:54 UTC (rev 539) @@ -66,6 +66,11 @@ \see GrassLayer class for more information. */ GrassLayer *addLayer(const Ogre::String &material); + /** \brief Removes and deletes a grass layer from the scene + + This function simply deletes a GrassLayer previously created with addLayer(). */ + void deleteLayer(GrassLayer *layer); + /** \brief Returns a list of added grass layers. This function returns a std::list<GrassLayer*> reference, which contains all grass Modified: trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp =================================================================== --- trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -274,7 +274,7 @@ if (bbset->getBillboardOrigin() == BBO_CENTER) entityBBCenter = tex->entityCenter; else if (bbset->getBillboardOrigin() == BBO_BOTTOM_CENTER) - entityBBCenter = Vector3(tex->entityCenter.x, -tex->entityCenter.y, tex->entityCenter.z); + entityBBCenter = Vector3(tex->entityCenter.x, tex->entityCenter.y - tex->entityRadius, tex->entityCenter.z); } //------------------------------------------------------------------------------------- Modified: trunk/python-ogre/ThirdParty/forests/ImpostorPage.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/ImpostorPage.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/forests/ImpostorPage.h 2008-01-12 06:01:54 UTC (rev 539) @@ -86,7 +86,7 @@ will be stored in a single texture (8 x 4), so a impostor resolution of 128, for example, results in final texture size of 1024 x 512. - \note Calling this function will have no effect unless it is done before + \warning Calling this function will have no effect unless it is done before any entities are added to any page. */ static void setImpostorResolution(int pixels) { impostorResolution = pixels; } @@ -104,7 +104,7 @@ The default background color is ColourValue(0.0f, 0.3f, 0.0f, 0.0f), or dark green (this color was chosen because the main use of ImpostorPage is for trees, bushes, etc.) - \note Calling this function will have no effect unless it is done before + \warning Calling this function will have no effect unless it is done before any entities are added to any page. Also remember that you may have to delete the old impostor renders (located in your exe's directory) in order for the new ones to be generated. @@ -126,6 +126,9 @@ point of BBO_CENTER works best. \note Only BBO_CENTER and BBO_BOTTOM_CENTER is supported by this function currently. + + \warning Calling this function will have no effect unless it is done before + any entities are added to any page. */ static void setImpostorPivot(Ogre::BillboardOrigin origin); Modified: trunk/python-ogre/ThirdParty/forests/PagedGeometry.h =================================================================== --- trunk/python-ogre/ThirdParty/forests/PagedGeometry.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/forests/PagedGeometry.h 2008-01-12 06:01:54 UTC (rev 539) @@ -536,7 +536,7 @@ void reloadGeometryPage(const Ogre::Vector3 &point); - /** + /* \brief Immediately loads visible geometry. \param maxTime The maximum amount of time (in milliseconds) which cacheGeometry() is allowed to use before returning (roughly). Copied: trunk/python-ogre/ThirdParty/nxogreOld (from rev 538, trunk/python-ogre/ThirdParty/nxogre) Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -31,6 +31,8 @@ { // apply button ".down" texture SkinSet* ss = SkinSetManager::getSingleton().getSkinSet(mSkinName); + if(ss == NULL) + throw Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND,"Skin \"" + mSkinName + "\" does not exist! Did you forget to load it using the SkinSetManager?","Button::applyButtonDownTexture"); mQuad->setTextureCoordinates(ss->getTextureCoordinates(mSkinName + mSkinComponent + ".down" + ss->getImageExtension())); } @@ -38,12 +40,16 @@ { // apply button ".over" texture SkinSet* ss = SkinSetManager::getSingleton().getSkinSet(mSkinName); + if(ss == NULL) + throw Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND,"Skin \"" + mSkinName + "\" does not exist! Did you forget to load it using the SkinSetManager?","Button::applyButtonOverTexture"); mQuad->setTextureCoordinates(ss->getTextureCoordinates(mSkinName + mSkinComponent + ".over" + ss->getImageExtension())); } void Button::applyDefaultTexture() { SkinSet* ss = SkinSetManager::getSingleton().getSkinSet(mSkinName); + if(ss == NULL) + throw Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND,"Skin \"" + mSkinName + "\" does not exist! Did you forget to load it using the SkinSetManager?","Button::applyDefaultTexture"); mQuad->setTextureCoordinates(ss->getTextureCoordinates(mSkinName + mSkinComponent + ss->getImageExtension())); } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -88,18 +88,16 @@ { mScrollPane = dynamic_cast<ScrollPane*>(_createComponent(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE)); mScrollPane->setSize(mSize); -// mScrollPane->setHorizontalSliderMinWidth(20); -// mScrollPane->setVerticalSliderMinHeight(20); + mScrollPane->removeChild(mScrollPane->mRightBar); + // store reference to the scroll bar mRightScrollBar = mScrollPane->mRightBar; - if(mSkinName != "") - mRightScrollBar->setSkin(mSkinName,true); addChild(mRightScrollBar); mRightScrollBar->setPosition(mSize.width - 20,0); + mScrollPane->removeChild(mScrollPane->mBottomBar); + // store reference to the scroll bar mBottomScrollBar = mScrollPane->mBottomBar; - if(mSkinName != "") - mBottomScrollBar->setSkin(mSkinName,true); addChild(mBottomScrollBar); mBottomScrollBar->setPosition(0,mSize.height - 20); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -12,28 +12,27 @@ mActiveSheet(0), mWidgetContainingMouse(0), mActiveWidget(0), - mClickTimeout(75), mQueueID(Ogre::RENDER_QUEUE_OVERLAY), mMouseCursor(0), mSceneManager(0), mDraggingWidget(false), mDebugString(""), - mUseMouseTimer(false), - mMouseTimer(0), - mDoubleClickTime(700) + mDetermineClickEvents(true), + mClickTime(100), + mDoubleClickTime(400), + mTripleClickTime(400) { mSkinSetManager = SkinSetManager::getSingletonPtr(); mWidgetNames.clear(); - mMouseButtonDown[0] = NULL; - mMouseButtonDown[1] = NULL; - mMouseButtonDown[2] = NULL; - mMouseButtonDown[3] = NULL; - mMouseButtonDown[4] = NULL; - mMouseButtonDown[5] = NULL; - mMouseButtonDown[6] = NULL; - mMouseButtonDown[7] = NULL; + for(int i = 0; i < NUM_MOUSE_BUTTONS; ++i) + { + mMouseButtonDown[i] = NULL; + mTimeOfButtonDown[i] = 0; + mTimeOfClick[i] = 0; + mTimeOfDoubleClick[i] = 0; + } // by default, we support codepoints 9, and 32-166. mSupportedCodePoints.insert(9); @@ -71,60 +70,6 @@ mFreeList.push_back(w); } - void GUIManager::_handleMouseDown(const MouseButtonID& button) - { - MouseEventArgs args(mWidgetContainingMouse); - args.position = mMouseCursor->getPosition(); - args.button = button; - args.keyModifiers = mKeyModifiers; - - // Feature, allowing widgets to be clicked, without transferring focus. Widget will receive - // Mouse Button Down Event. - if(!mWidgetContainingMouse->getGainFocusOnClick()) - { - mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_BUTTON_DOWN,args); - } - - // mActiveWidget is the last widget the user clicked on, ie TextBox, ComboBox, etc. - if( mActiveWidget != mWidgetContainingMouse ) - { - mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args); - - // Update active widget reference. - mActiveWidget = mWidgetContainingMouse; - } - - args.widget = mActiveWidget; - args.position = mMouseCursor->getPosition(); - args.button = button; - - mActiveWidget->fireEvent(Widget::EVENT_MOUSE_BUTTON_DOWN,args); - mActiveWidget->fireEvent(Widget::EVENT_GAIN_FOCUS,args); - mActiveWidget->setGrabbed(true); - - // If the user clicked on a widget that is a part of a window, make sure the window is brought to front. - Window* w = mActiveWidget->getParentWindow(); - if( w != NULL ) - w->bringToFront(); - - // Record that the mouse button went down on this widget (non-window) - mMouseButtonDown[args.button] = mActiveWidget; - - mMouseButtonTimings[button] = mTimer->getMilliseconds(); - } - - void GUIManager::_handleMouseUp(const MouseButtonID& button) - { - } - - void GUIManager::_handleMouseClick(const MouseButtonID& button) - { - } - - void GUIManager::_handleMouseDoubleClick(const MouseButtonID& button) - { - } - void GUIManager::_menuOpened(Widget* w) { if(w == NULL) @@ -272,6 +217,11 @@ return mDefaultSheet; } + bool GUIManager::getDetermineClickEvents() + { + return mDetermineClickEvents; + } + MouseCursor* GUIManager::getMouseCursor() { return mMouseCursor; @@ -409,31 +359,67 @@ if( !mMouseCursor->isVisible() ) return false; - bool eventHandled = false; + mTimeOfButtonDown[button] = mTimer->getMilliseconds(); + if(mDetermineClickEvents) + { + if((mTimeOfButtonDown[button] - mTimeOfDoubleClick[button]) <= mTripleClickTime) + { + if(mMouseButtonDown[button] == mWidgetContainingMouse) + return injectMouseTripleClick(button); + } + if((mTimeOfButtonDown[button] - mTimeOfClick[button]) <= mDoubleClickTime) + { + if(mMouseButtonDown[button] == mWidgetContainingMouse) + return injectMouseDoubleClick(button); + } + } - _handleMouseDown(button); - /* - if(mMouseButtonEvents.empty()) + // If we make it here, a simple mouse button down has occurred. + + // Setup event args. + MouseEventArgs args(mWidgetContainingMouse); + args.position = mMouseCursor->getPosition(); + args.button = button; + args.keyModifiers = mKeyModifiers; + + // Feature, allowing widgets to be clicked, without transferring focus. Widget will receive + // Mouse Button Down Event. No widgets will gain or lose focus. + if(!mWidgetContainingMouse->getGainFocusOnClick()) + return mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_BUTTON_DOWN,args); + + bool eventHandlerFired = false; + + // See if focus has changed from one widget to another. + // mActiveWidget is the last widget the user clicked on, ie TextBox, ComboBox, etc. + if( mActiveWidget != mWidgetContainingMouse ) { - mMouseButtonEvents.push_back(Widget::EVENT_MOUSE_BUTTON_DOWN); - mUseMouseTimer = true; - mMouseTimer = 0; - mMouseButtonDown[button] = mWidgetContainingMouse; - return ((mWidgetContainingMouse->getNumberOfHandlers(Widget::EVENT_MOUSE_BUTTON_DOWN) > 0) || - (mWidgetContainingMouse->getNumberOfHandlers(Widget::EVENT_MOUSE_CLICK) > 0) || - (mWidgetContainingMouse->getNumberOfHandlers(Widget::EVENT_MOUSE_CLICK_DOUBLE) > 0)); + if(mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args)) + eventHandlerFired = true; + + // Update active widget reference. + mActiveWidget = mWidgetContainingMouse; } - if((mMouseButtonEvents.front() == Widget::EVENT_MOUSE_CLICK) && (mMouseButtonDown[button] != mWidgetContainingMouse)) - return false; + // Fire Gain Focus event. + if(mActiveWidget->fireEvent(Widget::EVENT_GAIN_FOCUS,args)) + eventHandlerFired = true; + mActiveWidget->setGrabbed(true); - if(mMouseButtonEvents.front() == Widget::EVENT_MOUSE_CLICK_DOUBLE) - return false; + if(mActiveWidget->fireEvent(Widget::EVENT_MOUSE_BUTTON_DOWN,args)) + eventHandlerFired = true; - mMouseButtonEvents.push_back(Widget::EVENT_MOUSE_BUTTON_DOWN); - */ + // If the user clicked on a widget that is a part of a window, make sure the window is brought to front. + Window* w = mActiveWidget->getParentWindow(); + if( w != NULL ) + { + w->bringToFront(); + eventHandlerFired = true; + } - return eventHandled; + // Record that the mouse button went down on this widget (non-window) + mMouseButtonDown[button] = mActiveWidget; + + return eventHandlerFired; } bool GUIManager::injectMouseButtonUp(const MouseButtonID& button) @@ -441,8 +427,6 @@ if( !mMouseCursor->isVisible() ) return false; - bool eventHandled = false; - MouseEventArgs args(mActiveWidget); args.position = mMouseCursor->getPosition(); args.button = button; @@ -453,51 +437,87 @@ { mDraggingWidget = false; mActiveWidget->setGrabbed(false); - eventHandled = mActiveWidget->fireEvent(Widget::EVENT_DROPPED,args); - return eventHandled; + return mActiveWidget->fireEvent(Widget::EVENT_DROPPED,args); } + bool eventHandled = false; + // Feature, allowing widgets to be clicked, without transfering focus. Widget will receive // Mouse Button Up and Click Events, if appropriate. if(!mWidgetContainingMouse->getGainFocusOnClick()) { if( mMouseButtonDown[args.button] == mWidgetContainingMouse ) { - eventHandled = mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_BUTTON_UP,args); - // check if time elapsed it within click time. - if( (mTimer->getMilliseconds() - mMouseButtonTimings[button]) < mClickTimeout ) - eventHandled = mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_CLICK,args); + if(mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_BUTTON_UP,args)) + eventHandled = true; + if(mDetermineClickEvents) + { + if((mTimer->getMilliseconds() - mTimeOfButtonDown[button]) <= mClickTime) + { + if(injectMouseClick(button)) + eventHandled = true; + } + } } return eventHandled; } // If the MouseButton was not pressed on this widget, do not register the button being released on the widget - if( mWidgetContainingMouse != mActiveWidget ) - { - if(mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args)) - eventHandled = true; + if( mWidgetContainingMouse != mActiveWidget ) + return mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args); - return eventHandled; - } - // after this point, we know that the user had mouse button down on this widget, and is now doing mouse button up - args.widget = mActiveWidget; - args.position = mMouseCursor->getPosition(); - args.button = button; - if(mActiveWidget->fireEvent(Widget::EVENT_MOUSE_BUTTON_UP,args)) eventHandled = true; mActiveWidget->setGrabbed(false); - // check if time elapsed it within click time. - if( (mTimer->getMilliseconds() - mMouseButtonTimings[button]) < mClickTimeout ) - if(mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_CLICK,args)) - eventHandled = true; + if(mDetermineClickEvents) + { + if((mTimer->getMilliseconds() - mTimeOfButtonDown[button]) <= mClickTime) + { + if(injectMouseClick(button)) + eventHandled = true; + } + } return eventHandled; } + bool GUIManager::injectMouseClick(const MouseButtonID& button) + { + mTimeOfClick[button] = mTimer->getMilliseconds(); + + MouseEventArgs args(mActiveWidget); + args.position = mMouseCursor->getPosition(); + args.button = button; + args.keyModifiers = mKeyModifiers; + + return mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_CLICK,args); + } + + bool GUIManager::injectMouseDoubleClick(const MouseButtonID& button) + { + mTimeOfDoubleClick[button] = mTimer->getMilliseconds(); + + MouseEventArgs args(mActiveWidget); + args.position = mMouseCursor->getPosition(); + args.button = button; + args.keyModifiers = mKeyModifiers; + + return mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_CLICK_DOUBLE,args); + } + + bool GUIManager::injectMouseTripleClick(const MouseButtonID& button) + { + MouseEventArgs args(mActiveWidget); + args.position = mMouseCursor->getPosition(); + args.button = button; + args.keyModifiers = mKeyModifiers; + + return mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_CLICK_TRIPLE,args); + } + bool GUIManager::injectMouseLeaves(void) { if( !mMouseCursor->isVisible() ) @@ -631,18 +651,6 @@ injectMouseMove(0,0); } - - if(mUseMouseTimer) - mMouseTimer += time; - - if(mMouseTimer >= mDoubleClickTime) - { - // handle events on stack - mMouseButtonEvents.clear(); - - mMouseTimer = 0; - mUseMouseTimer = false; - } } bool GUIManager::isKeyModifierDown(KeyModifier k) @@ -735,13 +743,13 @@ mActiveSheet = s; + MouseEventArgs args(mWidgetContainingMouse); + args.position = mMouseCursor->getPosition(); + // Make sure active widget loses focus. - mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,EventArgs()); + mActiveWidget->fireEvent(Widget::EVENT_LOSE_FOCUS,args); // Make sure mouse over widget has mouse leave event. - MouseEventArgs args(mWidgetContainingMouse); - args.position = mMouseCursor->getPosition(); - mWidgetContainingMouse->fireEvent(Widget::EVENT_MOUSE_LEAVE,args); // Update the active widget @@ -775,6 +783,11 @@ mDebugString = s; } + void GUIManager::setDetermineClickEvents(bool determine) + { + mDetermineClickEvents = determine; + } + void GUIManager::setRenderQueueID(Ogre::uint8 id) { mQueueID = id; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h 2008-01-12 06:01:54 UTC (rev 539) @@ -17,7 +17,6 @@ #include "QuickGUIUtility.h" #include <algorithm> -#include <deque> #include <list> #include <map> #include <set> @@ -97,6 +96,7 @@ * Returns the default sheet, automatically created with the GUI manager. */ Sheet* getDefaultSheet(); + bool getDetermineClickEvents(); MouseCursor* getMouseCursor(); Widget* getMouseOverWidget(); @@ -131,6 +131,9 @@ bool injectMouseButtonDown(const MouseButtonID& button); bool injectMouseButtonUp(const MouseButtonID& button); + bool injectMouseClick(const MouseButtonID& button); + bool injectMouseDoubleClick(const MouseButtonID& button); + bool injectMouseTripleClick(const MouseButtonID& button); /** * Injection when the mouse leaves the primary render window */ @@ -170,6 +173,7 @@ */ void setActiveWidget(Widget* w); void setDebugString(const Ogre::String s); + void setDetermineClickEvents(bool determine); /* * Sets the Render Queue Group to render on. By default, this is RENDER_QUEUE_OVERLAY. */ @@ -228,18 +232,21 @@ // list of widgets to delete on next frame. WidgetArray mFreeList; - bool mUseMouseTimer; - unsigned long mMouseTimer; - unsigned long mDoubleClickTime; - std::deque<Widget::Event> mMouseButtonEvents; + bool mDetermineClickEvents; + // timer used to get time readings. + Ogre::Timer* mTimer; + // Maximum number of milliseconds a click can be performed in. + unsigned long mClickTime; // time from mouse down to mouse up + unsigned long mDoubleClickTime; // time from mouse click to mouse down + unsigned long mTripleClickTime; // time from mouse double click to mouse down + // Store the last time a click was performed. + unsigned long mTimeOfButtonDown[NUM_MOUSE_BUTTONS]; + unsigned long mTimeOfClick[NUM_MOUSE_BUTTONS]; + unsigned long mTimeOfDoubleClick[NUM_MOUSE_BUTTONS]; - // timer used to get time readings - Ogre::Timer* mTimer; - unsigned long mClickTimeout; // max number of milliseconds a click can be performed in - unsigned long mMouseButtonTimings[8]; // Keep track of mouse button down/up and on what widget. This prevents left mouse button down on button A, // moving the mouse to button B, and releasing the left mouse button, causing button B to be pressed. (example) - Widget* mMouseButtonDown[8]; + Widget* mMouseButtonDown[NUM_MOUSE_BUTTONS]; Widget* mWidgetContainingMouse; // Stores reference to last clicked Widget. @@ -266,11 +273,6 @@ GUIManager(const Ogre::String& name, Ogre::Viewport* vp); /** Standard Destructor. */ ~GUIManager(); - - void _handleMouseDown(const MouseButtonID& button); - void _handleMouseUp(const MouseButtonID& button); - void _handleMouseClick(const MouseButtonID& button); - void _handleMouseDoubleClick(const MouseButtonID& button); }; } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h 2008-01-12 06:01:54 UTC (rev 539) @@ -2,6 +2,9 @@ #define QUICKGUIMOUSEBUTTONID_H #include "QuickGUIPrerequisites.h" + +#define NUM_MOUSE_BUTTONS (MB_Button7 + 1) + namespace QuickGUI { /* Copied from OISMouse.h */ Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -127,13 +127,15 @@ mScrollPane = dynamic_cast<ScrollPane*>(_createComponent(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE)); mScrollPane->setSize(mSize); + mScrollPane->removeChild(mScrollPane->mRightBar); + // store reference to the scroll bar mRightScrollBar = mScrollPane->mRightBar; - mRightScrollBar->setSkin(mSkinName,true); addChild(mRightScrollBar); mRightScrollBar->setPosition(mSize.width - 20,0); + mScrollPane->removeChild(mScrollPane->mBottomBar); + // store reference to the scroll bar mBottomScrollBar = mScrollPane->mBottomBar; - mBottomScrollBar->setSkin(mSkinName,true); addChild(mBottomScrollBar); mBottomScrollBar->setPosition(0,mSize.height - 20); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -32,9 +32,15 @@ mClippingWidget(NULL), mInheritClippingWidget(true), mInheritQuadLayer(true), - mShowWithOwner(true) + mShowWithOwner(true), + mDirectXUsed(false) { mRenderSystem = Ogre::Root::getSingleton().getRenderSystem(); + + // Determine if dirext X renderer used. + if(mRenderSystem->getName().find("Direct") != Ogre::String::npos) + mDirectXUsed = true; + _updateVertexColor(); } @@ -519,8 +525,22 @@ void Quad::setTextureCoordinates(const Ogre::Vector4& textureCoordinates) { - mTextureCoordinates = textureCoordinates; + // DirectX interprets UV coords from a different location than OpenGL, so + // we have to modify the coordinates to get the same results. +/* if(mDirectXUsed) + { + Ogre::Real xVal = 0.5 / mPixelDimensions.width; + Ogre::Real yVal = 0.5 / mPixelDimensions.height; + mTextureCoordinates = Ogre::Vector4( + textureCoordinates.x + xVal, + textureCoordinates.y + yVal, + textureCoordinates.z + xVal, + textureCoordinates.w + yVal); + } + else */ + mTextureCoordinates = textureCoordinates; + mTextureCoordsChanged = true; _clip(); Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h 2008-01-12 06:01:54 UTC (rev 539) @@ -104,6 +104,7 @@ GUIManager* mGUIManager; QuadContainer* mQuadContainer; Ogre::RenderSystem* mRenderSystem; + bool mDirectXUsed; Layer mLayer; bool mInheritQuadLayer; Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -129,7 +129,7 @@ q->_notifyAddedToRenderObjectGroup(); mMenuChanged = true; -/* + // check if buffer needs to be resized. const size_t numQuads = static_cast<size_t>(mMenuRenderables.size()); const size_t numVertices = numQuads * VERTICES_PER_QUAD; @@ -144,7 +144,6 @@ mMenuBufferSize.pop_back(); mMenuVertexBuffer->resizeVertexBuffer(mMenuBufferSize.back()); } - */ } int QuadContainer::getOffset() Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h 2008-01-12 06:01:54 UTC (rev 539) @@ -13,7 +13,7 @@ #include <vector> //vertices per quad = 25 quads initially -#define MIN_VERTEX_BUFFER_SIZE (250*VERTICES_PER_QUAD) +#define MIN_VERTEX_BUFFER_SIZE (25*VERTICES_PER_QUAD) namespace QuickGUI { Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -26,7 +26,6 @@ mBottomBar->setVerticalAnchor(ANCHOR_VERTICAL_BOTTOM); mBottomBar->setShowWithParent(false); mBottomBar->addOnScrollEventHandler(&ScrollPane::onHorizontalScroll,this); - removeChild(mBottomBar); mRightBar = dynamic_cast<VerticalScrollBar*>(_createChild(mInstanceName+".RightScrollBar",TYPE_SCROLLBAR_VERTICAL)); mRightBar->setSize(20,mSize.height - 20); @@ -37,7 +36,6 @@ mRightBar->setVerticalAnchor(ANCHOR_VERTICAL_TOP_BOTTOM); mRightBar->setShowWithParent(false); mRightBar->addOnScrollEventHandler(&ScrollPane::onVerticalScroll,this); - removeChild(mRightBar); } ScrollPane::~ScrollPane() Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -282,7 +282,7 @@ _setCaptionVertical(mCaption); // Make sure the caption matches the visibly displayed text! - mCaption.erase(static_cast<Ogre::UTFString::size_type>(mCharacters.size())); + //mCaption.erase(static_cast<Ogre::UTFString::size_type>(mCharacters.size())); _calculateDimensions(); @@ -560,7 +560,8 @@ // Invert colors of selected characters, and make sure non selected characters are // appropriately colored. - for(unsigned int index = 0; index < mCaption.length(); ++index ) + unsigned int index; + for( index = 0; index < static_cast<unsigned int>(mCharacters.size()); ++index ) { if( (static_cast<int>(index) >= mSelectStart) && (static_cast<int>(index) <= mSelectEnd) ) mCharacters[index]->setColor(mSelectColor); @@ -570,12 +571,22 @@ // set dimensions of background selection quad. Rect dimensions; - Quad* q = mCharacters[mSelectStart]; + + Quad* q; + + // Get the dimensions of the starting position of the selection quad. + q = mCharacters[mSelectStart]; dimensions.x = q->getPosition().x; dimensions.y = q->getPosition().y; - q = mCharacters[mSelectEnd]; + + // Get the dimensions of the ending position of the selection quad. + if(mSelectEnd >= static_cast<int>(mCharacters.size())) + q = mCharacters[index - 1]; + else + q = mCharacters[mSelectEnd]; dimensions.width = (q->getPosition().x + q->getSize().width) - dimensions.x; dimensions.height = (q->getPosition().y + q->getSize().height) - dimensions.y; + mCharacterBackground->setDimensions(dimensions); mCharacterBackground->setVisible(true); } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -224,7 +224,6 @@ // nfz: set up multipass rendering mRenderSystem->setCurrentPassIterationCount(pass->getPassIterationCount()); - //mRenderSystem->_setTexture(0,true,"Examples/Rockwall"); mRenderSystem->_render(mRenderOperation); } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -772,6 +772,15 @@ return mPosition.y; } + bool Widget::hasMouseButtonHandlers() + { + return !(mUserEventHandlers[EVENT_MOUSE_BUTTON_DOWN].empty() && + mUserEventHandlers[EVENT_MOUSE_BUTTON_UP].empty() && + mUserEventHandlers[EVENT_MOUSE_CLICK].empty() && + mUserEventHandlers[EVENT_MOUSE_CLICK_DOUBLE].empty() && + mUserEventHandlers[EVENT_MOUSE_CLICK_TRIPLE].empty()); + } + void Widget::hide() { mGrabbed = false; @@ -1255,10 +1264,19 @@ { SkinSet* ss = SkinSetManager::getSingleton().getSkinSet(skinName); if(ss == NULL) - throw Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND,"Skin \"" + skinName + "\" does not exist! Did you forget to load it using the SkinSetManager?","Widget::setSkin"); + throw Ogre::Exception(Ogre::Exception::ERR_ITEM_NOT_FOUND,"Skin \"" + skinName + "\" does not exist! Did you forget to load it using the SkinSetManager?","Widget::setSkin"); + for(WidgetArray::iterator it = mComponents.begin(); it != mComponents.end(); ++it) + (*it)->setSkin(skinName,true); + + if(recursive) + { + for(WidgetArray::iterator it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it) + (*it)->setSkin(skinName,recursive); + } + + // Update reference to skin mSkinName = skinName; - Ogre::String textureName = mSkinName + mSkinComponent + ss->getImageExtension(); if(!ss->containsImage(textureName)) @@ -1276,15 +1294,6 @@ mWidgetImage = new Ogre::Image(i); } - for(WidgetArray::iterator it = mComponents.begin(); it != mComponents.end(); ++it) - (*it)->setSkin(skinName,true); - - if(recursive) - { - for(WidgetArray::iterator it = mChildWidgets.begin(); it != mChildWidgets.end(); ++it) - (*it)->setSkin(skinName,recursive); - } - if(mHideSkin) hideSkin(); } Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h 2008-01-12 06:01:54 UTC (rev 539) @@ -92,6 +92,7 @@ EVENT_MOUSE_BUTTON_UP , EVENT_MOUSE_CLICK , EVENT_MOUSE_CLICK_DOUBLE , + EVENT_MOUSE_CLICK_TRIPLE , EVENT_MOUSE_ENTER , EVENT_MOUSE_LEAVE , EVENT_MOUSE_MOVE , @@ -315,6 +316,7 @@ Ogre::Real getWidth(); Ogre::Real getXPosition(); Ogre::Real getYPosition(); + bool hasMouseButtonHandlers(); /** * Sets mVisible to false. Widgets should override this to implement how they handle * hiding. Modified: trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp =================================================================== --- trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp 2008-01-12 06:01:54 UTC (rev 539) @@ -46,10 +46,14 @@ mScrollPane = dynamic_cast<ScrollPane*>(_createChild(mInstanceName+".ScrollPane",TYPE_SCROLL_PANE)); mScrollPane->setSize(mSize); + mScrollPane->removeChild(mScrollPane->mRightBar); + // store reference to the scroll bar mRightScrollBar = mScrollPane->mRightBar; addChild(mRightScrollBar); mRightScrollBar->setPosition(mSize.width - 20,0); + mScrollPane->removeChild(mScrollPane->mBottomBar); + // store reference to the scroll bar mBottomScrollBar = mScrollPane->mBottomBar; addChild(mBottomScrollBar); mBottomScrollBar->setPosition(0,mSize.height - 20); Modified: trunk/python-ogre/code_generators/et/python_et_aliases.h =================================================================== --- trunk/python-ogre/code_generators/et/python_et_aliases.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/et/python_et_aliases.h 2008-01-12 06:01:54 UTC (rev 539) @@ -1,5 +1,4 @@ - - +typedef std::string String; typedef std::map<std::string, std::string> MapStringString; typedef std::pair<float, float> StdPairFloatFloat; @@ -20,8 +19,8 @@ //typedef std::vector<Ogre::Image> ImageList; //3 -typedef ET::ColourList ColourList; -typedef ET::ImageList ImageList; +// typedef ET::ColourList ColourList; +// typedef ET::ImageList ImageList; // these are uglys to remove messages in the generate_code output - doesn't impact the generated code :) //typedef std::vector<Ogre::Image> ImageList; Modified: trunk/python-ogre/code_generators/navi/python_navi_aliases.h =================================================================== --- trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/navi/python_navi_aliases.h 2008-01-12 06:01:54 UTC (rev 539) @@ -1,3 +1,4 @@ +typedef std::string String; typedef NaviLibrary::NaviUtilities::InlineVector<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >\ InlineVectorString; typedef std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > >\ Modified: trunk/python-ogre/code_generators/ogreode/python_ogreode_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ogreode/python_ogreode_aliases.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/ogreode/python_ogreode_aliases.h 2008-01-12 06:01:54 UTC (rev 539) @@ -1,5 +1,6 @@ // #include "../ogre/python_ogre_aliases.h" +typedef std::string String; typedef std::list<Ogre::Plane> StdListPlane; typedef std::map< std::string, std::string > StdMapStringString; typedef std::vector< std::string > StdVectorString; Modified: trunk/python-ogre/code_generators/ois/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/ois/generate_code.py 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/ois/generate_code.py 2008-01-12 06:01:54 UTC (rev 539) @@ -80,6 +80,9 @@ main_ns = global_ns.namespace( MAIN_NAMESPACE ) else: main_ns = global_ns + mb.class_( "Mouse" ).member_function( "getMouseState" ).call_policies =\ + call_policies.return_value_policy( call_policies.reference_existing_object ) + ############################################################ ## Modified: trunk/python-ogre/code_generators/ois/python_ois_aliases.h =================================================================== --- trunk/python-ogre/code_generators/ois/python_ois_aliases.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/ois/python_ois_aliases.h 2008-01-12 06:01:54 UTC (rev 539) @@ -1,4 +1,5 @@ // placeholder for any aliaiss that are needed +typedef std::string String; typedef OIS::ParamList ParamList; typedef std::vector<OIS::Axis> AxisVector; //typedef OIS::SupportedEffectList SupportedEffectList; Modified: trunk/python-ogre/code_generators/quickgui/generate_code.py =================================================================== --- trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/quickgui/generate_code.py 2008-01-12 06:01:54 UTC (rev 539) @@ -96,6 +96,7 @@ ,'::QuickGUI::VerticalScrollBar::getScrollButtonSize' ,'::QuickGUI::Effect::linearInterpolate' ,'::QuickGUI::SkinSet::buildTextureCoordinates' ## has a vector that isn't being exposed correctly + ,'::QuickGUI::Console::setReadOnly' ] for e in excludes: print "excluding function", e Modified: trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h =================================================================== --- trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h 2008-01-12 06:01:54 UTC (rev 539) @@ -1,4 +1,5 @@ // typedef name nicename; +typedef std::string String; typedef std::vector<QuickGUI::Widget*, std::allocator<QuickGUI::Widget*> > VectorWidget; typedef std::vector<unsigned short, std::allocator<unsigned short> > VectorShort; //typedef std::vector<Ogre::Image> VectorImage; Modified: trunk/python-ogre/demos/ogre/Demo_Water.py =================================================================== --- trunk/python-ogre/demos/ogre/Demo_Water.py 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/demos/ogre/Demo_Water.py 2008-01-12 06:01:54 UTC (rev 539) @@ -17,10 +17,8 @@ sys.path.insert(0,'..') import PythonOgreConfig -#include "ExampleApplication.h" import ogre.renderer.OGRE as Ogre import ogre.io.OIS as OIS -#import WaterMesh as WaterMesh import ogre.addons.watermesh as WaterMesh import math import SampleFramework as sf @@ -255,18 +253,17 @@ class WaterListener(sf.FrameListener): def processcircles(self,timeSinceLastFrame): - for i in self.circles : i.animate(timeSinceLastFrame) found = False -# while not found: - for count in range (len(self.circles)): - if self.circles[count].lvl >= 16: - c = self.circles[count] - del self.circles[count] - del c - found = True - break + while not found: + for count in range (len(self.circles)): + if self.circles[count].lvl >= 16: + c = self.circles[count] + del self.circles[count] + del c + found = True + break # # # do : # # # found = False @@ -611,9 +608,9 @@ # ## Create new frame listener def _createFrameListener(self): - self.frameListener = WaterListener(self.renderWindow, self.camera, - self.WaterMesh, self.waterEntity, self) - self.root.addFrameListener(self.frameListener) + self.frameListener = WaterListener(self.renderWindow, self.camera, + self.WaterMesh, self.waterEntity, self) + self.root.addFrameListener(self.frameListener) Modified: trunk/python-ogre/demos/ogre/plugins.cfg =================================================================== --- trunk/python-ogre/demos/ogre/plugins.cfg 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/demos/ogre/plugins.cfg 2008-01-12 06:01:54 UTC (rev 539) @@ -2,18 +2,19 @@ ## Use this for Windows # Define plugin folder -PluginFolder=/home/andy/development/root/usr/lib/OGRE -#Plugin=RenderSystem_GL.dll -#Plugin=RenderSystem_Direct3D9.dll -#Plugin=Plugin_ParticleFX.dll -#Plugin=Plugin_BSPSceneManager.dll -#Plugin=Plugin_OctreeSceneManager.dll -#Plugin=Plugin_CgProgramManager.dll +PluginFolder=../../plugins +#home/andy/development/root/usr/lib/OGRE +Plugin=RenderSystem_GL.dll +Plugin=RenderSystem_Direct3D9.dll +Plugin=Plugin_ParticleFX.dll +Plugin=Plugin_BSPSceneManager.dll +Plugin=Plugin_OctreeSceneManager.dll +Plugin=Plugin_CgProgramManager.dll ## ## NOTE use this for MacOS or Linux - Plugin=RenderSystem_GL - Plugin=Plugin_ParticleFX - Plugin=Plugin_BSPSceneManager - Plugin=Plugin_OctreeSceneManager - Plugin=Plugin_CgProgramManager +# Plugin=RenderSystem_GL +# Plugin=Plugin_ParticleFX +# Plugin=Plugin_BSPSceneManager +# Plugin=Plugin_OctreeSceneManager +# Plugin=Plugin_CgProgramManager Modified: trunk/python-ogre/scripts/updatesource.bat =================================================================== --- trunk/python-ogre/scripts/updatesource.bat 2008-01-11 00:08:48 UTC (rev 538) +++ trunk/python-ogre/scripts/updatesource.bat 2008-01-12 06:01:54 UTC (rev 539) @@ -4,7 +4,7 @@ set _CVS="c:\Program Files\cvsnt\cvs.exe" set _VCBUILD="c:\Program Files\Microsoft Visual Studio 8\vc\vcpackages\vcbuild.exe" set _ROOT=c:\development -set _TP=c:\development\pywork\ThirdParty +set _TP=c:\development\python-ogre\ThirdParty cd %_ROOT%\ogrenew %_CVS% up This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |