24ENGINE_API
void BeginPanel(
const char* name,
float x,
float y,
33ENGINE_API
void Text(
const char* fmt, ...);
34ENGINE_API
void TextColored(
float r,
float g,
float b,
float a,
const char* fmt, ...);
37ENGINE_API
bool Checkbox(
const char* label,
bool* value);
38ENGINE_API
bool Button(
const char* label);
39ENGINE_API
bool DragFloat(
const char* label,
float* value,
float speed = 1.0f,
float min = 0.0f,
float max = 0.0f);
40ENGINE_API
bool Combo(
const char* label,
int* current,
const char*
const items[],
int count);
53ENGINE_API
void DrawLine(
float x1,
float y1,
float x2,
float y2,
54 float r,
float g,
float b,
float a = 1.0f,
float thickness = 1.0f);
55ENGINE_API
void DrawRect(
float x,
float y,
float w,
float h,
56 float r,
float g,
float b,
float a = 1.0f,
float thickness = 1.0f,
57 float rounding = 0.0f);
59 float r,
float g,
float b,
float a = 1.0f,
60 float rounding = 0.0f);
61ENGINE_API
void DrawText(
const char* text,
float x,
float y,
62 float r,
float g,
float b,
float a = 1.0f);
64ENGINE_API
bool InputText(
const char* label,
char* buf,
size_t bufSize);
67ENGINE_API
bool Selectable(
const char* label,
bool selected);
71ENGINE_API
void PushStyleColor(
int idx,
float r,
float g,
float b,
float a);
84ENGINE_API
void ProgressBar(
float fraction,
float width = -1.0f,
float height = 0.0f,
const char* overlay =
nullptr);
91ENGINE_API uint64_t
LoadTextureForUI(
const std::string& filePath,
float* outWidth =
nullptr,
float* outHeight =
nullptr);
98ENGINE_API
unsigned char*
LoadImagePixels(
const char* path,
int* w,
int* h);
@ StyleColor_HeaderActive
@ StyleColor_ButtonActive
@ StyleColor_ButtonHovered
@ StyleColor_HeaderHovered
@ StyleVar_WindowRounding
@ PanelFlags_NoFocusOnAppear
Immediate-mode UI calls available to game code.
ENGINE_API void ShutdownTextureCache()
ENGINE_API void DrawText(const char *text, float x, float y, float r, float g, float b, float a=1.0f)
ENGINE_API void Separator()
ENGINE_API float GetViewportHeight()
ENGINE_API uint64_t LoadTextureForUI(const std::string &filePath, float *outWidth=nullptr, float *outHeight=nullptr)
Loads an image file and caches it as a UI-bindable texture id, reusing the cache on repeat calls for ...
ENGINE_API bool Button(const char *label)
ENGINE_API float GetViewportWidth()
ENGINE_API void ProgressBar(float fraction, float width=-1.0f, float height=0.0f, const char *overlay=nullptr)
ENGINE_API void PushStyleColor(int idx, float r, float g, float b, float a)
ENGINE_API void FreeImagePixels(unsigned char *pixels)
ENGINE_API void BeginGroup()
ENGINE_API void SetCursorPosY(float y)
ENGINE_API void PushStyleVar(int idx, float val)
ENGINE_API void TextColored(float r, float g, float b, float a, const char *fmt,...)
ENGINE_API unsigned char * LoadImagePixels(const char *path, int *w, int *h)
Load image file into RGBA pixels (caller must free with FreeImagePixels).
ENGINE_API void EndGroup()
ENGINE_API void DrawLine(float x1, float y1, float x2, float y2, float r, float g, float b, float a=1.0f, float thickness=1.0f)
ENGINE_API Sleak::Texture * CreateTextureFromPixels(uint32_t width, uint32_t height, const void *rgbaPixels, uint32_t maxMipLevels=0)
Create a texture from raw RGBA pixel data (for runtime atlas building etc.).
ENGINE_API void PopStyleVar(int count=1)
ENGINE_API void BeginChild(const char *name)
ENGINE_API float GetCursorPosY()
ENGINE_API bool InputText(const char *label, char *buf, size_t bufSize)
ENGINE_API void EndChild()
ENGINE_API void Spacing()
ENGINE_API void SetNextItemWidth(float width)
ENGINE_API void Text(const char *fmt,...)
ENGINE_API bool ButtonSized(const char *label, float width, float height=0.0f)
ENGINE_API void DrawFilledRect(float x, float y, float w, float h, float r, float g, float b, float a=1.0f, float rounding=0.0f)
ENGINE_API void TextDisabled(const char *fmt,...)
ENGINE_API void Dummy(float width, float height)
ENGINE_API void SameLine()
ENGINE_API bool Selectable(const char *label, bool selected)
ENGINE_API void SetNextWindowPos(float x, float y, bool always=false)
ENGINE_API void EndListBox()
ENGINE_API void SetNextWindowSize(float w, float h, bool always=false)
ENGINE_API bool BeginListBox(const char *label, float width, float height)
ENGINE_API void PopStyleColor(int count=1)
ENGINE_API void DrawImage(uint64_t textureID, float x, float y, float width, float height)
ENGINE_API void SetCursorPosX(float x)
ENGINE_API void BeginChildSized(const char *name, float width, float height=0.0f)
ENGINE_API void TextWrapped(const char *fmt,...)
ENGINE_API void BeginPanel(const char *name, float x, float y, float bgAlpha=0.4f, int flags=PanelFlags_NoTitleBar|PanelFlags_AutoResize|PanelFlags_NoMove|PanelFlags_NoInput|PanelFlags_NoFocusOnAppear)
Opens a floating overlay window at (x, y); pair with EndPanel.
ENGINE_API bool Checkbox(const char *label, bool *value)
ENGINE_API void Image(uint64_t textureID, float width, float height)
ENGINE_API void DrawRect(float x, float y, float w, float h, float r, float g, float b, float a=1.0f, float thickness=1.0f, float rounding=0.0f)
ENGINE_API void PushStyleVarVec(int idx, float x, float y)
ENGINE_API bool InputTextString(const char *label, std::string *str)
ENGINE_API float GetContentRegionAvailWidth()
ENGINE_API bool Combo(const char *label, int *current, const char *const items[], int count)
ENGINE_API void EndPanel()
ENGINE_API bool DragFloat(const char *label, float *value, float speed=1.0f, float min=0.0f, float max=0.0f)
Root namespace for everything the engine exposes.