硬汉嵌入式论坛

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

[ThreadX全家桶] GUIX任意窗口跳转

[复制链接]

11

主题

26

回帖

59

积分

初级会员

积分
59
发表于 2023-10-26 14:27:30 | 显示全部楼层 |阅读模式
void jump_to_window(GX_WIDGET *target)
{
    GX_ANIMATION *animation;
    GX_ANIMATION_INFO info;
   
    /* Allocate an animaton control from system pool. */
    if(gx_system_animation_get(&animation) == GX_SUCCESS)
    {
        memset(&info, 0, sizeof(GX_ANIMATION_INFO));
        
        info.gx_animation_style = GX_ANIMATION_TRANSLATE;
        info.gx_animation_id = 0;
        info.gx_animation_parent = (GX_WIDGET *)root;
        info.gx_animation_target = target;
        info.gx_animation_start_alpha = 255;
        info.gx_animation_end_alpha = 255;
        info.gx_animation_steps = 10;
        info.gx_animation_frame_interval = 1;
        info.gx_animation_start_position.gx_point_x = 0;
        info.gx_animation_start_position.gx_point_y = 0;
        info.gx_animation_end_position.gx_point_x = 0;
        info.gx_animation_end_position.gx_point_y = 0;

        gx_animation_start(animation, &info);        
    }
}

方便一些非UI事件触发的页面跳转,就是手动创建个跳转动画直接执行


评分

参与人数 1金币 +50 收起 理由
eric2013 + 50 很给力!

查看全部评分

回复

使用道具 举报

1万

主题

6万

回帖

10万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
106660
QQ
发表于 2023-10-26 15:17:55 | 显示全部楼层
谢谢楼主分享。
回复

使用道具 举报

609

主题

3045

回帖

4892

积分

至尊会员

积分
4892
发表于 2023-10-31 08:43:29 | 显示全部楼层
楼主牛劈喔
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-28 03:29 , Processed in 0.156175 second(s), 27 queries .

Powered by Discuz! X3.4 Licensed

Copyright © 2001-2023, Tencent Cloud.

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