diff options
Diffstat (limited to 'ShiftOS.WinForms/Applications/Shifter.cs')
| -rw-r--r-- | ShiftOS.WinForms/Applications/Shifter.cs | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/ShiftOS.WinForms/Applications/Shifter.cs b/ShiftOS.WinForms/Applications/Shifter.cs index 9a9b4ad..02e2d0a 100644 --- a/ShiftOS.WinForms/Applications/Shifter.cs +++ b/ShiftOS.WinForms/Applications/Shifter.cs @@ -32,7 +32,9 @@ using System.Windows.Forms; using ShiftOS.Engine; using ShiftOS.WinForms.Tools; -namespace ShiftOS.WinForms.Applications { +namespace ShiftOS.WinForms.Applications +{ + [MultiplayerOnly] [Launcher("Shifter", true, "al_shifter", "Customization")] [RequiresUpgrade("shifter")] [WinOpen("shifter")] @@ -439,6 +441,30 @@ namespace ShiftOS.WinForms.Applications { flbody.Controls.Add(color); color.Show(); } + else if(c.Field.FieldType.IsEnum == true) + { + var cBox = new ComboBox(); + cBox.Width = 150; + ControlManager.SetupControl(cBox); + + foreach(var itm in Enum.GetNames(c.Field.FieldType)) + { + cBox.Items.Add(itm); + } + + cBox.Text = c.Field.GetValue(LoadedSkin).ToString(); + + cBox.SelectedIndexChanged += (o, a) => + { + c.Field.SetValue(LoadedSkin, Enum.Parse(c.Field.FieldType, cBox.Text)); + }; + + labelHeight = cBox.Height; + + flbody.Controls.Add(cBox); + cBox.Show(); + flbody.SetFlowBreak(cBox, true); + } else if(c.Field.FieldType == typeof(int)) { if (c.Field.HasShifterEnumMask()) |
