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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

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

014-imGui窗口中列表框ListBox

[复制链接]

132

主题

29

回帖

34万

积分

管理员

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





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

学习目标:
    imGui窗口中列表框ListBox
        BeginListBox
        EndListBox
       

     窗口中列表框控件接口
       
            IMGUI_API bool          BeginListBox(
                const char* label,
                // open a framed scrolling region
                const ImVec2& size = ImVec2(0, 0));       
            // only call EndListBox() if BeginListBox() returned true!       
        IMGUI_API void          EndListBox();                                                      

    //简单 常用
    IMGUI_API bool          ListBox(
        const char* label,
        int* current_item,
        const char* const items[],
        int items_count, int height_in_items = -1);
       
        //此接口暂时不了解
    IMGUI_API bool          ListBox(const char* label,
        int* current_item,
        bool (*items_getter)(void* data, int idx, const char** out_text),
        void* data,
        int items_count,
        int height_in_items = -1);
       
       
       

void testListBox()
{
    ImGui::Begin("testListBox");
    // Using the _simplified_ one-liner ListBox() api here
    // See "List boxes" section for examples of how to use the more flexible BeginListBox()/EndListBox() api.
   // IMGUI_DEMO_MARKER("Widgets/Basic/ListBox");
    const char* items[] = { "Apple", "Banana", "Cherry", "Kiwi", "Mango", "Orange", "Pineapple", "Strawberry", "Watermelon" };
    static int item_current = 1;
    ImGui::Text(u8"ListBox示例");
    ImGui::SameLine(); HelpMarker(
        "Using the simplified one-liner ListBox API here.\nRefer to the \"List boxes\" \
section below for an explanation of how to use the more flexible and general BeginListBox/EndListBox API.");


    ImGui::ListBox("##listbox", &item_current, items, IM_ARRAYSIZE(items), 4);
   
    ImGui::End();
}



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

使用道具 举报

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

本版积分规则

QQ咨询

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

GMT+8, 2024-5-18 13:19 , Processed in 0.090809 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

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