/* boolean */
ATTR(overwrite)
ATTR(active)
-ATTR(cursor)
+ATTR(follow_cursor)
ATTR(orientation_removeme)
ATTR(tracking)
ATTR(menubar)
ATTR(vehicleprofile)
ATTR(roadprofile)
ATTR(announcement)
+ATTR(cursor)
ATTR2(0x0008ffff,type_object_end)
ATTR2(0x00090000,type_coord_begin)
ATTR2(0x0009ffff,type_coord_end)
&on, &off));
on.u.num=1;
off.u.num=0;
- on.type=off.type=attr_cursor;
+ on.type=off.type=attr_follow_cursor;
gui_internal_widget_append(w,
gui_internal_button_navit_attr_new(this, _("Map follows Vehicle"), gravity_left_center|orientation_horizontal|flags_fill,
&on, &off));
struct vehicleprofile *vehicleprofile;
GList *vehicleprofiles;
int pitch;
+ int follow_cursor;
};
struct gui *main_loop_gui;
this_->autozoom_secs = 10;
this_->autozoom_min = 7;
this_->autozoom_active = 0;
+ this_->follow_cursor = 1;
this_->trans = transform_new();
transform_from_geo(pro, &g, &co);
case attr_message:
navit_add_message(this_, attr->u.str);
break;
+ case attr_follow_cursor:
+ attr_updated=(this_->follow_cursor != !!attr->u.num);
+ this_->follow_cursor=!!attr->u.num;
+ break;
default:
return 0;
}
gui_disable_suspend(this_->gui);
transform(this_->trans, pro, &nv->coord, &cursor_pnt, 1, 0, 0, NULL);
- if (this_->button_pressed != 1 && nv->follow_curr <= nv->follow &&
+ if (this_->button_pressed != 1 && this_->follow_cursor && nv->follow_curr <= nv->follow &&
(nv->follow_curr == 1 || !transform_within_border(this_->trans, &cursor_pnt, border)))
navit_set_center_cursor(this_);
else