/*
         * public override void Interact() {
         *  base.Interact();
         *  interacting = true;
         *  //inputField.ActivateInputField();
         *  dropDown.Show();
         * }
         */

        public override void UpButton()
        {
            base.UpButton();
            if (dropDown.value > 0)
            {
                dropDown.value--;
                dropDown.RefreshShownValue();
                dropDown.Hide();
                dropDown.Show();
                ScrollToCurrentItem();
            }
        }
Exemple #2
0
    // Handle Cancel Input
    public override bool HandleCancelFunction()
    {
        if (padCalibrator.bCalibrationOpen || padCalibrator.bAxisOpen)
        {
            return(true);
        }

        if (UIMenuInputMapper.bAssignWindowOpen && UIMenuInputMapper.currentActiveMapper != null)
        {
            if (!UIMenuInputMapper.bPolling)
            {
                UIMenuInputMapper.currentActiveMapper.CloseAssignmentWindow();
                return(true);
            }
        }

        if (gamepadDropdown != null)
        {
            if (gamepadDropdown.transform.Find("Dropdown List") != null)
            {
                gamepadDropdown.Hide();
                return(true);
            }
        }

        return(false);
    }
Exemple #3
0
    // Cancel Function
    public override bool HandleCancelFunction()
    {
        if (crosshairDropdown != null)
        {
            if (crosshairDropdown.transform.Find("Dropdown List") != null)
            {
                crosshairDropdown.Hide();
                return(true);
            }
        }

        if (laserSightDropdown.transform.Find("Dropdown List") != null)
        {
            laserSightDropdown.Hide();
            return(true);
        }

        if (slideInputDropdown.transform.Find("Dropdown List") != null)
        {
            slideInputDropdown.Hide();
            return(true);
        }

        return(false);
    }
    // Cancel Function
    public override bool HandleCancelFunction()
    {
        if (resolutionDropdown.transform.Find("Dropdown List") != null)
        {
            resolutionDropdown.Hide();
            return(true);
        }

        if (displayModeDropdown != null)
        {
            if (displayModeDropdown.transform.Find("Dropdown List") != null)
            {
                displayModeDropdown.Hide();
                return(true);
            }
        }

        if (monitorDropdown != null)
        {
            if (monitorDropdown.transform.Find("Dropdown List") != null)
            {
                monitorDropdown.Hide();
                return(true);
            }
        }

        return(false);
    }
Exemple #5
0
    public void OnChangeTintColor()
    {
        Style.StyleColors["tint"] = Style.TintColors[tintColor.options[tintColor.value].text];
        var objs = new[]
        {
            "/humanoid/head/head",
            "/humanoid/head/nose",
            "/humanoid/head/neck",
            "/humanoid/body/ubody/ubody",
            "/humanoid/body/ubody/arms/leftArm",
            "/humanoid/body/ubody/arms/rightArm",
            "/humanoid/body/ubody/hands/leftHand",
            "/humanoid/body/ubody/hands/rightHand",
            "/humanoid/body/lbody/lbody",
            "/humanoid/body/lbody/legs/leftLeg",
            "/humanoid/body/lbody/legs/rightLeg"
        };

        try
        {
            foreach (var obj in objs)
            {
                GameObject.Find(obj).GetComponent <SpriteRenderer>().color = Style.StyleColors["tint"];
            }
        }
        finally
        {
            tintColor.Hide();
        }
    }
Exemple #6
0
 private void Hide()
 {
     m_dropDown.Hide();
     if (ComponentSelected != null)
     {
         ComponentSelected((Type)m_treeView.SelectedItem);
     }
 }
Exemple #7
0
 public void updateSelectedControls(int selection)
 {
     controlSelect = selection;
     controltxt.Hide();
     if (selection == 2)
     {
         gyroSupportedCheck();
     }
 }
Exemple #8
0
 public void OnChangeHairColor()
 {
     Style.StyleColors["hair"] = Style.HairColors[hairColor.options[hairColor.value].text];
     try
     {
         GameObject.Find("/humanoid/head/hair").GetComponent <SpriteRenderer>().color = Style.StyleColors["hair"];
     }
     finally
     {
         hairColor.Hide();
     }
 }
        public void HandleDestinationSelection(int val)
        {
            //Debug.Log("selection >> " + val + " " + dropdown.options[val].text);
            dropdown.Hide();

            if (val > 0)
            {
                destinationUpdated = true;
                PlayerPrefs.SetString("DEST_NAME", dropdown.options[val].text);
                InvokeRepeating("StartNavigation", 1.0f, 0.5f);
            }
        }
Exemple #10
0
        private IEnumerator CoHide()
        {
            yield return(new WaitForEndOfFrame());

            if (m_treeView.SelectedItem != null)
            {
                m_dropDown.Hide();
                if (ComponentSelected != null)
                {
                    ComponentSelected((Type)m_treeView.SelectedItem);
                }
            }
        }
        public void OnPresetClick(BaseEventData data)
        {
            PointerEventData pointerData = (PointerEventData)data;
            AnchorPreset     preset      = pointerData.pointerPress.GetComponent <AnchorPreset>();

            m_preview.CopyFrom(preset);

            if (Selected != null)
            {
                Selected(preset);
            }

            UpdateCaptions();

            m_dropDown.Hide();
        }
Exemple #12
0
    public void HandleVariableCommand()
    {
        dropdown.Hide();
        if (dropdown.value == 0)
        {
            return;
        }
        GameManager.instance.NextCommandTutoredGameplay();
//        var numberOfRepetitions = GameManager.instance.Variables.ElementAt(dropdown.value - 1).GetValue();
        Variable variable = GameManager.instance.Variables.ElementAt(dropdown.value - 1);

        if (variable.GetValue() != null)
        {
            HandleLoopCommand(variable);
        }
        Invoke(nameof(CallDeactivateLoopPanelLoopPanel), 0.2f);

        dropdown.value = 0;
    }
Exemple #13
0
    public void OnChangePantsColor()
    {
        Style.StyleColors["pants"] = Style.DefaultColors[pantsColor.options[pantsColor.value].text];
        var objs = new[]
        {
            "/humanoid/body/lbody/pants/middle",
            "/humanoid/body/lbody/pants/pantsRight",
            "/humanoid/body/lbody/pants/pantsLeft"
        };

        try
        {
            foreach (var obj in objs)
            {
                GameObject.Find(obj).GetComponent <SpriteRenderer>().color =
                    Style.StyleColors["pants"];
            }
        }
        finally
        {
            pantsColor.Hide();
        }
    }
Exemple #14
0
    public void OnChangeShirtColor()
    {
        Style.StyleColors["shirt"] = Style.DefaultColors[shirtColor.options[shirtColor.value].text];
        var objs = new[]
        {
            "/humanoid/body/ubody/shirt",
            "/humanoid/body/ubody/shirt/rightArmT",
            "/humanoid/body/ubody/shirt/leftArmT"
        };

        try
        {
            foreach (var obj in objs)
            {
                GameObject.Find(obj).GetComponent <SpriteRenderer>().color =
                    Style.StyleColors["shirt"];
            }
        }
        finally
        {
            shirtColor.Hide();
        }
    }
Exemple #15
0
 protected override void OnValueChanged(int newValue)
 {
     dropdown.Hide();
     Select();
     base.OnValueChanged(newValue);
 }
Exemple #16
0
 protected void resetPanel()
 {
     isAdmin          = false;
     p2Settings.value = 0;
     p2Settings.Hide();
 }