public void Load(DualAxis data) { current = data; SubscribeExecutionTypeSet(); SetExecutionTypeView(); }
private static void CreateJoystickParts <T1, T2>(out List <T2> list, bool btns) where T2 : JoystickPart { T1[] values = (T1[])Enum.GetValues(typeof(T1)); list = new List <T2>(values.Length); for (int i = 0; i < values.Length; i++) { if (btns) { Button btn = new Button(); btn.type = (Button.Type)(object) values[i]; list.Add((T2)(object)btn); } else { DualAxis axis = new DualAxis(); axis.type = (DualAxis.Type)(object) values[i]; list.Add((T2)(object)axis); } } }