Pulsar4xDevs / Pulsar4x

A Fan work recreation of Aurora4x in C#
Other
159 stars 67 forks source link

SystemMap should stack Entity-names when overlapping #195

Closed ghosta0815 closed 7 years ago

ghosta0815 commented 7 years ago

When there is overlapping text on the Systemmap, the text should stack or be distribute in a way that it is easily readable. My personal preferrance would be, that it only stacks vertically (+/-Y), without changing the horizontal (X) alignment.

Just some thoughts about the implementation:

ghosta0815 commented 7 years ago

It seems like the code in EntityEvents uses a Dictionary of Lists of IconBases. This way each Entity can have multiple Items displayed, like a name, a orbit and a symbol and is only referenced by a single Guid. Doing it this way might be time-consuming, when operations over the Elements of the List-Items are necessary (like identifying all name-Icons and stacking them).

I will try doing an implementation with Dictionary<string, Dictionary <Guid, IconBase>> with the first Dictionary key being {"OrbitIcons", "TextIcons", "EntityIcons"} that can be extended later if other Icons become necessary;

ghosta0815 commented 7 years ago

Done with #196 and #197