Exemplo n.º 1
0
void PAGE_LoadSaveInit(int page)
{
    const char *name;
    int num_models;
    int selected;
    int width = LCD_WIDTH;
    mp->menu_type = page;
    OBJ_SET_USED(&gui->image, 0);

    if (page == SAVE_MODEL) {
        name = _tr("Press ENT to copy to");
    } else {
        name = _tr("Press ENT to load");
    }
    if (page == LOAD_ICON) {
        width = 75;
        GUI_CreateImage(&gui->image, 75, 20, 52, 36, mp->iconstr);
        GUI_SelectionNotify(icon_notify_cb);
    }
    selected = get_scroll_count(page);

    num_models = mp->total_items; /* set by get_scroll_page */
    PAGE_ShowHeader(name);
    GUI_CreateScrollable(&gui->scrollable, 0, HEADER_HEIGHT, width, LCD_HEIGHT - HEADER_HEIGHT,
                         LINE_SPACE, num_models, row_cb, NULL, NULL, NULL);
    GUI_SetSelected(GUI_ShowScrollableRowCol(&gui->scrollable, selected, 0));
}
Exemplo n.º 2
0
static void window_next_page(void)
{
	gui_window_scroll(active_win, get_scroll_count());
}
Exemplo n.º 3
0
static void window_prev_page(void)
{
	gui_window_scroll(active_win, -get_scroll_count());
}