/********************************************************************* * * GUIDEMO_Cursor */ void GUIDEMO_Cursor(void) { GUIDEMO_ShowIntro("Cursor", "emWin supports\nsoftware cursors"); _DispCursor(); GUIDEMO_Wait(4000); GUIDEMO_CursorShow(); #if (GUI_SUPPORT_CURSOR && GUI_SUPPORT_TOUCH) if (GUIDEMO_GetConfFlag(GUIDEMO_CF_SUPPORT_TOUCH)) { GUI_CURSOR_SetPosition(0,0); GUI_CURSOR_Select(&GUI_CursorArrowM); } #endif }
/********************************************************************* * * _DemoCursor */ static void _DemoCursor(void) { GUI_SetBkColor(GUI_BLUE); GUI_Clear(); GUI_SetColor(GUI_WHITE); GUI_SetFont(&GUI_Font24_ASCII); GUI_DispStringHCenterAt("CURSOR_Sample - Sample", 160, 5); GUI_SetFont(&GUI_Font8x16); while (1) { _DispCursor(); GUI_ClearRect(0, 60, 319, 200); _MoveCursor(); GUI_ClearRect(0, 60, 319, 200); } }
void GUIDEMO_Cursor(void) { int i = 0; GUIDEMO_ShowIntro("Cursor", "\nuC/GUI supports" "\nsoftware cursor"); GUI_SetBkColor(GUI_BLUE); GUI_Clear(); _DispCursor(); GUIDEMO_Delay(2000); GUIDEMO_NotifyStartNext(); GUI_CURSOR_Show(); for ( i = 0;(i < countof(_aCursor) && !GUIDEMO_CheckCancel()); i++) { _MoveCursor(_aCursor[i]); } GUI_CURSOR_SetPosition(0,0); GUI_CURSOR_Select(&GUI_CursorArrowM); }