| 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 |
.render = NULL
|
| 56 |
};
|
57 |
};
|
| 57 |
|
58 |
|
| 58 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
|
59 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_rockbox =
|
| 59 |
{
|
60 |
{
|
| 60 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
|
61 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 80)),
|
| 61 |
LIBUI_POINT(80, 80)),
|
62 |
LIBUI_POINT(80, 80)),
|
| 62 |
.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)),
|
| 63 |
LIBUI_POINT(80, 80)),
|
64 |
LIBUI_POINT(80, 80)),
|
| 64 |
.text = "Rockbox",
|
65 |
.text = "Rockbox",
|
| 65 |
.text_color = 0xffffcccc,
|
66 |
.text_color = 0xffffcccc,
|
| - |
|
67 |
.render = NULL
|
| 66 |
};
|
68 |
};
|
| 67 |
|
69 |
|
| 68 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
|
70 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_console =
|
| 69 |
{
|
71 |
{
|
| 70 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
|
72 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 160)),
|
| 71 |
LIBUI_POINT(80, 80)),
|
73 |
LIBUI_POINT(80, 80)),
|
| 72 |
.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)),
|
| 73 |
LIBUI_POINT(80, 80)),
|
75 |
LIBUI_POINT(80, 80)),
|
| 74 |
.text = "emCORE console",
|
76 |
.text = "emCORE console",
|
| 75 |
.text_color = 0xffffcccc,
|
77 |
.text_color = 0xffffcccc,
|
| - |
|
78 |
.render = NULL
|
| 76 |
};
|
79 |
};
|
| 77 |
|
80 |
|
| 78 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
|
81 |
static struct chooser_renderer_iconflow_itemdata mainchooser_rparams_toolchooser =
|
| 79 |
{
|
82 |
{
|
| 80 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
|
83 |
.icon = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 80), LIBUI_POINT(0, 240)),
|
| 81 |
LIBUI_POINT(80, 80)),
|
84 |
LIBUI_POINT(80, 80)),
|
| 82 |
.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)),
|
| 83 |
LIBUI_POINT(80, 80)),
|
86 |
LIBUI_POINT(80, 80)),
|
| 84 |
.text = "Tools",
|
87 |
.text = "Tools",
|
| 85 |
.text_color = 0xffffcccc,
|
88 |
.text_color = 0xffffcccc,
|
| - |
|
89 |
.render = NULL
|
| 86 |
};
|
90 |
};
|
| 87 |
|
91 |
|
| 88 |
static struct chooser_renderer_iconflow_params mainchooser_rparams =
|
92 |
static struct chooser_renderer_iconflow_params mainchooser_rparams =
|
| 89 |
{
|
93 |
{
|
| 90 |
.version = CHOOSER_RENDERER_ICONFLOW_PARAMS_VERSION,
|
94 |
.version = CHOOSER_RENDERER_ICONFLOW_PARAMS_VERSION,
|
| 91 |
.copy_dest = LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 0)),
|
95 |
.copy_dest = LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 0)),
|
| 92 |
.copy_src = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 0)),
|
96 |
.copy_src = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 0)),
|
| 93 |
LIBUI_POINT(320, 240)),
|
97 |
LIBUI_POINT(320, 240)),
|
| 94 |
.bg_dest = LIBUI_LOCATION(LIBUI_BUFFER(NULL, 0), LIBUI_POINT(0, 0)),
|
98 |
.bg_dest = LIBUI_LOCATION_NULL,
|
| 95 |
.bg_src = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 0), LIBUI_POINT(0, 0)),
|
- |
|
| 96 |
LIBUI_POINT(0, 0)),
|
99 |
.bg_src = LIBUI_SURFACE_NULL,
|
| 97 |
.bg_opacity = 0,
|
100 |
.bg_opacity = 0,
|
| 98 |
.fill_dest = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 0), LIBUI_POINT(0, 0)),
|
101 |
.fill_dest = LIBUI_SURFACE_NULL,
|
| 99 |
LIBUI_POINT(0, 0)),
|
- |
|
| 100 |
.fill_color = 0,
|
102 |
.fill_color = 0,
|
| 101 |
.viewport = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 30)),
|
103 |
.viewport = LIBUI_SURFACE(LIBUI_LOCATION(LIBUI_BUFFER(NULL, 320), LIBUI_POINT(0, 30)),
|
| 102 |
LIBUI_POINT(320, 130)),
|
104 |
LIBUI_POINT(320, 130)),
|
| 103 |
.text_pos = LIBUI_POINT(160, 215),
|
105 |
.text_pos = LIBUI_POINT(160, 215),
|
| 104 |
.blit_dest = LIBUI_POINT(0, 0),
|
106 |
.blit_dest = LIBUI_POINT(0, 0),
|
| Line 214... |
Line 216... |
| 214 |
}
|
216 |
}
|
| 215 |
|
217 |
|
| 216 |
void mainchooser_apply_settings()
|
218 |
void mainchooser_apply_settings()
|
| 217 |
{
|
219 |
{
|
| 218 |
mainchooser.defaultitem = settings.default_item;
|
220 |
mainchooser.defaultitem = settings.default_item;
|
| - |
|
221 |
if (settings.timeout_initial < SETTINGS_TIMEOUT_CUTOFF)
|
| 219 |
if (settings.timeout_initial < 3000000) mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
|
222 |
mainchooser_aparams.timeout_initial = TIMEOUT_BLOCK;
|
| 220 |
else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
|
223 |
else mainchooser_aparams.timeout_initial = settings.timeout_initial + 500000;
|
| - |
|
224 |
if (settings.timeout_idle < SETTINGS_TIMEOUT_CUTOFF)
|
| 221 |
if (settings.timeout_idle < 3000000) mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;
|
225 |
mainchooser_aparams.timeout_idle = TIMEOUT_BLOCK;
|
| 222 |
else mainchooser_aparams.timeout_idle = settings.timeout_idle + 500000;
|
226 |
else mainchooser_aparams.timeout_idle = settings.timeout_idle + 500000;
|
| 223 |
}
|
227 |
}
|