Skip to content

Listbox is repeating #5210

@0xCowz

Description

@0xCowz

Hello, i just made a listbox that grab FiveM resources list of a server, so this is my code :

static const char* resources[] =
{
resource->GetName().c_str()
};

static int selectedResource = 0;

ImGui::ListBox("", &selectedResource, resources, IM_ARRAYSIZE(resources));

When the main resource of FiveM show it's working perfectly, so in my ListBox i have only wrote "cfx_internal"
but when all server resources is showing, the ListBox is repeating everytime that a resource is showing
Like at the end of the load of the server, i got probably 200 listbox in 1 window, and i want to show resources in only 1 listbox.
What should i do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions