|
SleakEngine 1.0.0
C++23 multi-backend game engine
|
Go to the source code of this file.
Namespaces | |
| namespace | Sleak |
| Root namespace for everything the engine exposes. | |
| namespace | Sleak::UI |
| Immediate-mode UI calls available to game code. | |
Enumerations | |
| enum | Sleak::UI::PanelFlags : int { Sleak::UI::PanelFlags_None = 0 , Sleak::UI::PanelFlags_NoTitleBar = 1 << 0 , Sleak::UI::PanelFlags_AutoResize = 1 << 1 , Sleak::UI::PanelFlags_NoMove = 1 << 2 , Sleak::UI::PanelFlags_NoInput = 1 << 3 , Sleak::UI::PanelFlags_NoFocusOnAppear = 1 << 4 } |
| enum | Sleak::UI::StyleColor : int { Sleak::UI::StyleColor_Text = 0 , Sleak::UI::StyleColor_WindowBg = 2 , Sleak::UI::StyleColor_ChildBg = 3 , Sleak::UI::StyleColor_Button = 21 , Sleak::UI::StyleColor_ButtonHovered = 22 , Sleak::UI::StyleColor_ButtonActive = 23 , Sleak::UI::StyleColor_FrameBg = 7 , Sleak::UI::StyleColor_Header = 24 , Sleak::UI::StyleColor_HeaderHovered = 25 , Sleak::UI::StyleColor_HeaderActive = 26 , Sleak::UI::StyleColor_ScrollbarBg = 14 } |
| enum | Sleak::UI::StyleVar : int { Sleak::UI::StyleVar_WindowPadding = 2 , Sleak::UI::StyleVar_WindowRounding = 3 , Sleak::UI::StyleVar_FramePadding = 11 , Sleak::UI::StyleVar_FrameRounding = 12 , Sleak::UI::StyleVar_ItemSpacing = 14 } |
Functions | |
| ENGINE_API void | Sleak::UI::BeginChild (const char *name) |
| ENGINE_API void | Sleak::UI::BeginChildSized (const char *name, float width, float height=0.0f) |
| ENGINE_API void | Sleak::UI::BeginGroup () |
| ENGINE_API bool | Sleak::UI::BeginListBox (const char *label, float width, float height) |
| ENGINE_API void | Sleak::UI::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 | Sleak::UI::Button (const char *label) |
| ENGINE_API bool | Sleak::UI::ButtonSized (const char *label, float width, float height=0.0f) |
| ENGINE_API bool | Sleak::UI::Checkbox (const char *label, bool *value) |
| ENGINE_API bool | Sleak::UI::Combo (const char *label, int *current, const char *const items[], int count) |
| ENGINE_API Sleak::Texture * | Sleak::UI::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 bool | Sleak::UI::DragFloat (const char *label, float *value, float speed=1.0f, float min=0.0f, float max=0.0f) |
| ENGINE_API void | Sleak::UI::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 | Sleak::UI::DrawImage (uint64_t textureID, float x, float y, float width, float height) |
| ENGINE_API void | Sleak::UI::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 void | Sleak::UI::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 | Sleak::UI::DrawText (const char *text, float x, float y, float r, float g, float b, float a=1.0f) |
| ENGINE_API void | Sleak::UI::Dummy (float width, float height) |
| ENGINE_API void | Sleak::UI::EndChild () |
| ENGINE_API void | Sleak::UI::EndGroup () |
| ENGINE_API void | Sleak::UI::EndListBox () |
| ENGINE_API void | Sleak::UI::EndPanel () |
| ENGINE_API void | Sleak::UI::FreeImagePixels (unsigned char *pixels) |
| ENGINE_API float | Sleak::UI::GetContentRegionAvailWidth () |
| ENGINE_API float | Sleak::UI::GetCursorPosY () |
| ENGINE_API float | Sleak::UI::GetViewportHeight () |
| ENGINE_API float | Sleak::UI::GetViewportWidth () |
| ENGINE_API void | Sleak::UI::Image (uint64_t textureID, float width, float height) |
| ENGINE_API bool | Sleak::UI::InputText (const char *label, char *buf, size_t bufSize) |
| ENGINE_API bool | Sleak::UI::InputTextString (const char *label, std::string *str) |
| ENGINE_API unsigned char * | Sleak::UI::LoadImagePixels (const char *path, int *w, int *h) |
| Load image file into RGBA pixels (caller must free with FreeImagePixels). | |
| ENGINE_API uint64_t | Sleak::UI::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 the same path. | |
| ENGINE_API void | Sleak::UI::PopStyleColor (int count=1) |
| ENGINE_API void | Sleak::UI::PopStyleVar (int count=1) |
| ENGINE_API void | Sleak::UI::ProgressBar (float fraction, float width=-1.0f, float height=0.0f, const char *overlay=nullptr) |
| ENGINE_API void | Sleak::UI::PushStyleColor (int idx, float r, float g, float b, float a) |
| ENGINE_API void | Sleak::UI::PushStyleVar (int idx, float val) |
| ENGINE_API void | Sleak::UI::PushStyleVarVec (int idx, float x, float y) |
| ENGINE_API void | Sleak::UI::SameLine () |
| ENGINE_API bool | Sleak::UI::Selectable (const char *label, bool selected) |
| ENGINE_API void | Sleak::UI::Separator () |
| ENGINE_API void | Sleak::UI::SetCursorPosX (float x) |
| ENGINE_API void | Sleak::UI::SetCursorPosY (float y) |
| ENGINE_API void | Sleak::UI::SetNextItemWidth (float width) |
| ENGINE_API void | Sleak::UI::SetNextWindowPos (float x, float y, bool always=false) |
| ENGINE_API void | Sleak::UI::SetNextWindowSize (float w, float h, bool always=false) |
| ENGINE_API void | Sleak::UI::ShutdownTextureCache () |
| ENGINE_API void | Sleak::UI::Spacing () |
| ENGINE_API void | Sleak::UI::Text (const char *fmt,...) |
| ENGINE_API void | Sleak::UI::TextColored (float r, float g, float b, float a, const char *fmt,...) |
| ENGINE_API void | Sleak::UI::TextDisabled (const char *fmt,...) |
| ENGINE_API void | Sleak::UI::TextWrapped (const char *fmt,...) |