LDKUIConfig
typedef struct LDKUIConfig{
u32 frame_arena_size;
u32 initial_vertex_capacity;
u32 initial_index_capacity;
u32 initial_command_capacity;
u32 initial_window_capacity;
u32 initial_id_stack_capacity;
LDKFontInstance *font;
void *font_texture_user;
LDKUIGetFontPageTextureFn get_font_page_texture;
LDKUIThemeType theme;
u32 font_size;
}LDKUIConfig;
LDKUIContext
typedef struct LDKUIContext LDKUIContext;
LDKUIControlVisualState
typedef enum LDKUIControlVisualState{
LDK_UI_CONTROL_VISUAL_STATE_IDLE=0,
LDK_UI_CONTROL_VISUAL_STATE_HOVERED=1,
LDK_UI_CONTROL_VISUAL_STATE_ACTIVE=2,
LDK_UI_CONTROL_VISUAL_STATE_ACTIVE_HOVERED=3,
LDK_UI_CONTROL_VISUAL_STATE_DISABLED=4,
}LDKUIControlVisualState;
LDKUIIcon
typedef struct LDKUIIcon{
uintptr_t texture;
LDKUIRect uv;
LDKUISize size;
rgba32 color;
}LDKUIIcon;
ldk_ui_icon
Draw an icon UI item.
LDK_API void ldk_ui_icon(
LDKUIContext *ctx,
LDKUIIcon icon
);
ldk_ui_icon_button
Draw an icon button and report its interaction.
LDK_API bool ldk_ui_icon_button(
LDKUIContext *ctx,
LDKUIIcon icon,
char const *text
);
Parameters
LDKUIContext *ctx
- UI context used by this operation.
LDKUIIcon icon
- Icon shown by the widget.
char const *text
- Text used by this operation.
Returns
True when the UI condition or interaction is active; false otherwise.
ldk_ui_icon_label
Draw an icon alongside text.
LDK_API void ldk_ui_icon_label(
LDKUIContext *ctx,
LDKUIIcon icon,
char const *text
);
Parameters
LDKUIContext *ctx
- UI context used by this operation.
LDKUIIcon icon
- Icon shown by the widget.
char const *text
- Text used by this operation.