- {
- MouseCursor::current()->set_pos(mouse_pos);
- }
-
- float x = mouse_pos.x;
- float y = mouse_pos.y;
-
- if(x > pos.x - get_width()/2 &&
- x < pos.x + get_width()/2 &&
- y > pos.y - get_height()/2 &&
- y < pos.y + get_height()/2)
- {
- int new_active_item
- = static_cast<int> ((y - (pos.y - get_height()/2)) / 24);
-
- /* only change the mouse focus to a selectable item */
- if ((items[new_active_item]->kind != MN_HL)
- && (items[new_active_item]->kind != MN_LABEL)
- && (items[new_active_item]->kind != MN_INACTIVE))
- active_item = new_active_item;
-
- if(MouseCursor::current())
- MouseCursor::current()->set_state(MC_LINK);
- }
- else
- {
- if(MouseCursor::current())
- MouseCursor::current()->set_state(MC_NORMAL);
- }