Allow closing of mission detail screen by right clicking.
This commit is contained in:
parent
9296e251eb
commit
5c211a3017
|
@ -280,6 +280,14 @@ static void doStarSystemView(void)
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* allow closing by pressing the right mouse button */
|
||||
if (app.mouse.button[SDL_BUTTON_RIGHT])
|
||||
{
|
||||
show = SHOW_GALAXY;
|
||||
|
||||
playSound(SND_GUI_CLOSE);
|
||||
}
|
||||
}
|
||||
|
||||
static void addPulses(void)
|
||||
|
@ -650,7 +658,6 @@ static void handleKeyboard(void)
|
|||
case SHOW_GALAXY:
|
||||
selectWidget("resume", "galacticMap");
|
||||
show = SHOW_MENU;
|
||||
playSound(SND_GUI_CLOSE);
|
||||
break;
|
||||
|
||||
case SHOW_STAR_SYSTEM:
|
||||
|
@ -677,6 +684,8 @@ static void handleKeyboard(void)
|
|||
|
||||
static void handleMouse(void)
|
||||
{
|
||||
scrollingMap = 0;
|
||||
|
||||
if (app.mouse.button[SDL_BUTTON_LEFT])
|
||||
{
|
||||
if (app.mouse.dx != 0 || app.mouse.dy != 0)
|
||||
|
@ -684,10 +693,6 @@ static void handleMouse(void)
|
|||
scrollingMap = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
scrollingMap = 0;
|
||||
}
|
||||
}
|
||||
|
||||
static void startMission(void)
|
||||
|
|
Loading…
Reference in New Issue