imgui.extra module¶
This module provides extra utilities that are not part of core ImGui C++ API but are useful in Python application.
-
imgui.extra.
font
(*args, **kwds)¶ _py_font(_Font font) Use specified font in given context.
Example:
io = imgui.get_io() new_font = io.fonts.add_font_from_file_ttf("DroidSans.ttf", 20) impl.refresh_font_texture() # later in frame code imgui.begin("Default Window") imgui.text("Text displayed using default font") with imgui.font(new_font): imgui.text("Text displayed using custom font") imgui.end()
Outputs:- Args:
- font (_Font): font object retrieved from
add_font_from_file_ttf
.
-
imgui.extra.
styled
(*args, **kwds)¶ _py_styled(ImGuiStyleVar variable, value)
-
imgui.extra.
colored
(*args, **kwds)¶ _py_colored(ImGuiCol variable, float r, float g, float b, float a=1.)
-
imgui.extra.
vertex_buffer_vertex_pos_offset
()¶ _py_vertex_buffer_vertex_pos_offset()
-
imgui.extra.
vertex_buffer_vertex_uv_offset
()¶ _py_vertex_buffer_vertex_uv_offset()
-
imgui.extra.
vertex_buffer_vertex_col_offset
()¶ _py_vertex_buffer_vertex_col_offset()
-
imgui.extra.
vertex_buffer_vertex_size
()¶ _py_vertex_buffer_vertex_size()
-
imgui.extra.
index_buffer_index_size
()¶ _py_index_buffer_index_size()