Always show primary tag

This implements #4935, although the wording in that issue is not correct. This commit shows primary tag on production buildings always if it is set, not only when the building is selected. Airfield has a separate tag position because of overlapping of progress bars. I experimented with different locations and I think this results in least overlapping. Airfield also has a different tag position if pixel doubling is enabled. I couldn't have done this commit without the help of WolfGaming in #openra. I tested the commit and seems to work.

I removed DrawTags method from SelectionDecorations.cs because its only purpose was to draw the primary tag which is now done in PrimaryBuilding.cs.
Surely afld can just set OffsetX, OffsetY in its yaml if it needs a
different offset?


On Tue, Jun 24, 2014 at 6:02 AM, Matthias Mailänder <
notifications@github.com> wrote:

> In OpenRA.Mods.RA/PrimaryBuilding.cs:
>
> > +		public void RenderAfterWorld(WorldRenderer wr, Actor self)
> > +		{
> > +			if(isPrimary)
> > +			{
> > +				var pos = wr.ScreenPxPosition(self.CenterPosition);
> > +				var bounds = self.Bounds.Value;
> > +				bounds.Offset(pos.X, pos.Y);
> > +
> > +				int2 basePosition = new int2((bounds.Left + bounds.Right) / 2, bounds.Top);
> > +
> > +				var tagImages = new Animation(self.World, "pips");
> > +				var pal = wr.Palette(info.Palette);
> > +				var tagxyOffset = new int2(info.OffsetX, info.OffsetY);
> > +
> > +				// Special tag position for airfield
> > +				if (self.Info.Name == "afld")
>
> [image: :-1:] Never ever hard-code actor names in this modular game
> engine.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OpenRA/OpenRA/pull/5575/files#r14089897>.
>