mx -= parent->get_x() + x; my -= parent->get_y() + y; Shape_frame *cshape = gwin->get_gump_shape(shapenum, 0); if (!cshape->has_point(mx, my))
if (!on_widget(gwin, mx, my))
int Gump_text::mouse_clicked	(	Game_window *gwin,	int mx, int my			// Mouse position on screen.	)	{	mx -= parent->get_x() + x;	// Get point rel. to this.	my -= parent->get_y() + y;	Shape_frame *cshape = gwin->get_gump_shape(shapenum, 0);	if (!cshape->has_point(mx, my))		return (0);	if (!focus)			// Gaining focus?		{		focus = 1;		// We have focus now.		cursor = 0;		// Put cursor at start.		}	else		{		for (cursor = 0; cursor <= length; cursor++)			if (gwin->get_text_width(2, text, cursor) > mx - textx)				{				if (cursor > 0)					cursor--;				break;				}		}	paint();	gwin->set_painted();	return (1);	}