BeginListBox
在当前上下文,添加一个列表框
与 ListBox 不同的是, 这个函数需要手动调用 EndListBox 来结束列表框, 可以自定义列表的显示方式
声明
int BeginListBox(string label, ImVec2 vec2)
参数
| 参数名 | 描述 | 
|---|---|
| label | |
| vec2 | 
返回值
使用方式
    _vec2.x = 200f;
    _vec2.y = 300f;
    if (gsimgui.BeginListBox("list box2", _vec2))
    {
        for (string f : _fruits)
        {
            if (gsimgui.Selectable(f, _val.value == __index))
            {
                _val.value = __index;
            }
        }
        gsimgui.EndListBox();
    }