MCPcopy Create free account
hub / github.com/Norbyte/bg3se / AddImageButton

Method AddImageButton

BG3Extender/Extender/Client/IMGUI/IMGUI.cpp:526–536  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

524
525
526lua::ImguiHandle TreeParent::AddImageButton(char const* label, FixedString iconOrTexture,
527 std::optional<glm::vec2> size, std::optional<glm::vec2> uv0, std::optional<glm::vec2> uv1)
528{
529 auto btn = AddChild<ImageButton>();
530 btn->Image.Bind(iconOrTexture);
531 if (size) btn->Image.Size = *size;
532 if (uv0) btn->Image.UV0 = *uv0;
533 if (uv1) btn->Image.UV1 = *uv1;
534 btn->Label = label;
535 return btn;
536}
537
538
539lua::ImguiHandle TreeParent::AddImage(FixedString iconOrTexture,

Callers

nothing calls this directly

Calls 1

BindMethod · 0.80

Tested by

no test coverage detected