Changeset 1960
- Timestamp:
- 07/08/12 01:26:08 (11 months ago)
- Location:
- branches/philmoz-uitest
- Files:
-
- 3 edited
-
CHDK/LANG/english.lng (modified) (1 diff)
-
core/gui.c (modified) (3 diffs)
-
core/gui_lang.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/philmoz-uitest/CHDK/LANG/english.lng
r1949 r1960 681 681 557 " Help Screen Delay" 682 682 558 "CHDK Settings" 683 684 // <ALT> mode help screen text 685 559 "%-20s %-14s" // Header format, adjust if needed; but total len must be 35 686 560 "<ALT> Shortcuts" // Len must be <= first string in header format (20) 687 561 "Shutter Half Press +" // Len must be <= first string in header format (20) 688 562 "MENU=CHDK Menu" // Len must be <= second string in header format (14) 689 563 "MENU=User Menu" // Len must be <= second string in header format (14) 690 564 "SET=Script Menu, SHUTTER=Run Script" // Len must be <= 35 691 565 "Focus %5s=Inf. %5s=HyperFocal" // Len must be <= 35 692 566 "Manual Focus" 693 567 "Hide CHDK OSD while pressed" 694 568 " * - not available in <ALT> mode " // Len must be <= 35 -
branches/philmoz-uitest/core/gui.c
r1959 r1960 2134 2134 } 2135 2135 2136 static int shortcut_text(int x, int y, int button, int func_str, const char *state )2136 static int shortcut_text(int x, int y, int button, int func_str, const char *state, color col) 2137 2137 { 2138 2138 buf[0] = 0; 2139 sprintf(buf,"%-5s %20s",gui_shortcut_text(button),lang_str(func_str));2140 buf[26] = 0;2141 2139 if (state) 2142 2140 { 2141 sprintf(buf,"%-5s %20s",gui_shortcut_text(button),lang_str(func_str)); 2142 buf[26] = 0; 2143 2143 sprintf(buf+strlen(buf)," [%6s",state); 2144 2144 buf[34] = 0; 2145 2145 strcat(buf,"]"); 2146 2146 } 2147 else if (button) 2148 { 2149 sprintf(buf,"%-5s %29s",gui_shortcut_text(button),lang_str(func_str)); 2150 } 2147 2151 else 2148 strcat(buf," "); 2149 draw_string(x, y, buf, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2152 { 2153 sprintf(buf,"%-35s",lang_str(func_str)); 2154 } 2155 buf[35] = 0; 2156 draw_string(x, y, buf, col); 2150 2157 return y + FONT_HEIGHT; 2151 2158 } … … 2178 2185 int x = ((CAM_SCREEN_WIDTH/2)-(FONT_WIDTH*35/2)); 2179 2186 2180 if (conf.user_menu_enable && conf.user_menu_as_root) 2181 draw_string(x, y, "<ALT> Shortcuts MENU=User Menu", MAKE_COLOR(COLOR_FG, COLOR_ALT_BG)); 2182 else 2183 draw_string(x, y, "<ALT> Shortcuts MENU=CHDK Menu", MAKE_COLOR(COLOR_FG, COLOR_ALT_BG)); 2187 sprintf(buf,lang_str(LANG_HELP_HEADER), 2188 lang_str(LANG_HELP_ALT_SHORTCUTS), 2189 (conf.user_menu_enable && conf.user_menu_as_root)?lang_str(LANG_HELP_USER_MENU):lang_str(LANG_HELP_CHDK_MENU)); 2190 buf[35] = 0; 2191 draw_string(x, y, buf, MAKE_COLOR(COLOR_FG, COLOR_ALT_BG)); 2184 2192 y += FONT_HEIGHT; 2185 if (conf.user_menu_enable) 2186 { 2187 if (conf.user_menu_as_root) 2188 draw_string(x, y, "Shutter Half Press + MENU=CHDK Menu", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2189 else 2190 draw_string(x, y, "Shutter Half Press + MENU=User Menu", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2191 y += FONT_HEIGHT; 2192 } 2193 draw_string(x, y, "SET=Script Menu, SHUTTER=Run Script", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2193 2194 sprintf(buf,lang_str(LANG_HELP_HEADER), 2195 lang_str(LANG_HELP_HALF_PRESS), 2196 (conf.user_menu_enable)?((conf.user_menu_enable && conf.user_menu_as_root)?lang_str(LANG_HELP_CHDK_MENU):lang_str(LANG_HELP_USER_MENU)):""); 2197 buf[35] = 0; 2198 draw_string(x, y, buf, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2194 2199 y += FONT_HEIGHT; 2195 2200 2201 draw_string(x, y, lang_str(LANG_HELP_SCRIPTS), MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2202 y += FONT_HEIGHT; 2203 2196 2204 #if !defined(CAM_HAS_MANUAL_FOCUS) && defined(SHORTCUT_MF_TOGGLE) 2197 y = shortcut_text(x, y, SHORTCUT_MF_TOGGLE, (int)"Manual Focus",gui_on_off_enum(0,&conf.subj_dist_override_koef));2205 y = shortcut_text(x, y, SHORTCUT_MF_TOGGLE,LANG_HELP_MANUAL_FOCUS,gui_on_off_enum(0,&conf.subj_dist_override_koef), MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2198 2206 #endif 2199 2207 2200 2208 if (shooting_get_common_focus_mode()) // Check in manual focus mode 2201 2209 { 2202 sprintf(buf, "Focus %5s=Inf. %5s=HyperFocal",gui_shortcut_text(SHORTCUT_SET_INFINITY),gui_shortcut_text(SHORTCUT_SET_HYPERFOCAL));2210 sprintf(buf,lang_str(LANG_HELP_FOCUS),gui_shortcut_text(SHORTCUT_SET_INFINITY),gui_shortcut_text(SHORTCUT_SET_HYPERFOCAL)); 2203 2211 draw_string(x, y, buf, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2204 2212 y += FONT_HEIGHT; … … 2207 2215 #ifdef OPT_DEBUGGING 2208 2216 if (conf.debug_shortcut_action) 2209 y = shortcut_text(x, y, SHORTCUT_TOGGLE_RAW,LANG_MENU_DEBUG_SHORTCUT_ACTION,gui_debug_shortcut_modes[conf.debug_shortcut_action] );2217 y = shortcut_text(x, y, SHORTCUT_TOGGLE_RAW,LANG_MENU_DEBUG_SHORTCUT_ACTION,gui_debug_shortcut_modes[conf.debug_shortcut_action], MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2210 2218 else 2211 2219 #endif 2212 y = shortcut_text(x, y, SHORTCUT_TOGGLE_RAW,LANG_MENU_RAW_SAVE,(conf.save_raw?(conf.dng_raw?"DNG":"RAW"):"Off")); 2213 2214 draw_string(x, y, "Shutter Half Press + ", MAKE_COLOR(COLOR_FG, COLOR_ALT_BG)); 2215 y += FONT_HEIGHT; 2216 2217 y = shortcut_text(x, y, SHORTCUT_DISABLE_OVERRIDES,LANG_MENU_OVERRIDE_DISABLE,gui_override_disable_modes[conf.override_disable]); 2218 y = shortcut_text(x, y, SHORTCUT_TOGGLE_HISTO,LANG_MENU_HISTO_SHOW,gui_histo_show_modes[conf.show_histo]); 2219 y = shortcut_text(x, y, SHORTCUT_TOGGLE_ZEBRA,LANG_MENU_ZEBRA_DRAW,gui_on_off_enum(0,&conf.zebra_draw)); 2220 y = shortcut_text(x, y, SHORTCUT_TOGGLE_OSD,LANG_MENU_OSD_SHOW,gui_on_off_enum(0,&conf.show_osd)); 2220 y = shortcut_text(x, y, SHORTCUT_TOGGLE_RAW,LANG_MENU_RAW_SAVE,(conf.save_raw?(conf.dng_raw?"DNG":"RAW"):"Off"), MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2221 2222 y = shortcut_text(x, y, 0 ,LANG_HELP_HALF_PRESS, 0, MAKE_COLOR(COLOR_FG, COLOR_ALT_BG)); 2223 2224 y = shortcut_text(x, y, SHORTCUT_DISABLE_OVERRIDES,LANG_MENU_OVERRIDE_DISABLE,gui_override_disable_modes[conf.override_disable], MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2225 y = shortcut_text(x, y, SHORTCUT_TOGGLE_HISTO,LANG_MENU_HISTO_SHOW,gui_histo_show_modes[conf.show_histo], MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2226 y = shortcut_text(x, y, SHORTCUT_TOGGLE_ZEBRA,LANG_MENU_ZEBRA_DRAW,gui_on_off_enum(0,&conf.zebra_draw), MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2227 y = shortcut_text(x, y, SHORTCUT_TOGGLE_OSD,LANG_MENU_OSD_SHOW,gui_on_off_enum(0,&conf.show_osd), MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2221 2228 2222 2229 if (conf.hide_osd == 0) 2223 { 2224 sprintf(buf,"%-5s = Hide CHDK OSD while pressed",gui_shortcut_text(KEY_DISPLAY)); 2225 draw_string(x, y, buf, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2226 y += FONT_HEIGHT; 2227 } 2230 y = shortcut_text(x, y, KEY_DISPLAY, LANG_HELP_HIDE_OSD, 0, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2228 2231 2229 2232 if (is_menu_shortcut) 2230 { 2231 draw_string(x, y, " * - not available in <ALT> mode ", MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2232 y += FONT_HEIGHT; 2233 } 2233 y = shortcut_text(x, y, 0 ,LANG_HELP_NOT_ALT, 0, MAKE_COLOR(COLOR_ALT_BG, COLOR_FG)); 2234 2234 } 2235 2235 -
branches/philmoz-uitest/core/gui_lang.h
r1945 r1960 684 684 #define LANG_MENU_CHDK_SETTINGS 558 685 685 686 #define GUI_LANG_ITEMS 558 686 // <ALT> mode help screen text 687 #define LANG_HELP_HEADER 559 688 #define LANG_HELP_ALT_SHORTCUTS 560 689 #define LANG_HELP_HALF_PRESS 561 690 #define LANG_HELP_CHDK_MENU 562 691 #define LANG_HELP_USER_MENU 563 692 #define LANG_HELP_SCRIPTS 564 693 #define LANG_HELP_FOCUS 565 694 #define LANG_HELP_MANUAL_FOCUS 566 695 #define LANG_HELP_HIDE_OSD 567 696 #define LANG_HELP_NOT_ALT 568 697 698 #define GUI_LANG_ITEMS 568 687 699 688 700 //-------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.