Esempio n. 1
0
        //=========================================================================================
        /// <summary> 
        /// Constructor for the gui. Initialises the basic gui data structures and objects.
        /// </summary>
        //=========================================================================================
        public Gui()
        {
            // Create all required objects:

            m_data = new GuiData(this); m_search = new GuiSearchQuery(this);

            // Get previous keyboard and gamepad state:

            m_previous_gamepad_state    = GamePad.GetState(PlayerIndex.One);
            m_previous_keyboard_state   = Keyboard.GetState();

            // If debug then initialise debug gui stuff:

            #if DEBUG

                DebugGui.Initialize();

            #endif
        }
Esempio n. 2
0
        //=========================================================================================
        /// <summary> 
        /// Clears the gui. This should be used as opposed to manually clearing gui data 
        /// when a level-wipe is required.
        /// </summary>
        //=========================================================================================
        public void Clear()
        {
            // Recreate all objects and override the old ones:

            m_data = new GuiData(this); m_search = new GuiSearchQuery(this);

            // Clear the curretnly focused widget:

            m_focus_widget = null;
        }