Beispiel #1
0
        public HandGestureControlKeyAddWindow(KeyAction action) : this()
        {
            CustomNameTextBox.Text = action.Name;
            if (action.Hand == Hands.Both)
            {
                BothHandRadioButton.IsChecked = true;
            }
            else if (action.Hand == Hands.Right)
            {
                RightHandRadioButton.IsChecked = true;
            }
            else
            {
                LeftHandRadioButton.IsChecked = true;
            }
            KeyUpCheckBox.IsChecked = action.IsKeyUp;

            isLoading = true;
            for (int i = 1; i <= 20; i++)
            {
                var slider    = this.FindName("ValueSlider" + i.ToString("00")) as Slider;
                var textblock = this.FindName("ValueTextBlock" + i.ToString("00")) as TextBlock;
                slider.Value   = action.HandAngles[i - 1];
                textblock.Text = slider.Value.ToString();
                handAngles[(int)slider.Tag - 1] = (int)slider.Value;
            }
            isLoading = false;

            KeyConfigs.AddRange(action.KeyConfigs);
            UpdateKeys();
        }
 public FunctionKeyAddWindow(KeyAction action) : this()
 {
     FunctionComboBox.SelectedIndex = (int)action.Function;
     KeyUpCheckBox.IsChecked        = action.IsKeyUp;
     KeyConfigs.AddRange(action.KeyConfigs);
     UpdateKeys();
 }
 /// <inheritdoc/>
 public override bool OnKeyboardInputGiven(Event inputEvent, KeyConfigs keys)
 {
     if (keys.DetectTextFieldReservedInput(inputEvent, TextFieldType.TextArea))
     {
                         #if DEV_MODE && DEBUG_ENABLED
         Debug.Log("Ignoring input because using ScriptInspectorDrawer");
                         #endif
         return(true);
     }
     return(base.OnKeyboardInputGiven(inputEvent, keys));
 }
Beispiel #4
0
 public FaceControlKeyAddWindow(KeyAction action) : this()
 {
     for (int i = 0; i < action.FaceNames.Count; i++)
     {
         faceItems.Add(new FaceItem {
             Key = action.FaceNames[i], Value = action.FaceStrength[i]
         });
     }
     AutoBlinkCheckBox.IsChecked = action.StopBlink;
     CustomNameTextBox.Text      = action.Name;
     KeyUpCheckBox.IsChecked     = action.IsKeyUp;
     KeyConfigs.AddRange(action.KeyConfigs);
     UpdateKeys();
 }
 public FaceControlKeyAddWindow(KeyAction action) : this()
 {
     for (int i = 0; i < action.FaceNames.Count; i++)
     {
         faceItems.Add(new FaceItem {
             Key = action.FaceNames[i], Value = action.FaceStrength[i]
         });
     }
     LipSyncMaxLevelTextBlock.Text = action.LipSyncMaxLevel.ToString("0.00");
     LipSyncMaxLevelSlider.Value   = action.LipSyncMaxLevel;
     AutoBlinkCheckBox.IsChecked   = action.StopBlink;
     CustomNameTextBox.Text        = action.Name;
     KeyUpCheckBox.IsChecked       = action.IsKeyUp;
     KeyConfigs.AddRange(action.KeyConfigs);
     UpdateKeys();
 }