mirror of https://github.com/bkaradzic/bgfx
Updated ImGui.
This commit is contained in:
parent
a195a03187
commit
47345c1936
|
@ -13033,14 +13033,14 @@ bool ImGui::SetDragDropPayload(const char* type, const void* data, size_t data_s
|
|||
// Store in heap
|
||||
g.DragDropPayloadBufHeap.resize((int)data_size);
|
||||
payload.Data = g.DragDropPayloadBufHeap.Data;
|
||||
memcpy((void*)(intptr_t)payload.Data, data, data_size);
|
||||
memcpy(payload.Data, data, data_size);
|
||||
}
|
||||
else if (data_size > 0)
|
||||
{
|
||||
// Store locally
|
||||
memset(&g.DragDropPayloadBufLocal, 0, sizeof(g.DragDropPayloadBufLocal));
|
||||
payload.Data = g.DragDropPayloadBufLocal;
|
||||
memcpy((void*)(intptr_t)payload.Data, data, data_size);
|
||||
memcpy(payload.Data, data, data_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -408,9 +408,9 @@ namespace ImGui
|
|||
IMGUI_API bool Selectable(const char* label, bool* p_selected, ImGuiSelectableFlags flags = 0, const ImVec2& size = ImVec2(0,0)); // "bool* p_selected" point to the selection state (read-write), as a convenient helper.
|
||||
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);
|
||||
IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. make sure to call ListBoxFooter() afterwards.
|
||||
IMGUI_API bool ListBoxHeader(const char* label, const ImVec2& size = ImVec2(0,0)); // use if you want to reimplement ListBox() will custom data or interactions. if the function return true, you can output elements then call ListBoxFooter() afterwards.
|
||||
IMGUI_API bool ListBoxHeader(const char* label, int items_count, int height_in_items = -1); // "
|
||||
IMGUI_API void ListBoxFooter(); // terminate the scrolling region
|
||||
IMGUI_API void ListBoxFooter(); // terminate the scrolling region. only call ListBoxFooter() if ListBoxHeader() returned true!
|
||||
|
||||
// Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare more in your code to handle your types. you can add functions to the ImGui namespace)
|
||||
IMGUI_API void Value(const char* prefix, bool b);
|
||||
|
@ -1377,7 +1377,7 @@ struct ImGuiSizeCallbackData
|
|||
struct ImGuiPayload
|
||||
{
|
||||
// Members
|
||||
const void* Data; // Data (copied and owned by dear imgui)
|
||||
void* Data; // Data (copied and owned by dear imgui)
|
||||
int DataSize; // Data size
|
||||
|
||||
// [Internal]
|
||||
|
|
|
@ -1299,10 +1299,12 @@ void ImGui::ShowDemoWindow(bool* p_open)
|
|||
ImGui::Button("LEVERAGE\nBUZZWORD", size);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGui::ListBoxHeader("List", size);
|
||||
ImGui::Selectable("Selected", true);
|
||||
ImGui::Selectable("Not Selected", false);
|
||||
ImGui::ListBoxFooter();
|
||||
if (ImGui::ListBoxHeader("List", size))
|
||||
{
|
||||
ImGui::Selectable("Selected", true);
|
||||
ImGui::Selectable("Not Selected", false);
|
||||
ImGui::ListBoxFooter();
|
||||
}
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue