- switch(current_operation)
- {
- case SELECT:
- if( gui && gui->is_event_win() && allow_drag )
- {
- BC_ListBoxItem *item_return = 0;
- selection_number = get_cursor_item(data,
- top_level->cursor_x,
- top_level->cursor_y,
- &item_return);
-
- if(selection_number >= 0)
- {
- int cx, cy;
- get_abs_cursor_xy(cx, cy);
- if( item_return->icon_vframe ) {
- cx -= item_return->icon_vframe->get_w() / 2,
- cy -= item_return->icon_vframe->get_h() / 2;
- drag_popup = new BC_DragWindow(this,
- item_return->icon_vframe, cx, cy);
- }
- else
-// this probably works not!
- if( item_return->icon ) {
- cx -= item_return->icon->get_w() / 2,
- cy -= item_return->icon->get_h() / 2;
- drag_popup = new BC_DragWindow(this,
- item_return->icon, cx, cy);
- }
- else {
- cx -= drag_icon_vframe->get_w() / 2,
- cy -= drag_icon_vframe->get_h() / 2;
- drag_popup = new BC_DragWindow(this,
- drag_icon_vframe, cx, cy);
- }
- current_operation = DRAG_ITEM;
-// require shift down for scrolling
- if( allow_drag < 0 && shift_down() )
- set_repeat(get_resources()->scroll_repeat);
- return 1;
- }
- }
- break;