Commit 3b0b6932 authored by claes's avatar claes

Click sensitivity was to short, borderlimits was not updated

parent dd536480
...@@ -160,6 +160,7 @@ void GrowMenu::draw( GlowTransform *t, int highlight, int hot, void *node, void ...@@ -160,6 +160,7 @@ void GrowMenu::draw( GlowTransform *t, int highlight, int hot, void *node, void
ur_x = ll_x + int(min_width * ctx->zoom_factor_x); ur_x = ll_x + int(min_width * ctx->zoom_factor_x);
ur_y = ll_y + int(tot_z_height); ur_y = ll_y + int(tot_z_height);
ur.posit_z( ur_x + ctx->offset_x, ur_y + ctx->offset_y); ur.posit_z( ur_x + ctx->offset_x, ur_y + ctx->offset_y);
get_node_borders();
if ( fill) { if ( fill) {
glow_draw_fill_rect( ctx, ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, fill_drawtype); glow_draw_fill_rect( ctx, ll_x, ll_y, ur_x - ll_x, ur_y - ll_y, fill_drawtype);
...@@ -329,6 +330,7 @@ int GrowMenu::event_handler( glow_eEvent event, int x, int y, double fx, ...@@ -329,6 +330,7 @@ int GrowMenu::event_handler( glow_eEvent event, int x, int y, double fx,
double fy) double fy)
{ {
int sts; int sts;
int csts;
double rx, ry; double rx, ry;
...@@ -393,11 +395,16 @@ int GrowMenu::event_handler( glow_eEvent event, int x, int y, double fx, ...@@ -393,11 +395,16 @@ int GrowMenu::event_handler( glow_eEvent event, int x, int y, double fx,
} }
break; break;
} }
case glow_eEvent_MB1Down:
glow_draw_set_click_sensitivity( ctx, glow_mSensitivity_MB1Click);
break;
case glow_eEvent_MB1Click: { case glow_eEvent_MB1Click: {
sts = local_event_handler( event, rx, ry); sts = local_event_handler( event, rx, ry);
if ( sts && current_item != -1) { if ( sts && current_item != -1) {
if ( info.item[current_item].type == glow_eMenuItem_Button) { if ( info.item[current_item].type == glow_eMenuItem_Button) {
((GrowCtx *)ctx)->send_menu_callback( this, current_item, glow_eEvent_MenuActivated, fx, fy); csts = ((GrowCtx *)ctx)->send_menu_callback( this, current_item, glow_eEvent_MenuActivated, fx, fy);
if ( csts == GLOW__TERMINATED)
return csts;
// Send delete callback for the root menu of this node // Send delete callback for the root menu of this node
GrowMenu *e; GrowMenu *e;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment