h = get_text_h(item) + ICON_MARGIN * 2;
break; }
case LISTBOX_ICON_LIST: {
- w = get_text_width(MEDIUMFONT, item->text) + LISTBOX_MARGIN * 2;
+ w = column_width ? column_width[0] : default_column_width[0];
h = row_height;
break; }
default:
// Multiple item selection is possible
if( selection_mode == LISTBOX_MULTIPLE &&
- (ctrl_down() || shift_down()) ) {
+ (ctrl_down() || shift_down() || current_item->selected) ) {
// Expand text selection.
// Fill items between selected region and current item.
if( shift_down() &&
new_value = 1;
}
// Toggle a single item on or off
- else {
+ else if( ctrl_down() ) {
toggle_item_selection(data, selection_number);
new_value = current_item->selected;
}
}
// Select single item
else {
- if( !current_item->selected || !new_value ) {
+ if( !current_item->selected || (get_buttonpress() == 1 && !new_value) ) {
set_all_selected(data, 0);
set_selected(data, selection_number, 1);
}