[Change] Resizing starmap works at different speeds.

This commit is contained in:
Allanis 2013-03-10 19:13:17 +00:00
parent a3f5e18306
commit 2e6bfd6a4d

View File

@ -256,9 +256,14 @@ static void map_mouse(SDL_Event* event, double mx, double my) {
} }
static void map_buttonZoom(char* str) { static void map_buttonZoom(char* str) {
if(strcmp(str, "btnZoomIn")==0) if(strcmp(str, "btnZoomIn")==0) {
map_zoom = MIN(2., map_zoom+0.5); map_zoom += (map_zoom >= 1.) ? 0.5 : 0.25;
else if(strcmp(str, "btnZoomOut")==0) map_zoom = MIN(2.5, map_zoom);
map_zoom = MAX(0.5, map_zoom-0.5); }
else if(strcmp(str, "btnZoomOut")==0) {
map_zoom -= (map_zoom > 1.) ? 0.5 : 0.25;
map_zoom = MAX(0.5, map_zoom);
}
} }