static MENU_UPDATE_FUNC(script_display) { int script_displayed = (int) entry->priv; if (entry->selected && script_state == SCRIPT_IDLE) script_selected = script_displayed; // change selected script as we scroll thru menu (if not running, of course) int displayed_script_is_idle = (script_state == SCRIPT_IDLE) || (script_selected != script_displayed); if (displayed_script_is_idle) { MENU_SET_RINFO( script_titles[script_displayed] ); MENU_SET_ICON(MNI_SUBMENU, entry->selected && script_displayed == script_selected); MENU_SET_ENABLED(0); MENU_SET_VALUE(""); } else { MENU_SET_ICON(MNI_ON, 0); MENU_SET_ENABLED(1); MENU_SET_VALUE("(%s)", get_script_status_msg()); } }
static MENU_UPDATE_FUNC(lens_av_upd) { if(!lens_av) { MENU_SET_VALUE("OFF"); MENU_SET_ENABLED(0); MENU_SET_ICON(IT_DICE_OFF, 0); } else if (lens_av == LENS_AV_THIS) { int ap = AV2STR(RAW2AV(lens_info.raw_aperture_min)); MENU_SET_VALUE("this lens f/%d.%d", ap / 10, ap % 10); MENU_SET_ENABLED(1); MENU_SET_ICON(IT_DICE, 0); } else { int ap = AV2STR(lens_av); MENU_SET_VALUE("f/%d.%d", ap / 10, ap % 10); MENU_SET_ENABLED(1); MENU_SET_ICON(IT_DICE, 0); } MENU_CUSTOM_DRAW(av); }
static MENU_UPDATE_FUNC(script_run_display) { if (script_state) { MENU_SET_NAME( "Script %s...", get_script_status_msg() ); MENU_SET_ICON(MNI_RECORD, 0); } else { MENU_SET_NAME("Run script"); } }
static MENU_UPDATE_FUNC(focus_show_a) { if (entry->selected) override_zoom_buttons = 1; MENU_SET_VALUE( "%s%d%s", focus_task_delta > 0 ? "+" : focus_task_delta < 0 ? "-" : "", ABS(focus_task_delta), focus_task_delta ? "steps from here" : " (here)" ); MENU_SET_ICON(MNI_BOOL(focus_task_delta), 0); MENU_SET_ENABLED(focus_task_delta); }