Changeset 1350


Ignore:
Timestamp:
10/01/11 12:20:02 (20 months ago)
Author:
philmoz
Message:

OSD icon/text display for USB Remote from waterwingz/CHDK-DE.

Location:
trunk
Files:
2 added
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/CHDK/LANG/english.lng

    r1338 r1350  
    601601463 "Video AE Controls" 
    602602464 "<Alt> Shortcut Buttons" 
     603465 "USB Remote" 
     604466 "Show USB Remote Status" 
  • trunk/core/Makefile

    r1033 r1350  
    7575     gui_fselect.o gui.o kbd.o action_stack.o conf.o \ 
    7676     histogram.o gui_batt.o gui_space.o gui_osd.o raw.o \ 
    77      gui_lang.o gui_mpopup.o gui_grid.o raw_merge.o \ 
     77     gui_usb.o gui_lang.o gui_mpopup.o gui_grid.o raw_merge.o \ 
    7878     levent.o shot_histogram.o dng.o bitvector.o console.o $(OPT_OBJS) 
    7979 
  • trunk/core/conf.c

    r1348 r1350  
    5757static int def_ubasic_vars[SCRIPT_NUM_PARAMS] = {0}; 
    5858static int def_batt_volts_max, def_batt_volts_min; 
    59 static OSD_pos def_histo_pos, def_dof_pos, def_batt_icon_pos, def_space_icon_pos, def_space_hor_pos, def_space_ver_pos, def_batt_txt_pos, def_space_txt_pos,  
     59static OSD_pos def_histo_pos, def_dof_pos, def_batt_icon_pos, def_usb_info_pos, def_space_icon_pos, def_space_hor_pos, def_space_ver_pos, def_batt_txt_pos, def_space_txt_pos,  
    6060               def_mode_state_pos, def_mode_raw_pos, def_mode_video_pos, def_mode_ev_pos, def_values_pos, def_clock_pos, def_ev_video_pos, def_temp_pos; 
    6161static int def_user_menu_vars[USER_MENU_ITEMS] = {0}; 
     
    406406    CONF_INFO(244, conf.touchscreen_disable_video_controls, CONF_DEF_VALUE, i:0, NULL), 
    407407    CONF_INFO(245, conf.touchscreen_disable_shortcut_controls, CONF_DEF_VALUE, i:0, NULL), 
    408     }; 
     408 
     409        // USB Icon enable & position 
     410    CONF_INFO(246, conf.usb_info_enable, CONF_DEF_VALUE, i:0, NULL), 
     411    CONF_INFO(247, conf.usb_info_pos,    CONF_DEF_PTR,  ptr:&def_usb_info_pos, NULL), 
     412 
     413   }; 
    409414#define CONF_NUM (sizeof(conf_info)/sizeof(conf_info[0])) 
    410415 
     
    523528    def_batt_txt_pos.x=178; 
    524529    def_batt_txt_pos.y=1*FONT_HEIGHT; 
     530    def_usb_info_pos.x = 95; 
     531    def_usb_info_pos.y = 0; 
    525532    def_space_icon_pos.x = vid_get_bitmap_screen_width()-100; 
    526533    def_space_icon_pos.y = 0; 
  • trunk/core/gui.c

    r1349 r1350  
    3232#include "gui_fselect.h" 
    3333#include "gui_batt.h" 
     34#include "gui_usb.h" 
    3435#include "gui_space.h" 
    3536#include "gui_osd.h" 
     
    764765static const char* gui_temp_mode_modes[] = { "Off", "Optical", "CCD", "Battery", "all" }; 
    765766static const char* gui_hide_osd_modes[] = { "Don't", "In Playback", "On Disp Press", "Both"}; 
     767static const char* gui_show_usb_info_modes[] = { "Off", "Icon", "Text"}; 
    766768static CMenuItem osd_submenu_items[] = { 
    767769    MENU_ITEM(0x5c,LANG_MENU_OSD_SHOW,                MENUITEM_BOOL,      &conf.show_osd, 0 ), 
     
    776778    MENU_ENUM2(0x5f,LANG_MENU_OSD_SHOW_TEMP,         &conf.show_temp, gui_temp_mode_modes ), 
    777779    MENU_ITEM(0x59,LANG_MENU_OSD_TEMP_FAHRENHEIT,      MENUITEM_BOOL,      &conf.temperature_unit, 0 ), 
     780    MENU_ENUM2(0x71,LANG_MENU_USB_SHOW_INFO,         &conf.usb_info_enable, gui_show_usb_info_modes ), 
    778781    MENU_ITEM(0x72,LANG_MENU_OSD_LAYOUT_EDITOR,       MENUITEM_PROC,      gui_draw_osd_le, 0 ), 
    779782    MENU_ITEM(0x2f,LANG_MENU_OSD_GRID_PARAMS,         MENUITEM_SUBMENU,   &grid_submenu, 0 ), 
     
    25152518        gui_batt_draw_osd(); 
    25162519        gui_space_draw_osd(); 
     2520        gui_usb_draw_osd(); 
    25172521        if (conf.fast_ev && !mode_video && (m&MODE_MASK) == MODE_REC ) gui_osd_draw_ev(); 
    25182522    } 
  • trunk/core/gui_lang.c

    r1338 r1350  
    588588"463 \"Video AE Controls\"\n" 
    589589"464 \"<Alt> Shortcut Buttons\"\n" 
     590 
     591// USB Remote icon 
     592"465 \"USB Remote\"\n" 
     593"466 \"Show USB Remote Status\"\n" 
    590594; 
    591595 
  • trunk/core/gui_lang.h

    r1338 r1350  
    577577#define LANG_MENU_TS_VIDEO_AE_DISABLE       463 
    578578#define LANG_MENU_TS_ALT_SHORTCUTS_DISABLE  464 
     579 
     580// USB remote icon 
     581#define LANG_OSD_LAYOUT_EDITOR_USB_INFO         465 
     582#define LANG_MENU_USB_SHOW_INFO                 466 
    579583//------------------------------------------------------------------- 
    580584 
    581 #define GUI_LANG_ITEMS                  464 
     585#define GUI_LANG_ITEMS                  466 
    582586 
    583587//------------------------------------------------------------------- 
  • trunk/core/gui_osd.c

    r1245 r1350  
    1111#include "gui_lang.h" 
    1212#include "gui_batt.h" 
     13#include "gui_usb.h" 
    1314#include "gui_space.h" 
    1415#include "gui_grid.h" 
     
    4142    {LANG_OSD_LAYOUT_EDITOR_EV_VIDEO,         &conf.ev_video_pos,     {70,24}}, 
    4243#endif 
     44    {LANG_OSD_LAYOUT_EDITOR_USB_INFO,   &conf.usb_info_pos,    {31, 14}},   
    4345    {0} 
    4446}; 
     
    119121        gui_osd_draw_ev_video(1); 
    120122      #endif 
     123        gui_usb_draw_osd(); 
    121124        for (i=1; i<=2; ++i) { 
    122125            draw_rect((osd[curr_item].pos->x>=i)?osd[curr_item].pos->x-i:0, (osd[curr_item].pos->y>=i)?osd[curr_item].pos->y-i:0,  
  • trunk/include/conf.h

    r1348 r1350  
    126126    OSD_pos temp_pos; 
    127127    OSD_pos ev_video_pos; 
     128    OSD_pos usb_info_pos; 
    128129 
    129130    color histo_color; 
     
    298299    int touchscreen_disable_video_controls; 
    299300    int touchscreen_disable_shortcut_controls; 
     301 
     302        // Enable USB icon 
     303    int usb_info_enable;  
    300304} Conf; 
    301305 
Note: See TracChangeset for help on using the changeset viewer.