mirror of
https://gitee.com/anod/open_agb_firm.git
synced 2025-05-06 22:04:10 +08:00
翻页处理的方式修改,不再是滚动而是翻页了
This commit is contained in:
parent
dfe3018031
commit
0170a6b4ca
@ -200,10 +200,8 @@ static void draw_options( int start_row, int start_idx, int option_cnt, int sele
|
||||
screen_clean(); \
|
||||
if( idx_top < title_len ) \
|
||||
{ \
|
||||
uint8_t* title_data[2]; \
|
||||
title_data[0] = (uint8_t*)title; \
|
||||
title_data[1] = &title_offset[idx_top]; \
|
||||
container_paint( title_paint, (atp_callerdata_t)title_data, title_len-idx_top, idx_top ); \
|
||||
uint8_t* title_data[2] = {(uint8_t*)title, title_offset}; \
|
||||
container_paint( title_paint, (atp_callerdata_t)title_data, title_len, idx_top ); \
|
||||
draw_options( title_len - idx_top, 0, cnt, item_sel, provider, data ); \
|
||||
} \
|
||||
else draw_options( 0, idx_top - title_len, cnt, item_sel, provider, data ); \
|
||||
@ -287,14 +285,10 @@ atp_error_t atp_select( atp_text_t title, atp_counter_t cnt, atp_itemprovider_t
|
||||
else if( sel < 0 ) sel = (int)cnt-1;
|
||||
|
||||
// 更新idx_top
|
||||
int top = title_len + sel;
|
||||
int sel_row = title_len + sel;
|
||||
int top = sel_row - sel_row % CONTAINER_MAX_LINES;
|
||||
atp_boolean_t full_refresh = 0;
|
||||
if( top >= idx_top + CONTAINER_MAX_LINES )
|
||||
{
|
||||
idx_top = 1 + top - CONTAINER_MAX_LINES;
|
||||
full_refresh = 1;
|
||||
}
|
||||
else if( top < idx_top )
|
||||
if( top != idx_top )
|
||||
{
|
||||
idx_top = top;
|
||||
full_refresh = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user