Allow closing window in more dialog
see http://pulkomandy.tk/projects/GrafX2/ticket/141 see e72bb8cab16a237f74db0cde1ed43e9f45ff0bd0
This commit is contained in:
parent
7f4e1a10eb
commit
24fee41e41
@ -5208,12 +5208,14 @@ void Button_Text(int btn)
|
||||
}
|
||||
|
||||
clicked_button=Window_clicked_button();
|
||||
if (Quit_is_required)
|
||||
clicked_button = 12; // cancel
|
||||
if (clicked_button==0)
|
||||
{
|
||||
if (Is_shortcut(Key,0x100+BUTTON_HELP))
|
||||
Window_help(BUTTON_TEXT, NULL);
|
||||
else if (Is_shortcut(Key,0x100+BUTTON_TEXT))
|
||||
clicked_button=12;
|
||||
clicked_button = 12; // cancel
|
||||
}
|
||||
switch(clicked_button)
|
||||
{
|
||||
|
||||
@ -1155,6 +1155,8 @@ int L_InputBox(lua_State* L)
|
||||
|
||||
while (!close_window)
|
||||
{
|
||||
if (Quit_is_required)
|
||||
close_window = CONTROL_CANCEL;
|
||||
clicked_button=Window_clicked_button();
|
||||
if (clicked_button>0)
|
||||
{
|
||||
@ -1338,7 +1340,7 @@ int L_SelectBox(lua_State* L)
|
||||
do
|
||||
{
|
||||
clicked_button=Window_clicked_button();
|
||||
} while (clicked_button<1 && Key != KEY_ESC);
|
||||
} while (clicked_button<1 && Key != KEY_ESC && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
Cursor_shape=CURSOR_SHAPE_HOURGLASS;
|
||||
@ -2839,8 +2841,10 @@ void Button_Brush_Factory(void)
|
||||
break;
|
||||
}
|
||||
|
||||
} while (clicked_button != 1 && clicked_button != 5);
|
||||
} while (clicked_button != 1 && clicked_button != 5 && !Quit_is_required);
|
||||
|
||||
if (Quit_is_required)
|
||||
clicked_button = 1;
|
||||
// Cancel
|
||||
if (clicked_button==1)
|
||||
break;
|
||||
|
||||
@ -2637,7 +2637,7 @@ byte Button_Load_or_Save(T_Selector_settings *settings, byte load, T_IO_Context
|
||||
Timer_state=2; // On arrête le chrono
|
||||
}
|
||||
}
|
||||
while ( (!has_clicked_ok) && (clicked_button!=2) );
|
||||
while ( (!has_clicked_ok) && (clicked_button!=2) && !Quit_is_required);
|
||||
|
||||
if (has_clicked_ok)
|
||||
{
|
||||
|
||||
@ -337,7 +337,7 @@ void Button_Transform_menu(int btn)
|
||||
break;
|
||||
}
|
||||
}
|
||||
while (clicked_button<=0 || clicked_button>=8);
|
||||
while ((clicked_button<=0 || clicked_button>=8) && !Quit_is_required);
|
||||
|
||||
Close_window();
|
||||
|
||||
@ -345,7 +345,7 @@ void Button_Transform_menu(int btn)
|
||||
if (Current_operation != OPERATION_SCROLL)
|
||||
Unselect_button(btn);
|
||||
|
||||
if (clicked_button != 1) // 1 is Cancel
|
||||
if (clicked_button != 1 && !Quit_is_required) // 1 is Cancel
|
||||
{
|
||||
short old_width;
|
||||
short old_height;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user