Using twice the default zoom key for switching to half the default zoom level

A sort of strategic view, very handy and also useful to avoid auto-scrolling
This commit is contained in:
Ali El Gariani 2007-08-14 05:45:50 +00:00
parent 98564517fd
commit 8faf2c26bf

View File

@ -1276,8 +1276,14 @@ void display::set_zoom(int amount)
}
void display::set_default_zoom()
{
set_zoom(DefaultZoom - zoom_);
{
if (zoom_ != DefaultZoom) {
set_zoom(DefaultZoom - zoom_ );
} else {
// we are already at the default zoom
// so switch to the second default (strategic view)
set_zoom(DefaultZoom / 2 - zoom_);
}
}
void display::scroll_to_tile(const gamemap::location& loc, SCROLL_TYPE scroll_type, bool check_fogged)