// Token: 0x060000A7 RID: 167 RVA: 0x000085BC File Offset: 0x000067BC
        public void Update()
        {
            FPSController.Update();
            if (Menu.smethod_0(KeyCode.End))
            {
                this.Enabled = !this.Enabled;
            }
            if (this.Enabled)
            {
                if (this.SelectedOption == null)
                {
                    this.SelectedOption = this.Opts[this.SelectedIndex];
                }
                if (Menu.smethod_0(KeyCode.UpArrow))
                {
                    int num = this.SelectedIndex - 1;
                    if (this.VisibleOpts.ElementAtOrDefault(num) != null)
                    {
                        this.SelectedIndex = num;
                    }
                    else
                    {
                        this.SelectedIndex = this.VisibleOpts.Count - 1;
                    }
                    this.SelectedOption = this.VisibleOpts[this.SelectedIndex];
                }
                if (Menu.smethod_0(KeyCode.DownArrow))
                {
                    int num2 = this.SelectedIndex + 1;
                    if (this.VisibleOpts.ElementAtOrDefault(num2) == null)
                    {
                        this.SelectedIndex = 0;
                    }
                    else
                    {
                        this.SelectedIndex = num2;
                    }
                    this.SelectedOption = this.VisibleOpts[this.SelectedIndex];
                }
                switch (this.SelectedOption.Type)
                {
                case Menu.Option.OptType.Toggle:
                case Menu.Option.OptType.Category:
                    if (Menu.smethod_0(KeyCode.RightArrow) || Menu.smethod_0(KeyCode.LeftArrow))
                    {
                        this.SelectedOption.Data = !this.SelectedOption.GetData <bool>();
                    }
                    break;

                case Menu.Option.OptType.Selector:
                    if (Menu.smethod_0(KeyCode.RightArrow) || Menu.smethod_0(KeyCode.LeftArrow))
                    {
                        List <object> subContent = this.SelectedOption.GetSubContent <List <object> >();
                        if (Menu.smethod_0(KeyCode.RightArrow))
                        {
                            int num3 = this.SelectedOption.GetData <int>() + 1;
                            if (subContent.ElementAtOrDefault(num3) != null)
                            {
                                this.SelectedOption.Data = num3;
                            }
                            else
                            {
                                this.SelectedOption.Data = 0;
                            }
                        }
                        if (Menu.smethod_0(KeyCode.LeftArrow))
                        {
                            int num4 = this.SelectedOption.GetData <int>() - 1;
                            if (subContent.ElementAtOrDefault(num4) == null)
                            {
                                this.SelectedOption.Data = subContent.Count - 1;
                            }
                            else
                            {
                                this.SelectedOption.Data = num4;
                            }
                        }
                    }
                    break;

                case Menu.Option.OptType.Text:
                    if (Menu.smethod_0(KeyCode.RightArrow) || Menu.smethod_0(KeyCode.LeftArrow))
                    {
                        this.SelectedOption.CustomColor = ColorFix.RGBColor(Menu.smethod_1(100f, 255f), Menu.smethod_1(100f, 255f), Menu.smethod_1(100f, 255f));
                    }
                    break;
                }
            }
        }
Example #2
0
 //Set ColorFixOption
 public Boolean SetColorFixOption(ColorFix option)
 {
     /* Pre:  none.
       * Post: Sets color fix & color fix string
       *       If invalid option is passed, return false & set to NULL
       */
     switch (option)
     {
         case ColorFix.A:
             ColorFixOptionStr = "A";
             ColorFixOption = option;
             break;
         case ColorFix.B:
             ColorFixOptionStr = "B";
             ColorFixOption = option;
             break;
         case ColorFix.NULL:
             ColorFixOptionStr = "NULL";
             ColorFixOption = option;
             break;
         default:
             ColorFixOptionStr = "NULL";
             ColorFixOption = ColorFix.NULL;
             return false;  //Invalid option
     }
     return true;
 }
Example #3
0
 //Set ColorFixOption
 public Boolean SetColorFixOption(String option)
 {
     /* Pre:  none.
       * Post: Sets color fix & color fix string
       *       If invalid option is passed, return false & set to NULL
       */
     if (option == "A")
     {
         ColorFixOptionStr = "A";
         ColorFixOption = ColorFix.A;
     }
     else if (option == "B")
     {
         ColorFixOptionStr = "B";
         ColorFixOption = ColorFix.B;
     }
     else if (option == "NULL")
     {
         ColorFixOptionStr = "NULL";
         ColorFixOption = ColorFix.NULL;
     }
     else
     {
         ColorFixOptionStr = "NULL";
         ColorFixOption = ColorFix.NULL;
         return false;  //Invalid option
     }
     return true;
 }
Example #4
0
 //Set Default ColorFixOption
 public Boolean SetColorFixOption()
 {
     /* Pre:  none.
        * Post: Sets color fix & color fix string to A
        *       If color fix is not needed, both are set to null.
        */
     if (CurOS == OS.Win7 || CurOS == OS.Vista)
     {
         ColorFixOption = ColorFix.A;
         ColorFixOptionStr = "A";
         return true;
     }
     else
     {
         ColorFixOption = ColorFix.NULL;
         ColorFixOptionStr = "NULL";
         return false;
     }
 }