MCPcopy Create free account
hub / github.com/DFHack/dfhack / setHighlightByMouse

Method setHighlightByMouse

plugins/listcolumn.h:445–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443 }
444
445 bool setHighlightByMouse()
446 {
447 if (gps->mouse_y >= 3 && gps->mouse_y < display_max_rows + 3 &&
448 gps->mouse_x >= left_margin && gps->mouse_x < left_margin + max_item_width)
449 {
450 int new_index = display_start_offset + gps->mouse_y - 3;
451 if (size_t(new_index) < display_list.size())
452 {
453 setHighlight(new_index);
454 feed_mouse_set_highlight = true;
455 }
456
457 enabler->mouse_lbut = enabler->mouse_rbut = 0;
458
459 return true;
460 }
461
462 return false;
463 }
464
465 void sort(bool force_sort = false)
466 {

Callers 3

feedMethod · 0.80
feedMethod · 0.80
feedMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected