Functions | |
void IMGUI_API | Image (const nap::Texture2D &texture, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 1), const ImVec2 &uv1=ImVec2(1, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1), const ImVec4 &border_col=ImVec4(0, 0, 0, 0)) |
bool IMGUI_API | ImageButton (const nap::Texture2D &texture, const ImVec2 &size, const ImVec2 &uv0=ImVec2(0, 1), const ImVec2 &uv1=ImVec2(1, 0), int frame_padding=-1, const ImVec4 &bg_col=ImVec4(0, 0, 0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1)) |
bool IMGUI_API | ImageButton (const nap::Icon &icon, const char *text=nullptr, const ImVec2 &tooltip_offset=ImVec2(10, 10), const ImVec4 &bg_col=ImVec4(0, 0, 0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1)) |
bool IMGUI_API | ImageButton (const nap::Icon &icon, const ImVec2 &size, const char *text=nullptr, const ImVec2 &tooltip_offset=ImVec2(10, 10), int frame_padding=-1, const ImVec4 &bg_col=ImVec4(0, 0, 0, 0), const ImVec4 &tint_col=ImVec4(1, 1, 1, 1)) |
ImTextureID IMGUI_API | GetTextureHandle (nap::Texture2D &texture) |
bool IMGUI_API | Combo (const char *label, int *current_item, nap::rtti::TypeInfo enum_type) |
This file contains NAP overrides for popular IMGui functions. These utility functions allow you to use common NAP objects in conjunction with IMGui All the functions in this file follow the IMGui style and naming conventions
bool IMGUI_API ImGui::Combo | ( | const char * | label, |
int * | current_item, | ||
nap::rtti::TypeInfo | enum_type | ||
) |
Displays all members of an rtti defined enumeration type inside a combo box. Call asserts if the provided type is not an enumeration object.
label | name of the combo box |
current_item | current selected item |
enum_type | the enum type to display |
ImTextureID IMGUI_API ImGui::GetTextureHandle | ( | nap::Texture2D & | texture | ) |
Return ImTextureID, can be used when drawing textures in a window drawlist
texture | the texture to retrieve the ImTextureID from |
void IMGUI_API ImGui::Image | ( | const nap::Texture2D & | texture, |
const ImVec2 & | size, | ||
const ImVec2 & | uv0 = ImVec2(0, 1) , |
||
const ImVec2 & | uv1 = ImVec2(1, 0) , |
||
const ImVec4 & | tint_col = ImVec4(1, 1, 1, 1) , |
||
const ImVec4 & | border_col = ImVec4(0, 0, 0, 0) |
||
) |
Displays a NAP 2D texture as an IMGUI image
texture | the texture to display in IMGUI |
size | display size of the texture |
uv0 | the min uv coordinates, defaults to lower left corner |
uv1 | the max uv coordinates, defaults to upper right corner |
tint_col | used to tint the displayed texture |
border_col | of the border of the image |
bool IMGUI_API ImGui::ImageButton | ( | const nap::Icon & | icon, |
const char * | text = nullptr , |
||
const ImVec2 & | tooltip_offset = ImVec2(10, 10) , |
||
const ImVec4 & | bg_col = ImVec4(0, 0, 0, 0) , |
||
const ImVec4 & | tint_col = ImVec4(1, 1, 1, 1) |
||
) |
Displays a NAP Icon as an IMGUI image button where the height of the button is the same as the height of the frame. When hovered the name of the icon or optional text is displayed.
icon | icon to apply to the button |
text | optional overlay text, when null icon name is shown |
tooltip_offset | offset tooltip needs to have in x and y axis |
bg_col | button backgound color |
tint_col | button tint color |
bool IMGUI_API ImGui::ImageButton | ( | const nap::Icon & | icon, |
const ImVec2 & | size, | ||
const char * | text = nullptr , |
||
const ImVec2 & | tooltip_offset = ImVec2(10, 10) , |
||
int | frame_padding = -1 , |
||
const ImVec4 & | bg_col = ImVec4(0, 0, 0, 0) , |
||
const ImVec4 & | tint_col = ImVec4(1, 1, 1, 1) |
||
) |
Displays a NAP Icon as an IMGUI image of a certain size. When hovered the name of the icon or optional text is displayed.
icon | icon to apply to the button |
size | size of the icon |
text | optional overlay text, when null icon name is shown |
tooltip_offset | offset tooltip in x and y |
frame_padding | image frame padding |
bg_col | button backgound color |
tint_col | button tint color |
bool IMGUI_API ImGui::ImageButton | ( | const nap::Texture2D & | texture, |
const ImVec2 & | size, | ||
const ImVec2 & | uv0 = ImVec2(0, 1) , |
||
const ImVec2 & | uv1 = ImVec2(1, 0) , |
||
int | frame_padding = -1 , |
||
const ImVec4 & | bg_col = ImVec4(0, 0, 0, 0) , |
||
const ImVec4 & | tint_col = ImVec4(1, 1, 1, 1) |
||
) |
Displays a NAP 2D texture as an IMGUI image button
texture | image to apply to the button |
size | display size of the button |
uv0 | the min uv coordinates, defaults to lower left corner |
uv1 | the max uv coordinates, defaults to upper right corner |
frame_padding | image frame padding |
bg_col | button background color |
tint_col | button tint color |