GUI_MEMDEV_ShiftInWindow - no movement

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • GUI_MEMDEV_ShiftInWindow - no movement

    Hello!

    I tried out the following code from an example. What I can see is first a white background, than it switches to the blue-black gradient bkg at once. No movement of the window can be seen. Could you tell me what could be the problem?


    C Source Code

    1. static void _cbIntro(WM_MESSAGE * pMsg) {
    2. GUI_RECT Rect = {0};
    3. int xSize;
    4. int ySize;
    5. switch (pMsg->MsgId) {
    6. case WM_PAINT:
    7. GUI_EnableAlpha(1);
    8. xSize = WM_GetWindowSizeX(pMsg->hWin);
    9. ySize = WM_GetWindowSizeY(pMsg->hWin);
    10. Rect.x0 = 5;
    11. Rect.y0 = 5;
    12. Rect.x1 = xSize - 11;
    13. Rect.y1 = ySize - 11;
    14. GUI_SetColor(GUI_GRAY);
    15. GUI_DrawRect(0, 0, xSize - 2, ySize - 2);
    16. GUI_SetColor(GUI_DARKGRAY);
    17. GUI_DrawRect(1, 1, xSize - 1, ySize - 1);
    18. GUI_SetColor(GUI_WHITE);
    19. GUI_SetFont(GUI_FONT_20F_ASCII);
    20. GUI_SetColor(GUI_LIGHTGRAY);
    21. GUI_SetTextMode(GUI_TM_TRANS);
    22. GUI_DispStringInRectWrap("asdf", &Rect, GUI_TA_HCENTER | GUI_TA_VCENTER, GUI_WRAPMODE_WORD);
    23. GUI_EnableAlpha(0);
    24. break;
    25. }
    26. }
    27. static void _cbBk(WM_MESSAGE * pMsg) {
    28. int xSize;
    29. int ySize;
    30. switch (pMsg->MsgId) {
    31. case WM_PAINT:
    32. xSize = LCD_GetXSize();
    33. ySize = LCD_GetYSize();
    34. GUI_DrawGradientV(0, 0, xSize - 1, ySize - 1, GUI_BLUE, GUI_BLACK);
    35. GUI_SetColor(0xFFFFFF);
    36. GUI_SetTextMode(GUI_TM_TRANS);
    37. GUI_DispStringHCenterAt("Window effects demonstration", 0, 10);
    38. break;
    39. }
    40. }
    41. int main(void)
    42. {
    43. WM_HWIN hIntro;
    44. WM_SetCreateFlags(WM_CF_MEMDEV);
    45. GUI_Init();
    46. WM_SetCallback(WM_HBKWIN, _cbBk);
    47. WM_Exec();
    48. hIntro = WM_CreateWindow(0, 0, 160, 128, WM_CF_HASTRANS, _cbIntro, 0);
    49. while (1)
    50. {
    51. GUI_MEMDEV_ShiftInWindow(hIntro, 1000,GUI_MEMDEV_EDGE_LEFT);
    52. GUI_Delay(3000);
    53. }
    54. }
    Display All