MCPcopy Create free account
hub / github.com/cococry/leif / lf_hovered

Function lf_hovered

leif.c:3403–3408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3401}
3402
3403bool lf_hovered(vec2s pos, vec2s size) {
3404 bool hovered = lf_get_mouse_x() <= (pos.x + size.x) && lf_get_mouse_x() >= (pos.x) &&
3405 lf_get_mouse_y() <= (pos.y + size.y) && lf_get_mouse_y() >= (pos.y) &&
3406 ((state.selected_div.id == state.current_div.id && state.grabbed_div.id == -1) || (state.grabbed_div.id == state.current_div.id && state.grabbed_div.id != -1));
3407 return hovered;
3408}
3409
3410bool lf_area_hovered(vec2s pos, vec2s size) {
3411 bool hovered = lf_get_mouse_x() <= (pos.x + size.x) && lf_get_mouse_x() >= (pos.x) &&

Callers 6

button_exFunction · 0.85
div_containerFunction · 0.85
draw_scrollbar_onFunction · 0.85
button_element_locFunction · 0.85
button_fixed_element_locFunction · 0.85
dropdown_menu_item_locFunction · 0.85

Calls 2

lf_get_mouse_xFunction · 0.85
lf_get_mouse_yFunction · 0.85

Tested by

no test coverage detected