Initialize() public method

Parses a UI script and walks the generated AST.
public Initialize ( string Path ) : void
Path string The path to the script.
return void
Exemplo n.º 1
0
        /// <summary>
        /// Creates a new UIScreen instance.
        /// </summary>
        /// <param name="Manager">A ScreenManager instance.</param>
        /// <param name="Name">The name of this UIScreen instance.</param>
        /// <param name="SBatch">A SpriteBatch instance.</param>
        /// <param name="ScreenPosition">Position of this UIScreen instance.</param>
        /// <param name="ScreenSize">Size of this UIScreen instance.</param>
        /// <param name="UIScriptPath">Path of script (*.uis) from which to create UI elements.</param>
        public UIScreen(ScreenManager Manager, string Name, SpriteBatch SBatch, 
            Vector2 ScreenPosition, Vector2 ScreenSize, string UIScriptPath = "")
        {
            m_Manager = Manager;

            m_SBatch = SBatch;
            Position = ScreenPosition;
            m_Size = ScreenSize;

            m_Walker = new TreeWalker(this);

            if (UIScriptPath != "")
                m_Walker.Initialize(UIScriptPath);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Creates a new UIScreen instance.
        /// </summary>
        /// <param name="Manager">A ScreenManager instance.</param>
        /// <param name="Name">The name of this UIScreen instance.</param>
        /// <param name="SBatch">A SpriteBatch instance.</param>
        /// <param name="ScreenPosition">Position of this UIScreen instance.</param>
        /// <param name="ScreenSize">Size of this UIScreen instance.</param>
        /// <param name="UIScriptPath">Path of script (*.uis) from which to create UI elements.</param>
        public UIScreen(ScreenManager Manager, string Name, SpriteBatch SBatch,
                        Vector2 ScreenPosition, Vector2 ScreenSize, string UIScriptPath = "")
        {
            m_Manager = Manager;

            m_SBatch = SBatch;
            Position = ScreenPosition;
            m_Size   = ScreenSize;

            m_Walker = new TreeWalker(this);

            if (UIScriptPath != "")
            {
                m_Walker.Initialize(UIScriptPath, ref m_PResult);
            }
        }