Subversion Repositories freemyipod

Rev

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

Rev 834 Rev 843
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, 0xcf7f0000, 0, buf);
42
        rendertext(framebuf, 299, 229, 320, 0xffffcccc, 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,
-
 
57
    .render = NULL
56
    .render = NULL
58
};
57
};
59
 
58
 
60
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
59
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
61
{
60
{
Line 63... Line 62...
63
                          LIBUI_POINT(80, 80)),
62
                          LIBUI_POINT(80, 80)),
64
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
63
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
65
                                   LIBUI_POINT(80, 80)),
64
                                   LIBUI_POINT(80, 80)),
66
    .text = "Rockbox",
65
    .text = "Rockbox",
67
    .text_color = 0xffffcccc,
66
    .text_color = 0xffffcccc,
68
    .text_bgcolor = 0x7f000000,
-
 
69
    .render = NULL
67
    .render = NULL
70
};
68
};
71
 
69
 
72
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
70
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
73
{
71
{
Line 75... Line 73...
75
                          LIBUI_POINT(80, 80)),
73
                          LIBUI_POINT(80, 80)),
76
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
74
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
77
                                   LIBUI_POINT(80, 80)),
75
                                   LIBUI_POINT(80, 80)),
78
    .text = "emCORE console",
76
    .text = "emCORE console",
79
    .text_color = 0xffffcccc,
77
    .text_color = 0xffffcccc,
80
    .text_bgcolor = 0x7f000000,
-
 
81
    .render = NULL
78
    .render = NULL
82
};
79
};
83
 
80
 
84
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
81
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
85
{
82
{
Line 87... Line 84...
87
                          LIBUI_POINT(80, 80)),
84
                          LIBUI_POINT(80, 80)),
88
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
85
    .icon_selected = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
89
                                   LIBUI_POINT(80, 80)),
86
                                   LIBUI_POINT(80, 80)),
90
    .text = "Tools",
87
    .text = "Tools",
91
    .text_color = 0xffffcccc,
88
    .text_color = 0xffffcccc,
92
    .text_bgcolor = 0x7f000000,
-
 
93
    .render = NULL
89
    .render = NULL
94
};
90
};
95
 
91
 
96
static struct chooser_renderer_iconflow_params mainchooser_rparams =
92
static struct chooser_renderer_iconflow_params mainchooser_rparams =
97
{
93
{
Line 218... Line 214...
218
}
214
}
219
 
215
 
220
void mainchooser_apply_settings()
216
void mainchooser_apply_settings()
221
{
217
{
222
    mainchooser.defaultitem = settings.default_item;
218
    mainchooser.defaultitem = settings.default_item;
223
    if (settings.snow) mainchooser.tickinterval = 50000;
-
 
224
    else mainchooser.tickinterval = 990000;
-
 
225
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
219
    if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
226
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
220
        mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
227
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
221
    else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
228
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
222
    if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
229
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;
223
        mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;