We-the-People-civ4col-mod / Mod

This is the repository where the mod resides.
89 stars 37 forks source link

The minimap (globe) doesn't work in 4K resolution #50

Open Nightinggale opened 6 years ago

Nightinggale commented 6 years ago

If you switch to 3840 x 2160 resolution, the globe in the bottom left will not be clickable as intended. You can click the top or bottom to scroll the map there, but there is a big part near the center where clicking it does nothing. The buttons around the map works and the map works in all other resolutions.

The question is how important this bug is because some objects like popup menus are in fixed pixel size and they are kind of small at such a high resolution. Also the graphic files aren't detailed enough to really benefit from such a high resolution either.

abmpicoli commented 6 years ago

I think that we can safely leave this to milestone 2.7.2 ... it appears somewhat complex to make those adjustments...

devolution79 commented 6 years ago

I agree that this is very annoying. 4k works great in BTS, but it uses a rectangular minimap instead of a sphere. I suppose the issue could be that something goes wrong during the coordinate conversion.

Nightinggale commented 4 years ago

I can't find the code for this and I fear it's inside the exe file itself. It works on all resolutions other than 4K.

screen.initMinimap(self.MINIMAP_SIDE_MARGIN, MINIMAP_HEIGHT - self.MINIMAP_SIDE_MARGIN, yResolution - MINIMAP_HEIGHT + self.MINIMAP_SIDE_MARGIN, yResolution - self.MINIMAP_SIDE_MARGIN, -0.1, true )

This is from CvMainInterface.py and inits the minimap. It has one extra argument compared to the BTS version, which is apparently a bool. I propose we call it bGlobe. Setting it to false will make the map square (BTS style) and the problem is gone.

I propose first implementing #153, then add a setting for players to select either globe or square minimap view. 4K resolutions will then have the globe disabled.

Any fix of this nature is likely too big for 2.7.x, hence why I change the milestone.

devolution79 commented 4 years ago

Wow, that's a great find! This will get us closer to recreating civ4 in the COLO engine :P I think I would prefer the square map regardless but I think we'd have to adjust the HUD at least.