private void Initialize()
        {
            // rectUp = new DyeableRect(menu, owner, this.pos + new Vector2(this.size.x - 40f, 3f), new Vector2(16f, 24f), true);
            // rectDown = new DyeableRect(menu, owner, this.pos + new Vector2(this.size.x - 20f, 3f), new Vector2(16f, 24f), true);
            // subObjects.Add(rectUp); subObjects.Add(rectDown);

            this.description = InternalTranslator.Translate("Click and Type numbers, Use Arrows or Scrollwheel to adjust");

            arrUp = new FSprite("Big_Menu_Arrow", true)
            {
                scale = 0.5f, rotation = 0f, anchorX = 0.5f, anchorY = 0.5f, x = this.size.x - 15f, y = 20f, color = this.colorText
            };
            arrDown = new FSprite("Big_Menu_Arrow", true)
            {
                scale = 0.5f, rotation = 180f, anchorX = 0.5f, anchorY = 0.5f, x = this.size.x - 15f, y = 10f, color = this.colorText
            };
            myContainer.AddChild(arrUp); myContainer.AddChild(arrDown);

            bumpUp = new BumpBehaviour(this); bumpDown = new BumpBehaviour(this);
            OnChange();
        }
Exemple #2
0
        public override void GrafUpdate(float dt)
        {
            base.GrafUpdate(dt);

            this.rect.colorF = this.colorFill;

            if (!doesBump)
            {
                this.rect.fillAlpha = this.alpha;
                this.rect.color     = this.colorEdge;
                return;
            }
            if (this.bumpBehav == null)
            {
                this.bumpBehav = new BumpBehaviour(this);
            }
            this.bumpBehav.Update(dt);

            this.rect.fillAlpha = this.bumpBehav.FillAlpha;
            this.rect.addSize   = new Vector2(4f, 4f) * this.bumpBehav.AddSize;
            this.rect.color     = this.bumpBehav.GetColor(this.colorEdge);
        }