23 #define PACK_SQUARE (Char_Width * DRAW_GetCharMagniCoeff() * 3)
25 #define PACK_SQUARE (Char_Width * DRAW_GetCharMagniCoeff() * 2)
29 CONST_DATA u8 max_values[] = { 24, 60, 60 };
30 CONST_DATA u8* CONST_DATA Test_Melody =
"Test:d=16,o=6,b=140:a,b,c,d,e,f,g";
31 CONST_DATA uint_t Speed_Range[5] =
37 bool FirstDisplay = 1;
39 bool fDynamicChange = 0;
40 divider_t menu_divider_coord = 0;
47 #if BACKLIGHT_INTERFACE
48 extern uint_t Current_CCR_BackLightStart;
49 extern CONST_DATA int_t CCR_BackLight_Tab[5];
50 #endif // BACKLIGHT_INTERFACE
51 extern tMenu ConfigMenu;
65 NODEBUG2
enum MENU_code fSetPllRange_Mgr(
void )
80 #if BACKLIGHT_INTERFACE
93 NODEBUG2
enum MENU_code fSetBacklight_Mgr(
void )
100 ret =
MENU_SetLevel_Mgr( &Current_CCR_BackLightStart, ( uint_t* ) CCR_BackLight_Tab ) ;
104 #endif // BACKLIGHT_INTERFACE
119 NODEBUG
enum MENU_code fSetTime_Ini(
void )
132 temp_values[0] = THH;
133 temp_values[1] = TMM;
134 temp_values[2] = TSS;
163 NODEBUG2
enum MENU_code fSetTime_Mgr(
void )
168 coord_t Time_Title_H;
169 coord_t CharHeight, CharWidth;
178 DRAW_RestoreCharMagniCoeff();
193 Time_Title_H = CharHeight * 2;
194 LCD_FillRect_Circle( 0, Screen_Height - Time_Title_H, Screen_Width, Time_Title_H,
RGB_BLACK );
202 for ( i = 0 ; i < 3 ; i ++ )
207 DRAW_DisplayString( TIME_MARGIN + i * ( PACK_SQUARE + 2 ), TIME_BOTTOM + ( CharHeight + 2 ),
"++", 2 );
208 DRAW_DisplayString( TIME_MARGIN + i * ( PACK_SQUARE + 2 ), TIME_BOTTOM - ( CharHeight + 2 ),
"--", 2 );
214 DRAW_DisplayString( TIME_MARGIN + ( -1 ) * ( PACK_SQUARE + 2 ) , LCD_HIGH_DEF ? TIME_BOTTOM : TIME_BOTTOM - 6,
"X", 1 );
219 DRAW_DisplayString( TIME_MARGIN + 3 * ( PACK_SQUARE + 2 ) + 10, TIME_BOTTOM,
"V", 1 );
221 DRAW_DisplayString( TIME_MARGIN + 3 * ( PACK_SQUARE + 2 ) - 30, TIME_BOTTOM - 6,
"V", 1 );
225 DRAW_RestoreCharMagniCoeff();
229 POINTER_SetRect( TIME_MARGIN + ( -1 ) * ( PACK_SQUARE + 2 ), TIME_BOTTOM - ( CharHeight + 2 ),
230 5 * ( PACK_SQUARE + 2 ) - POINTER_WIDTH,
231 3 * ( CharHeight + 2 ) - POINTER_WIDTH );
238 ysel = ( ( ( pos >> 8 ) & 0xFF ) - ( TIME_BOTTOM - ( CharHeight + 2 ) ) ) / ( CharHeight + 2 );
239 xsel = ( ( pos & 0xFF ) - ( TIME_MARGIN + 10 - ( CharWidth + 2 ) ) ) / ( CharWidth + 2 );
264 if ( ( xsel == -1 ) || ( xsel == 3 ) )
278 RTC_SetTime( temp_values[0], temp_values[1], temp_values[2] );
301 if ( temp_values[xsel] == 0 )
303 temp_values[xsel] = max_values[xsel] - 1;
310 else if ( ysel == 2 )
315 if ( temp_values[xsel] == max_values[xsel] )
317 temp_values[xsel] = 0;
331 if ( ( xsel != xCurSel ) || ( ysel != yCurSel ) || fRedrawn )
333 if ( FirstDisplay == 0 )
341 DRAW_DisplayString( TIME_MARGIN + ( -1 ) * ( PACK_SQUARE + 2 ), LCD_HIGH_DEF ? TIME_BOTTOM : TIME_BOTTOM - 6,
"X", 1 );
345 DRAW_RestoreCharMagniCoeff();
347 else if ( xCurSel == 3 )
353 DRAW_DisplayString( TIME_MARGIN + 3 * ( PACK_SQUARE + 2 ) + 10, TIME_BOTTOM,
"V", 1 );
355 DRAW_DisplayString( TIME_MARGIN + 3 * ( PACK_SQUARE + 2 ) - 30, TIME_BOTTOM - 6,
"V", 1 );
360 DRAW_RestoreCharMagniCoeff();
368 DRAW_DisplayString( TIME_MARGIN + xCurSel * ( PACK_SQUARE + 2 ), TIME_BOTTOM, buffer, 2 );
372 DRAW_DisplayString( TIME_MARGIN + xCurSel * ( PACK_SQUARE + 2 ), TIME_BOTTOM - ( CharHeight + 2 ),
"--", 2 );
376 DRAW_DisplayString( TIME_MARGIN + xCurSel * ( PACK_SQUARE + 2 ), TIME_BOTTOM + ( CharHeight + 2 ),
"++", 2 );
387 DRAW_DisplayStringInverted( TIME_MARGIN + ( -1 ) * ( PACK_SQUARE + 2 ), LCD_HIGH_DEF ? TIME_BOTTOM : TIME_BOTTOM - 6,
"X", 1 );
388 DRAW_RestoreCharMagniCoeff();
390 else if ( xsel == 3 )
399 DRAW_RestoreCharMagniCoeff();
501 SetLevel_Title = title;
532 DRAW_RestoreCharMagniCoeff();
543 for ( i = 0 ; i < 5; i++ )
545 if ( *value == value_range[i] )
554 POINTER_SetPos( BAR_LEFT + ( WIDTH_SQUARE + 2 ) * CurSel + WIDTH_SQUARE / 2, BAR_BOTTOM );
557 for ( i = 0; i < MAXLEVEL; i++ )
561 LCD_FillRect_Circle( BAR_LEFT + i * ( WIDTH_SQUARE + 2 ), BAR_BOTTOM, WIDTH_SQUARE, WIDTH_SQUARE, 0x0f0f );
565 BAR_BOTTOM + WIDTH_SQUARE + WIDTH_SQUARE / 2,
571 POINTER_SetRect( BAR_LEFT, BAR_BOTTOM, MAXLEVEL * ( WIDTH_SQUARE + 2 ) - POINTER_WIDTH, WIDTH_SQUARE - POINTER_WIDTH );
578 sel = ( (
POINTER_GetPos() & 0xFF ) - BAR_LEFT ) / ( WIDTH_SQUARE + 2 );
586 *value = value_range[CurSel];
603 if ( ( ( menu_divider_coord++ % 5 ) != 0 ) && !fRedrawn )
609 if ( ( sel != CurSel ) || fRedrawn )
614 LCD_FillRect_Circle( BAR_LEFT + CurSel * ( WIDTH_SQUARE + 2 ), BAR_BOTTOM, WIDTH_SQUARE, WIDTH_SQUARE, 0x0f0f );
618 LCD_FillRect_Circle( BAR_LEFT + sel * ( WIDTH_SQUARE + 2 ), BAR_BOTTOM, WIDTH_SQUARE, WIDTH_SQUARE, 0x0f0f + 2 );
623 if ( fDynamicChange )
625 *value = value_range[CurSel];