public override void Update(GameTime gameTime)
        {
            if (!ContentLoader.Done)
            {
                return;
            }
            base.Update(gameTime);
            var rec = TruckerX.TargetRetangle;

            if (buttonLog == null)
            {
                buttonLog          = new OverlayButtonWidget(this, "list");
                buttonLog.OnClick += ButtonLog_OnClick;
            }
            buttonLog.Update(this, gameTime);
            buttonLog.Position = new Vector2(rec.X + rec.Width - buttonLog.Size.X - (6 * GetRDMultiplier()), rec.Y + (topRowRefHeight * GetRDMultiplier()));

            if (openTabAnimation.Percentage != 0.0f)
            {
                openTabAnimation.Update(gameTime);
            }

            {
                float w      = rec.Width / 3;
                float offset = (w * openTabAnimation.Percentage);
                float x      = rec.X + rec.Width - offset;
                float y      = rec.Y;
                float h      = rec.Height;
                tabRec = new Rectangle((int)x, (int)y, (int)w, (int)h);
                Mouse.GetState().HoveringRectangle(tabRec);

                tabBorderWidth = (5 * ContentLoader.GetRDMultiplier());
            }
        }
Exemple #2
0
        public override void Update(GameTime gameTime)
        {
            buttonsEnterScreenAnimation.Update(gameTime);
            clickEffect.Update(gameTime);

            leafParticleEffectTree1?.Update(gameTime);
            leafParticleEffectTree2?.Update(gameTime);

            if (!this.ChangingScene)
            {
                buttonCampaign.Update(this, gameTime);
                buttonFreePlay.Update(this, gameTime);
                buttonSettings.Update(this, gameTime);
            }

            base.Update(gameTime);
        }