[Add] Support for mousewheel to zoom in/out of map.
This commit is contained in:
parent
8fd0e73e66
commit
cc9ffd1e60
@ -219,6 +219,11 @@ static void map_mouse(SDL_Event* event, double mx, double my) {
|
|||||||
|
|
||||||
switch(event->type) {
|
switch(event->type) {
|
||||||
case SDL_MOUSEBUTTONDOWN:
|
case SDL_MOUSEBUTTONDOWN:
|
||||||
|
if(event->button.button == SDL_BUTTON_WHEELUP)
|
||||||
|
map_buttonZoom("btnZoomOut");
|
||||||
|
else if(event->button.button == SDL_BUTTON_WHEELDOWN)
|
||||||
|
map_buttonZoom("btnZoomIn");
|
||||||
|
|
||||||
// Selecting star system.
|
// Selecting star system.
|
||||||
for(i = 0; i < systems_nstack; i++) {
|
for(i = 0; i < systems_nstack; i++) {
|
||||||
x = systems_stack[i].pos.x * map_zoom;
|
x = systems_stack[i].pos.x * map_zoom;
|
||||||
|
Loading…
Reference in New Issue
Block a user