硬汉嵌入式论坛

 找回密码
 立即注册
查看: 4574|回复: 1
收起左侧

[ThreadX全家桶] ThreadX GUIX窗口滑动通过函数gx_animation_drag_enable来实现

[复制链接]

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115804
QQ
发表于 2020-12-16 09:24:13 | 显示全部楼层 |阅读模式


代码:
  1. /******************************************************************************************/
  2. /* Start screen slide animation for specified window.                                     */
  3. /******************************************************************************************/
  4. static VOID slide_animation_start(GX_WINDOW *window)
  5. {
  6.     GX_ANIMATION_INFO slide_animation_info;
  7.     SCREEN_INFO *info = screen_info_get(window->gx_widget_parent);

  8.     if (info)
  9.     {
  10.         if (!window->gx_widget_first_child)
  11.         {
  12.             gx_widget_attach((GX_WIDGET *)window, info->window_list[0]);
  13.         }

  14.         memset(&slide_animation_info, 0, sizeof(GX_ANIMATION_INFO));
  15.         slide_animation_info.gx_animation_parent = (GX_WIDGET *)window;
  16.         slide_animation_info.gx_animation_style = GX_ANIMATION_SCREEN_DRAG | GX_ANIMATION_HORIZONTAL | GX_ANIMATION_WRAP | GX_ANIMATION_SINE_EASE_OUT;
  17.         slide_animation_info.gx_animation_id = ANIMATION_ID_DRAG_SLIDE;
  18.         slide_animation_info.gx_animation_frame_interval = 2;
  19.         slide_animation_info.gx_animation_steps = 15;
  20.         slide_animation_info.gx_animation_slide_screen_list = info->window_list;

  21.         gx_animation_drag_enable(&slide_animation, (GX_WIDGET *)window, &slide_animation_info);
  22.     }
  23. }
复制代码


回复

使用道具 举报

1万

主题

7万

回帖

11万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
115804
QQ
 楼主| 发表于 2020-12-16 09:25:25 | 显示全部楼层
QQ截图20201216092511.png
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|小黑屋|Archiver|手机版|硬汉嵌入式论坛

GMT+8, 2025-5-19 21:29 , Processed in 0.356486 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表