Fxed and simplified double-click handling in Listboxes (Skins window, Text window, Factory window). Double-clicking a font in Text window 'accepts' the rendering and closes the window.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1736 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
parent
34cd4d11cd
commit
cdd7f21265
@ -1424,12 +1424,12 @@ void Button_Skins(void)
|
||||
{
|
||||
case 1 : // OK
|
||||
break;
|
||||
case 2 : // doesn't happen
|
||||
case 2 : // double-click file: do nothing
|
||||
break;
|
||||
case 3 : // doesn't happen
|
||||
break;
|
||||
case 4 : // a file is selected
|
||||
need_load=1;
|
||||
need_load=1;
|
||||
break;
|
||||
case 5 : // Font dropdown
|
||||
selected_font = Window_attribute2; // Get the index of the chosen font.
|
||||
@ -5009,10 +5009,6 @@ void Button_Text(void)
|
||||
/* Cannot happen, event is catched by the list control */
|
||||
break;
|
||||
|
||||
case 6: // Selecteur de fonte
|
||||
/* Cannot happen, event is catched by the list control */
|
||||
break;
|
||||
|
||||
case 13: // Font selection
|
||||
selected_font_index = Window_attribute2;
|
||||
Hide_cursor();
|
||||
@ -5056,6 +5052,7 @@ void Button_Text(void)
|
||||
break;
|
||||
|
||||
|
||||
case 6: // Double-click font selector
|
||||
case 11: // OK
|
||||
// Save the selector settings
|
||||
list_start = font_list->List_start;
|
||||
|
||||
@ -3199,10 +3199,11 @@ short Window_clicked_button(void)
|
||||
if (old_mouse_k==0 && last_list_number==list->Number && time_now - time_last_click < Config.Double_click_speed)
|
||||
{
|
||||
time_last_click = time_now;
|
||||
Input_sticky_control=0;
|
||||
// Store the selected value as attribute2
|
||||
Window_attribute2=list->List_start + list->Cursor_position;
|
||||
// Return the control ID of the list.
|
||||
return list->Number;
|
||||
// Return the control ID of the "special button" that covers the list.
|
||||
return list->Entry_button->Number;
|
||||
}
|
||||
time_last_click = time_now;
|
||||
last_list_number=list->Number;
|
||||
|
||||
@ -1706,13 +1706,10 @@ void Button_Brush_Factory(void)
|
||||
|
||||
switch (clicked_button)
|
||||
{
|
||||
case 4:
|
||||
if (last_selected_item == scriptlist->List_start + scriptlist->Cursor_position)
|
||||
{
|
||||
// Double click
|
||||
clicked_button=5;
|
||||
break;
|
||||
}
|
||||
case 2: // Double-click an entry in script list
|
||||
clicked_button=5;
|
||||
break;
|
||||
case 4: // Select script
|
||||
last_selected_item = scriptlist->List_start + scriptlist->Cursor_position;
|
||||
Hide_cursor();
|
||||
Draw_script_information(Get_item_by_index(&Scripts_selector,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user