From: Stefan F. (web.de) <ste...@we...> - 2010-06-24 22:12:19
|
Not too exciting world-cup games invite to play around with the user interface. A) Auto-Scrolling The map scrolls automatically to center the display on the route network of the active company. Only done at the start of the tile laying step and only if the current zoom step requires scrolling. Currently default on, but can be switched off in the my.properties-file: map.autoscroll=no Any opinion if this should be the default or is this too hectic? Another option is to add a similar function that does an auto-zoom (out), if the route network of the active company cannot be displayed in the current map panel. But this might be too obtrusive? And should it return to some standard zoomstep (but which?), when the next company starts operating? B) Change of fonts for user interface possible All settings done in my.properties font.ui.scale allows to scale relative to the default (12pt) font.ui.name allows to choose available fonts on the system font.ui.style allows to switch between plain/bold style This is done globally for all fonts used. It still requires some tweaks on some panels to accomodate large font sizes. The font sizes used on the map should also be handled separately in the future. C) Game specific settings possible The settings defined for the options above allow game specific overrides. For this simply append the game name to the option. Example: font.ui.scale.18EU=0.8 changes the font scale for 18EU only. Another option defined is map.zoomstep, which allows to initialize the zoomstep. Here game specific settings are also helpful. D) Refactoring of the HexMap classes In the process of adding the options, I refactored the HexMap classes slightly to avoid some redundancies in the coordinate calculations. I also hope that this a remedy to some of the problems with the zoom function, which I observed regularely. If anyone experience any new problems with the map display, please report. Question to Erik here: From the Scale class it seems that the scale is 15 and then rescaled depending on the screen resolution, as soon as the Scale class is setup But that is overwritten by a call from MapPanel: Scale.set(16); which overwrites that with 16 and no rescaling is done. Is that the true intention or is this a code artifact? Stefan |