All pastes #145480 Raw Edit

courtc

public c v1 · immutable
#145480 ·published 2006-08-23 00:59 UTC
rendered paste body
TWidget * get_widget_under_mouse(void){	TWidget * ret = NULL;	TWidgetList * twl = win->widgets;	while (!ret && twl) {		if(strcmp(twl->v->name, "mouse"))			if((mouse->x > twl->v->x) && (mouse->x < (twl->v->x + twl->v->w)))				if((mouse->y > twl->v->y) && (mouse->y < (twl->v->y + twl->v->h)))					ret = twl->v;		twl = twl->next;	}	return ret;}