public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative)
        {
            if (IsActive) {
                spriteBatch.DrawAbsolute(base.background, base.boundingBox, base.color);

                Rectangle tileRect = new Rectangle(boundingBox.X, boundingBox.Y + TilePosY, ButtonWidth, ButtonWidth / 2);
                for (int n = 0; n < professionButtons.Count(); n++) {
                    spriteBatch.DrawAbsolute(MediaRepository.Textures["BlankTile"],
                        tileRect, new Color(255, 255, 255, 100));
                    tileRect = Geometry.Translate(tileRect, ButtonWidth, 0);
                }

                foreach (Button button in professionButtons) {
                    button.Draw(spriteBatch, false);
                }
            }
        }
 public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative)
 {
     if (IsActive) {
         foreach (Button button in buttons) {
             spriteBatch.DrawAbsolute(MediaRepository.Textures["BlankTile"], button.BoundingBox, new Color(0, 0, 0, 50));
         }
         base.Draw(spriteBatch, isRelative);
     }
 }
Exemple #3
0
        public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative)
        {
            base.Draw(spriteBatch, isRelative);

            Rectangle frontBarBoundingBox = BoundingBox;
            frontBarBoundingBox.Width = (int)(frontBarBoundingBox.Width * fraction);

            if (isRelative) {
                spriteBatch.DrawRelative(MediaRepository.Textures["Blank"], frontBarBoundingBox, frontColor, layerDepth);
            } else {
                spriteBatch.DrawAbsolute(MediaRepository.Textures["Blank"], frontBarBoundingBox, frontColor);
            }
        }
        public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative)
        {
            if (IsActive) {
                base.Draw(spriteBatch, isRelative);

                Point curPivot = new Point(BoundingBox.X, BoundingBox.Y);
                Point increment = new Point(tileSize.Width + indent, 0);

                for (Light.LightType type = 0; type < Light.LightType.SIZE; type++) {
                    for (int count = 0; count < sequence.Frequencies[type]; count++) {
                        if (isRelative) {
                            spriteBatch.DrawRelative(MediaRepository.Textures["Blank"], Geometry.ConstructRectangle(curPivot, tileSize),
                                Light.GetLightColor(type), layerDepth);
                        }
                        else {
                            spriteBatch.DrawAbsolute(MediaRepository.Textures["Blank"], Geometry.ConstructRectangle(curPivot, tileSize),
                                Light.GetLightColor(type));
                        }

                        curPivot = Geometry.Sum(curPivot, increment);
                    }
                }
            }
        }
Exemple #5
0
        public override void Draw(SpriteBatchRelative spriteBatch, bool isRelative)
        {
            if (IsActive) {
                Building thisBuilding = (Building)World.SelectedEntities.First();
                for (int index = 0; index < 4; index++) {
                    if (thisBuilding.GetEffects()[index].isKnown) {
                        descriptions[index].Activate();
                        effectButtons[index].Activate();
                        sequenceBars[index].Activate();
                        unknownTexts[index].Deactivate();
                    }
                    else {
                        descriptions[index].Deactivate();
                        effectButtons[index].Deactivate();
                        sequenceBars[index].Deactivate();
                        unknownTexts[index].Activate();
                    }

                    if (World.IsNight) {
                        effectButtons[index].Deactivate();
                    }
                }

                base.Draw(spriteBatch, isRelative);

                spriteBatch.DrawAbsolute(MediaRepository.Textures["Border"], effectButtons[thisBuilding.ActivatedEffect].BoundingBox, World.IsNight ? Color.Black : Color.White);
            }
        }