|
|
|
@ -32,6 +32,7 @@
|
|
|
|
|
- How can I tell whether to dispatch mouse/keyboard to imgui or to my application?
|
|
|
|
|
- How can I display an image? What is ImTextureID, how does it works?
|
|
|
|
|
- How can I have multiple widgets with the same label or without a label? A primer on labels and the ID Stack.
|
|
|
|
|
- How can I use my own math types instead of ImVec2/ImVec4?
|
|
|
|
|
- How can I load a different font than the default?
|
|
|
|
|
- How can I easily use icons in my application?
|
|
|
|
|
- How can I load multiple fonts?
|
|
|
|
@ -685,6 +686,10 @@
|
|
|
|
|
e.g. when displaying a list of objects, using indices or pointers as ID will preserve the
|
|
|
|
|
node open/closed state differently. See what makes more sense in your situation!
|
|
|
|
|
|
|
|
|
|
Q: How can I use my own math types instead of ImVec2/ImVec4?
|
|
|
|
|
A: You can edit imconfig.h and setup the IM_VEC2_CLASS_EXTRA/IM_VEC4_CLASS_EXTRA macros to add implicit type conversions.
|
|
|
|
|
This way you'll be able to use your own types everywhere, e.g. passsing glm::vec2 to ImGui functions instead of ImVec2.
|
|
|
|
|
|
|
|
|
|
Q: How can I load a different font than the default?
|
|
|
|
|
A: Use the font atlas to load the TTF/OTF file you want:
|
|
|
|
|
ImGuiIO& io = ImGui::GetIO();
|
|
|
|
|