aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS.WinForms/Applications/Shifter.cs
diff options
context:
space:
mode:
authorpfg <[email protected]>2017-03-12 09:45:11 -0700
committerpfg <[email protected]>2017-03-12 09:45:11 -0700
commit5ee6043b9ea5baef45c08b5fb92fdebadd610dc0 (patch)
tree947cffe3f4693f9559cc7aaf5a2f3500e23f2b53 /ShiftOS.WinForms/Applications/Shifter.cs
parent6460ccee378e15408768337dcdc1bc77da07da53 (diff)
parent11da99a43bb3225ebd5fc82cb4765309804f8eba (diff)
downloadshiftos_thereturn-5ee6043b9ea5baef45c08b5fb92fdebadd610dc0.tar.gz
shiftos_thereturn-5ee6043b9ea5baef45c08b5fb92fdebadd610dc0.tar.bz2
shiftos_thereturn-5ee6043b9ea5baef45c08b5fb92fdebadd610dc0.zip
Command theming complete
Diffstat (limited to 'ShiftOS.WinForms/Applications/Shifter.cs')
-rw-r--r--ShiftOS.WinForms/Applications/Shifter.cs28
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())