示例#1
0
        /** Constructor
         *  @param
         *      RenderWindowWidth Width of the primary render window in Pixels.
         *  @param
         *      RenderWindowHeight Height of the primary render window in Pixels.
         */
        public GUIManager(uint RenderWindowWidth, uint RenderWindowHeight)
        {
            mRenderWindowWidth     = (int)RenderWindowWidth;
            mRenderWindowHeight    = (int)RenderWindowHeight;
            mMouseCursor           = null;
            mActiveSheet           = null;
            mWidgetContainingMouse = null;
            mActiveWidget          = null;
            mClickTimeout          = 1;
            mAutoNameSheetCounter  = 0;

            mGUIRenderer = null;//QuickGUIRenderer.Singleton;
            mWidgetNames.Clear();

            mMouseButtonDown[MouseButtonID.MB_Left]    = null;
            mMouseButtonDown[MouseButtonID.MB_Middle]  = null;
            mMouseButtonDown[MouseButtonID.MB_Right]   = null;
            mMouseButtonDown[MouseButtonID.MB_Button3] = null;
            mMouseButtonDown[MouseButtonID.MB_Button4] = null;
            mMouseButtonDown[MouseButtonID.MB_Button5] = null;
            mMouseButtonDown[MouseButtonID.MB_Button6] = null;
            mMouseButtonDown[MouseButtonID.MB_Button7] = null;

            mDefaultSheet = null;
            mActiveSheet  = mDefaultSheet;
            instance      = this;
        }
示例#2
0
        /**
         * Iterates through Window List and destroys it, which properly destroys all child widgets.
         * NOTE: mouse cursor object is also destroyed.
         */
        void clearAll()
        {
            mWidgetNames.Clear();

            mMouseButtonDown[MouseButtonID.MB_Left]    = null;
            mMouseButtonDown[MouseButtonID.MB_Middle]  = null;
            mMouseButtonDown[MouseButtonID.MB_Right]   = null;
            mMouseButtonDown[MouseButtonID.MB_Button3] = null;
            mMouseButtonDown[MouseButtonID.MB_Button4] = null;
            mMouseButtonDown[MouseButtonID.MB_Button5] = null;
            mMouseButtonDown[MouseButtonID.MB_Button6] = null;
            mMouseButtonDown[MouseButtonID.MB_Button7] = null;
            mWidgetContainingMouse = null;
            mActiveWidget          = null;

            //std::list<Sheet*>::iterator it;
            //for( it = mSheets.begin(); it != mSheets.end(); ++it )
            //	delete (*it); // GDZ
            mSheets.Clear();

            // reset counter
            mAutoNameSheetCounter = 0;
            // create default sheet
            mDefaultSheet = null;
            mActiveSheet  = mDefaultSheet;

            mGUIRenderer = null;

            destroyMouseCursor();
        }