Subversion Repositories freemyipod

Rev

Rev 823 | Rev 834 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 823 Rev 833
Line 37... Line 37...
37
    struct chooser_action_handler_wheel_data* adata;
37
    struct chooser_action_handler_wheel_data* adata;
38
    adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
38
    adata = (struct chooser_action_handler_wheel_data*)(data->actionhandlerdata);
39
    if (adata->timeout_remaining != TIMEOUT_BLOCK)
39
    if (adata->timeout_remaining != TIMEOUT_BLOCK)
40
    {
40
    {
41
        snprintf(buf, sizeof(buf), "%3d", adata->timeout_remaining / 1000000);
41
        snprintf(buf, sizeof(buf), "%3d", adata->timeout_remaining / 1000000);
42
        rendertext(framebuf, 299, 229, 320, 0xffffcccc, 0, buf);
42
        rendertext(framebuf, 299, 229, 320, 0xcf7f0000, 0, buf);
43
    }
43
    }
44
    update_display(data);
44
    update_display(data);
45
    return false;
45
    return false;
46
}
46
}
47
 
47
 
Line 51... Line 51...
51
                          LIBUI_POINT(80, 80)),
51
                          LIBUI_POINT(80, 80)),
52
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 0)),
52
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 0)),
53
                                   LIBUI_POINT(80, 80)),
53
                                   LIBUI_POINT(80, 80)),
54
    .text = "Power off",
54
    .text = "Power off",
55
    .text_color = 0xffffcccc,
55
    .text_color = 0xffffcccc,
-
 
56
    .text_bgcolor = 0x7f000000,
56
    .render = NULL
57
    .render = NULL
57
};
58
};
58
 
59
 
59
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
60
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
60
{
61
{
Line 62... Line 63...
62
                          LIBUI_POINT(80, 80)),
63
                          LIBUI_POINT(80, 80)),
63
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
64
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
64
                                   LIBUI_POINT(80, 80)),
65
                                   LIBUI_POINT(80, 80)),
65
    .text = "Rockbox",
66
    .text = "Rockbox",
66
    .text_color = 0xffffcccc,
67
    .text_color = 0xffffcccc,
-
 
68
    .text_bgcolor = 0x7f000000,
67
    .render = NULL
69
    .render = NULL
68
};
70
};
69
 
71
 
70
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
72
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
71
{
73
{
Line 73... Line 75...
73
                          LIBUI_POINT(80, 80)),
75
                          LIBUI_POINT(80, 80)),
74
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
76
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
75
                                   LIBUI_POINT(80, 80)),
77
                                   LIBUI_POINT(80, 80)),
76
    .text = "emCORE console",
78
    .text = "emCORE console",
77
    .text_color = 0xffffcccc,
79
    .text_color = 0xffffcccc,
-
 
80
    .text_bgcolor = 0x7f000000,
78
    .render = NULL
81
    .render = NULL
79
};
82
};
80
 
83
 
81
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
84
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
82
{
85
{
Line 84... Line 87...
84
                          LIBUI_POINT(80, 80)),
87
                          LIBUI_POINT(80, 80)),
85
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
88
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
86
                                   LIBUI_POINT(80, 80)),
89
                                   LIBUI_POINT(80, 80)),
87
    .text = "Tools",
90
    .text = "Tools",
88
    .text_color = 0xffffcccc,
91
    .text_color = 0xffffcccc,
-
 
92
    .text_bgcolor = 0x7f000000,
89
    .render = NULL
93
    .render = NULL
90
};
94
};
91
 
95
 
92
static struct chooser_renderer_iconflow_params mainchooser_rparams =
96
static struct chooser_renderer_iconflow_params mainchooser_rparams =
93
{
97
{
Line 216... Line 220...
216
}
220
}
217
 
221
 
218
void mainchooser_apply_settings()
222
void mainchooser_apply_settings()
219
{
223
{
220
    mainchooser.defaultitem = settings.default_item;
224
    mainchooser.defaultitem = settings.default_item;
-
 
225
    if (settings.snow) mainchooser.tickinterval = 50000;
-
 
226
    else mainchooser.tickinterval = 990000;
221
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
227
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
222
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
228
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
223
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
229
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
224
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
230
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
225
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;
231
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;