Beispiel #1
0
        public static void CreateFancySliderFloat(this IGuiElementGroup group,
                                                  string label, float min, float max, float snap, Action <float> valueChange, Func <float> updateValue)
        {
            var slider = new FancySliderFloat(label, min, max, snap, valueChange, updateValue);

            group.Add(slider);
        }
Beispiel #2
0
        public static void CreateToggle(this IGuiElementGroup group,
                                        string label, Action <bool> valueChanged, Func <bool> updateValue)
        {
            var toggle = new Toggle(label, valueChanged, updateValue);

            group.Add(toggle);
        }
Beispiel #3
0
 private static void RegisterQualityControls(IGuiElementGroup elementGroup)
 {
     elementGroup.CreateFancySliderInt("Quality Level", 0, QualityLevelNames.Length - 1, 1,
                                       QualitySettings.SetQualityLevel,
                                       QualitySettings.GetQualityLevel
                                       );
 }
Beispiel #4
0
 public static IGuiElementGroup GetOrCreateGroup(this IGuiElementGroup group, string label)
 {
     if (group.TryGetNamedElement <GuiGroup> (label, out var elementGroup))
     {
         return(elementGroup);
     }
     return(group.CreateGroup(label));
 }
Beispiel #5
0
        public static IGuiElementGroup CreateGroup(this IGuiElementGroup group, string label)
        {
            var elementGroup = new GuiGroup(label);

            group.Add(elementGroup);

            return(elementGroup);
        }
Beispiel #6
0
        public static void CreateLabel(this IGuiElementGroup group, string label)
        {
            var l = new LabelField(label);

            group.Add(l);
        }
Beispiel #7
0
        public static void CreateDropDown(this IGuiElementGroup group, string label, string[] options)
        {
            var dropDown = new DropDown(label, options);

            group.Add(dropDown);
        }
Beispiel #8
0
        public static void CreateButton(this IGuiElementGroup group, string label, Action pressed)
        {
            var button = new Button(label, pressed);

            group.Add(button);
        }