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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

006-imGui窗口中的Button按钮

[复制链接]

132

主题

29

回帖

34万

积分

管理员

积分
343636
QQ
发表于 2023-3-28 15:45:28 | 显示全部楼层 |阅读模式



006-imGui窗口中的Button按钮




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

学习目标:
  imGui窗口中添加Button按钮
  Button
  ButtonEx
  响应按键的设置
   
   // Extend ImGuiButtonFlags_ 按钮标志
enum ImGuiButtonFlagsPrivate_

    IMGUI_API bool    Button(const char* label, const ImVec2& size = ImVec2(0, 0));   // button
    IMGUI_API bool    ButtonEx(const char* label, const ImVec2& size_arg = ImVec2(0, 0), ImGuiButtonFlags flags = 0);
       
       
         ImGui::Begin("222");
        {
            //设置窗口位置
            ImVec2 pos = { 100,100+300+20 };
            ImGui::SetWindowPos(pos);
            ImVec2 nSize = { 300,200 };
            ImGui::SetWindowSize(nSize);
          //  ImGui::Button("Button150", nSize);
            ImVec2 btnsize = { 120, 20 };
            if (ImGui::ButtonEx("Button1", btnsize, ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonRight))
            {
                MessageBoxA(0, "Button 鼠标右键被按下", 0, 0);
            };

            
            if(ImGui::ButtonEx("Button2", ImVec2(100,30), ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonLeft))
            {
                MessageBoxA(0, "Button2 鼠标左键被按下", 0, 0);
            };;

            if (ImGui::ButtonEx("Button3", ImVec2(100, 30), ImGuiButtonFlags_::ImGuiButtonFlags_MouseButtonMiddle))
            {
                MessageBoxA(0, "Button3 鼠标中键被按下", 0, 0);
            };;


        }
        ImGui::End();
               
       
       
       
  void CDX11::CreateMyFrame()
  {
      //创建一个窗口帧
      ImGui::Begin("111");
      //{
      //    //设置窗口位置
      //    ImVec2 pos = { 100,100 };
      //    ImGui::SetWindowPos(pos);
      //    ImVec2 nSize = { 300,200 };
      //    ImGui::SetWindowSize(nSize);
      //}      
      ImGui::End();
游客,如果您要查看本帖隐藏内容请回复



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

使用道具 举报

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

本版积分规则

QQ咨询

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

GMT+8, 2024-5-17 21:15 , Processed in 0.090479 second(s), 21 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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