axx0/Civ2-clone

Mini map doesn't navigate main map

Closed this issue · 4 comments

The minimap isn't working, it doesn't highlight the selected area from the map control and clicking it does nothing

axx0 commented

How should the map control communicate with minimap (in both directions)? Through events?
The minimap in MGE behaves differently for round/flat worlds so the current logic needs to be refined a bit.
Also the ToT minimap is different. Will Civ2TOT and Civ2MGE folders hold their separate drawing logic depending on the chosen interface?

Some sort of event or delegate from the Game Screen, probably something that switches the game mode to viewing pieces.

The current implementation is just a crude place filler so I could verify the game objects were being passed around correctly. I have no idea how the TOT minimap works I've not played TOT in almost 20 years. But yeah the different functionality for flat vs round worlds should be driven by the flat variable on the active map object. TOT vs MPG differences should be controlled by the active interface whether that's a method on the Active Interface that does the work or a variable that switches to a different code path.

axx0 commented

So I implemented it similarly the way we had it in Eto. Map Control movement should be updated on minimap and clicking on minimap centers the view on Map Control. It also works for flat/round world the way it should. The rotating world map on TOT will have to wait.

Just to note - only left-click moving through map is implemented, I didn't mess with right-clicking which should switch game mode to viewing pieces.
Also not currently implemented, but right-clicking minimap should bring up "track enemy moves" window. Which I imagine should be a less important feature.

Looks good to me, I think for things that were working okay in Eto like the Mimi map and the sidebar we should probably port the implementation across as much as possible.