void ScrStartup_OnMain()
{    
    uint32_t elapsed = model.elapsed();
    if (elapsed>2000) {                        
        if (model.fadeColorUpdate(min(255lu, ((elapsed-2000)*255)/(3000)))) {
            uint8_t c = model.fadeColor();
            scrStartup_version.clrScheme->fore = D4D_COLOR_RGB(c,c,c);            
            D4D_InvalidateObject(&scrStartup_version, D4D_FALSE);
        }
    }
    if (model.timeout() || model.touched())
        uiController.notifyStartupComplete();
}
示例#2
0
#define INACTIVE_BG_COLOR D4D_COLOR_RGB(24,24,24)
#define ACTIVE_BG_COLOR D4D_COLOR_RGB(140,0,25)
#define INACTIVE_FG_LOW_COLOR D4D_COLOR_RGB(64,64,64)
#define ACTIVE_FG_LOW_COLOR D4D_COLOR_RGB(160,160,160)
#define INACTIVE_FS_COLOR D4D_COLOR_RGB(128,128,128)
#define ACTIVE_FG_COLOR D4D_COLOR_RGB(255,255,255)

static D4D_BOOL actuator_views_state[MAX_ACTUATOR_COUNT];

const WIDGET_COLOR_SCHEME color_scheme_device = {
    ACTIVE_BG_COLOR,           // bkg active
    INACTIVE_BG_COLOR,            // bkg disable
    ACTIVE_BG_COLOR,           // focus
    ACTIVE_BG_COLOR,           // capture
    D4D_COLOR_RGB(192,192,192), // fg
    D4D_COLOR_RGB(128,128,128), // fg inactive
    D4D_COLOR_RGB(255,255,255),
    D4D_COLOR_RGB(255,255,255),
};

const WIDGET_COLOR_SCHEME color_scheme_connection = {
    ACTIVE_BG_COLOR,           // bkg active
    INACTIVE_BG_COLOR,            // bkg disable
    ACTIVE_BG_COLOR,           // focus
    ACTIVE_BG_COLOR,           // capture
    ACTIVE_FG_LOW_COLOR,         // fg
    INACTIVE_FG_LOW_COLOR,            // fg disabled
    ACTIVE_FG_LOW_COLOR,         // fg focus
    ACTIVE_FG_LOW_COLOR,         // fg capture
};