Project290.Menus.VolumeControlDisplayEntry.Update C# (CSharp) Method

Update() public method

Updates the specified highlighted.
public Update ( bool highlighted ) : void
highlighted bool Specifies whether or not this menu entry /// is the highlighted menu entry in the list of menu entries.
return void
        public override void Update(bool highlighted)
        {
            base.Update(highlighted);

            if (highlighted)
            {
                if (!this.previouslyHighlighed)
                {
                    this.previouslyHighlighed = true;
                    this.UpdateTValues();
                }

                if (GameWorld.controller.ContainsBool(ActionType.SelectionRight))
                {
                    this.ChangeVolume(1);
                    this.UpdateTValues();
                }
                if (GameWorld.controller.ContainsBool(ActionType.SelectionLeft))
                {
                    this.ChangeVolume(-1);
                    this.UpdateTValues();
                }
            }
            else
            {
                if (previouslyHighlighed)
                {
                    this.previouslyHighlighed = false;
                    this.Disappear();
                }
            }

            foreach (tVector2 tv2 in this.positions)
            {
                tv2.Update();
            }

            foreach (tfloat tf in this.scales)
            {
                tf.Update();
            }
        }