imgui.api

Members

Enums

Enabled
enum Enabled
MouseButton
enum MouseButton

The possible mouse buttons. These can be used as bitflags.

TextAlign
enum TextAlign

Functions

imguiBeginFrame
void imguiBeginFrame(int cursorX, int cursorY, ubyte mouseButtons, int mouseScroll, dchar unicodeChar = 0)

Begin a new frame. All batched commands after the call to imguiBeginFrame will be rendered as a single frame once imguiRender is called.

imguiBeginScrollArea
bool imguiBeginScrollArea(const(char)[] title, int xPos, int yPos, int width, int height, int* scroll, const ref ColorScheme colorScheme = defaultColorScheme)

Begin the definition of a new scrollable area.

imguiButton
bool imguiButton(const(char)[] label, Enabled enabled = Enabled.yes, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new button.

imguiCheck
bool imguiCheck(const(char)[] label, bool* checkState, Enabled enabled = Enabled.yes, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new checkbox.

imguiCollapse
bool imguiCollapse(const(char)[] label, const(char)[] subtext, bool* checkState, Enabled enabled = Enabled.yes, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new collapsable element.

imguiDestroy
void imguiDestroy()

Destroy the imgui library.

imguiDrawLine
void imguiDrawLine(float x0, float y0, float x1, float y1, float r, RGBA color = defaultColorScheme.generic.line)

Draw a line.

imguiDrawRect
void imguiDrawRect(float xPos, float yPos, float width, float height, RGBA color = defaultColorScheme.generic.rect)

Draw a rectangle.

imguiDrawRoundedRect
void imguiDrawRoundedRect(float xPos, float yPos, float width, float height, float r, RGBA color = defaultColorScheme.generic.roundRect)

Draw a rounded rectangle.

imguiDrawText
void imguiDrawText(int xPos, int yPos, TextAlign textAlign, const(char)[] text, RGBA color = defaultColorScheme.generic.text)

Draw text.

imguiEndFrame
void imguiEndFrame()

End the list of batched commands for the current frame.

imguiEndScrollArea
void imguiEndScrollArea(const ref ColorScheme colorScheme = defaultColorScheme)

End the definition of the last scrollable element.

imguiIndent
void imguiIndent()

Add horizontal indentation for elements to be added.

imguiInit
bool imguiInit(const(char)[] fontPath, uint fontTextureSize = 1024)

Initialize the imgui library.

imguiItem
bool imguiItem(const(char)[] label, Enabled enabled = Enabled.yes, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new item.

imguiLabel
void imguiLabel(const(char)[] label, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new label.

imguiRender
void imguiRender(int width, int height)

Render all of the batched commands for the current frame.

imguiSeparator
void imguiSeparator()

Add vertical space as a separator below the last element.

imguiSeparatorLine
void imguiSeparatorLine(const ref ColorScheme colorScheme = defaultColorScheme)

Add a horizontal line as a separator below the last element.

imguiSlider
bool imguiSlider(const(char)[] label, float* sliderState, float minValue, float maxValue, float stepValue, Enabled enabled = Enabled.yes, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new slider.

imguiTextInput
bool imguiTextInput(const(char)[] label, char[] buffer, ref char[] usedSlice, bool forceInputable = false, const ref ColorScheme colorScheme = defaultColorScheme)

Define a text input field.

imguiUnindent
void imguiUnindent()

Remove horizontal indentation for elements to be added.

imguiValue
void imguiValue(const(char)[] label, const ref ColorScheme colorScheme = defaultColorScheme)

Define a new value.

Static variables

defaultColorScheme
ColorScheme defaultColorScheme;

The current default color scheme.

Structs

ColorScheme
struct ColorScheme

A color scheme contains all the configurable GUI element colors.

RGBA
struct RGBA

Meta