예제 #1
0
        private static void DebugPair(Vrc3Param lPair, Vrc3Param rPair)
        {
            var left  = $"[{lPair.Type.ToString()[0]}] {lPair.Name} = {lPair.Get()}";
            var right = rPair == null ? null : $"{rPair.Get()} = {rPair.Name} [{rPair.Type.ToString()[0]}]";

            DebugPair(left, right, GUI.skin.label);
        }
예제 #2
0
 public RadialPage(RadialMenu radialMenu, VRCExpressionsMenu menu, Vrc3Param param, float value)
 {
     _radialMenu = radialMenu;
     _menu       = menu;
     Param       = param;
     Value       = value;
 }
 public RadialMenuControl(RadialMenu menu, VRCExpressionsMenu.Control control) : base(control.name, control.icon, control.type, control.value)
 {
     _menu          = menu;
     _subMenu       = control.subMenu;
     _subLabels     = control.labels;
     _parameter     = menu.GetParam(control.parameter.name);
     _subParameters = control.subParameters.Select(parameter => menu.GetParam(parameter.name)).ToArray();
 }
 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;
     }
 }
 public static RadialMenuItem RadialFromParam(RadialMenu menu, string name, Vrc3Param param)
 {
     return(new RadialMenuControl(menu, name, null, ControlType.RadialPuppet, 1f, null, new[] { param }, null, null));
 }
            public static RadialMenuControl AxisFromParams(RadialMenu menu, string name, Vrc3Param xParam, Vrc3Param yParam)
            {
                var subLabels = new VRCExpressionsMenu.Control.Label[4];

                return(new RadialMenuControl(menu, name, null, ControlType.TwoAxisPuppet, 1f, null, new[] { xParam, yParam }, null, subLabels));
            }
 public static RadialMenuControl ParamStateToggle(RadialMenu menu, string name, Vrc3Param param, float activeValue)
 {
     return(new RadialMenuControl(menu, name, null, ControlType.Toggle, activeValue, param, new Vrc3Param[0], null, null));
 }
 public static RadialMenuControl ToggleFromParam(RadialMenu menu, string name, Vrc3Param param)
 {
     return(ParamStateToggle(menu, name, param, 1f));
 }
예제 #9
0
        /*
         * Menu
         */

        internal void OpenMenu(VRCExpressionsMenu menu, Vrc3Param param, float value)
        {
            _menuPath.Add(new RadialPage(this, menu, param, value));
            SetMenu(menu);
        }
예제 #10
0
 private void OnSeatedModeChange(Vrc3Param param, float seated)
 {
     _fromBlend[VRCAvatarDescriptor.AnimLayerType.Sitting].Set(seated);
 }