Beispiel #1
0
 public static void DropdownMenuScrollable(GUIBase baseGUI, SmartRect rect, Setting <int> selection, string[] selections, int showItems, bool move = true)
 {
     if (Button(rect, selections[selection.Value], false))
     {
         ScrollableDropdownSelection.CreateNew(baseGUI, rect.ToRect(), selections, selection, showItems);
     }
     if (move)
     {
         rect.MoveY();
     }
 }
Beispiel #2
0
 public static void DropdownMenuScrollable(GUIBase baseGUI, SmartRect rect, Setting <int> selection, string[] selections, string label, float horizontalOffest, int showItems, bool move = true)
 {
     Label(rect, label, false);
     rect.MoveOffsetX(horizontalOffest);
     if (Button(rect, selections[selection.Value], false))
     {
         ScrollableDropdownSelection.CreateNew(baseGUI, rect.ToRect(), selections, selection, showItems);
     }
     rect.ResetX();
     if (move)
     {
         rect.MoveY();
     }
 }