public static Texture2D GetSubIcon(ControlType type) { switch (type) { case ControlType.Button: return(null); case ControlType.Toggle: return(ModuleVrc3Styles.Toggle); case ControlType.SubMenu: return(ModuleVrc3Styles.Option); case ControlType.TwoAxisPuppet: return(ModuleVrc3Styles.TwoAxis); case ControlType.FourAxisPuppet: return(ModuleVrc3Styles.FourAxis); case ControlType.RadialPuppet: return(ModuleVrc3Styles.Radial); default: throw new ArgumentOutOfRangeException(nameof(type), type, null); } }
internal RadialMenuDynamic(string name, Texture2D icon, ControlType type, float activeValue) : base(name, icon, RadialMenuUtility.GetSubIcon(type)) { Type = type; ActiveValue = activeValue; _dynamicType = GetDynamicType(); _instance = _dynamicType != DynamicType.None; }
public RadialMenuControl(RadialMenu menu, string name, Texture2D icon, ControlType type, float activeValue, Vrc3Param param, Vrc3Param[] subParams, VRCExpressionsMenu subMenu, VRCExpressionsMenu.Control.Label[] subLabels) : base(name, icon, type, activeValue) { _menu = menu; _subMenu = subMenu; _parameter = param; _subLabels = subLabels; _subParameters = subParams; if (_parameter == null && _subParameters.All(vrc3Param => vrc3Param == null)) { TextColor = Color.gray; } }