Esempio n. 1
0
        public static bool Begin(string Name, out bool OpenButton)
        {
            Window w = GlobalContext.GetOrCreateWindow(Name);

            GlobalContext.WindowStack.Push(w);

            bool FirstBeginOfFrame = w.LastActiveFrame != GlobalContext.FrameCount;

            if (FirstBeginOfFrame)
            {
                w.LastActiveFrame = GlobalContext.FrameCount;
            }

            if (GlobalContext.NextWindow.NextWindowFlags.HasFlag(ENextWindowFlags.HasPosition))
            {
            }

            //TODO: Appearing, Focus, etc

            //Initialize this window if it's the first time we are begining this window this frame
            if (FirstBeginOfFrame)
            {
                InitWindowForFrame(w);

                //TODO: Size this window to content from last frame
                //For now, just use the default size

                Rectangle OuterRectable = w.Rect;


                w.SizeFull = /*GlobalContext.CurrentStyle.WindowMinSize*/ new System.Numerics.Vector2(100, 100);
                w.Size     = w.SizeFull;

                DrawWindowDecorations(w);
            }


            GlobalContext.ConsumeNextWindowData();
            OpenButton = true;
            return(true);
        }