郁金香灬老师 游戏安全  驱动 逆向调试 C/C++编程  脚本 UE4/UE5

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
热搜: 活动 交友 discuz
课程大纲和价格
官方联系方式2024在线课大纲QQ咨询
查看: 3533|回复: 0

017-imGui窗口中的页面控件Tab与CheckboxFlags

[复制链接]

132

主题

29

回帖

34万

积分

管理员

积分
343636
QQ
发表于 2023-4-7 21:33:27 | 显示全部楼层 |阅读模式





郁金香灬外挂技术
       
        https://www.yjxsoft.com/
       
        本教程视频1920*1080分辩率下观看最佳
        VS2017+win10 64位 环境
        郁金香老师:扣扣 150330575
        欢迎大家参加 郁金香灬技术 游戏安全与外挂的研究学习。
       
        兴趣是我们最好的老师
        成长需要过程与循序渐进        
        兴趣+坚持+时间+优秀的教程会帮助你快速成功
   
    交流扣扣群 29817979,9569245
  

学习目标:
   页面控件Tab
   页面控件标志组合ImGuiTabBarFlags
   复选框CheckboxFlags


    IMGUI_API bool          CheckboxFlags(const char* label, int* flags, int flags_value);
    IMGUI_API bool          CheckboxFlags(const char* label, unsigned int* flags, unsigned int flags_value);
       
    // Flags for ImGui::BeginTabBar()
enum ImGuiTabBarFlags_
{
    ImGuiTabBarFlags_None                           = 0,
    ImGuiTabBarFlags_Reorderable                    = 1 << 0,   // Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
    ImGuiTabBarFlags_AutoSelectNewTabs              = 1 << 1,   // Automatically select new tabs when they appear
    ImGuiTabBarFlags_TabListPopupButton             = 1 << 2,   // Disable buttons to open the tab list popup
    ImGuiTabBarFlags_NoCloseWithMiddleMouseButton   = 1 << 3,   // Disable behavior of closing tabs (that are submitted with p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if (IsItemHovered() && IsMouseClicked(2)) *p_open = false.
    ImGuiTabBarFlags_NoTabListScrollingButtons      = 1 << 4,   // Disable scrolling buttons (apply when fitting policy is ImGuiTabBarFlags_FittingPolicyScroll)
    ImGuiTabBarFlags_NoTooltip                      = 1 << 5,   // Disable tooltips when hovering a tab
    ImGuiTabBarFlags_FittingPolicyResizeDown        = 1 << 6,   // Resize tabs when they don't fit
    ImGuiTabBarFlags_FittingPolicyScroll            = 1 << 7,   // Add scroll buttons when tabs don't fit
    ImGuiTabBarFlags_FittingPolicyMask_             = ImGuiTabBarFlags_FittingPolicyResizeDown | ImGuiTabBarFlags_FittingPolicyScroll,
    ImGuiTabBarFlags_FittingPolicyDefault_          = ImGuiTabBarFlags_FittingPolicyResizeDown,
};


   
       
//ImGuiTabBarFlags_TabListPopupButton 带了一个下拉列表
void CDX11::测试页面UI()
{
     ImGui::Begin(u8"测试页面UI");

     if (ImGui::BeginTabBar("MyTabBar", 0))
     {
         if (ImGui::BeginTabItem("1111"))
         {
             //显示页面1的控件
             static bool v1 = 0;
             ImGui::Checkbox("11111", &v1);
             ImGui::EndTabItem();
         };
         if(ImGui::BeginTabItem("2222"))
         {
            // 显示页面2的控件
             static bool v1 = 0;
             ImGui::Checkbox("2222", &v1);
             ImGui::Button("2222" );

             ImGui::EndTabItem();
         };
        if(ImGui::BeginTabItem("3333"))
         {
             ImGui::EndTabItem();
         };

        if( ImGui::BeginTabItem("4444"))
         {
             ImGui::EndTabItem();
         };

         ImGui::EndTabBar();
     }
     ImGui::End();


};

    if (pressed)
    {
        if (all_on)
            *flags |= flags_value;
        else
            *flags &= ~flags_value;
    }
       
       

    if (某个复选框被按下)
    {
        if (某个复选框在选中状态)
            *开关 |= 某个状态;  //添加某个标志
        else
            *开关 &= ~某个状态; //去掉某个标志
    }
       
       


游戏安全课程 学员办理咨询联系QQ150330575 手机 139 9636 2600  免费课程 在 www.bilibili.com 搜 郁金香灬老师
回复

使用道具 举报

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

本版积分规则

QQ咨询

QQ|Archiver|手机版|小黑屋|郁金香游戏技术

GMT+8, 2024-5-18 11:52 , Processed in 0.090505 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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