예제 #1
0
        internal void BeginGroup(string Title, float CursorX)
        {
            var LayoutContext = LGuiLayout.GetCurrentLayoutContext();

            GroupStack.Push(new LGuiGroupContext(Title, LayoutContext.CursorPos.X, LayoutContext.BeginCursorPos.X));
            LGuiContext.PushID(LGuiHash.CalculateID(Title));

            LayoutContext.BeginCursorPos.X = CursorX;
            LayoutContext.CursorPos.X      = CursorX;
        }
예제 #2
0
        internal void EndGroup()
        {
            if (GroupStack.Count > 0)
            {
                LGuiContext.PopID();
                var Context       = GroupStack.Pop();
                var LayoutContext = LGuiLayout.GetCurrentLayoutContext();

                LayoutContext.BeginCursorPos.X = Context.PreviousBeginCursorX;
                LayoutContext.CursorPos.X      = Context.PreviousCursorX;
            }
        }
예제 #3
0
 public static LGuiVec2 GetCursorPos()
 {
     return(LGuiLayout.GetCurrentLayoutContext().CursorPos);
 }