Core UI. More...
#include <imgui/imgui.h>
#include <imgui/imgui_internal.h>
#include <glm/glm.hpp>
#include "Font.h"
#include "LkEngine/Core/Math/Vector.h"
#include "LkEngine/Scene/Components.h"
#include "ImGuiFwd.h"
#include "UIDebug.h"
#include "Style.h"
Go to the source code of this file.
Classes | |
struct | LkEngine::UI::FMessageBox |
Data container for a message box instance. More... | |
struct | LkEngine::UI::SizeConstraint< T > |
struct | LkEngine::UI::SizeConstraint< ImVec2 > |
struct | LkEngine::UI::Internal::FVariableInfo |
struct | LkEngine::UI::Internal::FAlignData |
struct | LkEngine::UI::LUIContext |
struct | LkEngine::UI::LUIContext::FNextItemData |
Namespaces | |
namespace | LkEngine |
namespace | LkEngine::UI::Slider |
Macros | |
#define | LK_UI_DEBUG_DOCKNODES 0 |
#define | LK_UI_DEBUG_WINDOWS_ON_HOVER 0 |
Typedefs | |
template<typename T > | |
using | LkEngine::UI::TPropertyMapping = std::pair<const char*, T> |
Enumerations | |
enum class | EMessageBoxFlag : uint32_t { OkButton = LK_BIT(0) , CancelButton = LK_BIT(1) , UserFunction = LK_BIT(2) , AutoSize = LK_BIT(3) } |
enum class | EBorder { None = 0 , Horizontal = LK_BIT(1) , Vertical = LK_BIT(2) , All = LK_BIT(3) } |
enum class | EDataType : uint32_t { None , S32 , U32 , Float , Double , Bool , COUNT } |
enum class | LkEngine::UI::EFindType { ID , Name } |
Functions | |
LkEngine::LK_ENUM_CLASS (EMessageBoxFlag) | |
LkEngine::LK_ENUM_RANGE_FLAGS_BY_FIRST_AND_LAST (EMessageBoxFlag, EMessageBoxFlag::OkButton, EMessageBoxFlag::AutoSize) | |
LkEngine::LK_DECLARE_MULTICAST_DELEGATE (FOnSetPanelOpen, const char *, const bool) | |
LkEngine::LK_DECLARE_DELEGATE_RET (FIsPanelOpen, bool, const char *) | |
LkEngine::UI::LK_DECLARE_MULTICAST_DELEGATE (FOnMessageBoxCancelled, const char *) | |
LkEngine::UI::LK_ENUM_CLASS (EBorder) | |
FORCEINLINE const FVariableInfo * | LkEngine::UI::Internal::GetVariableInfo (const EStyle Idx) |
int | LkEngine::UI::Internal::GetContextID () |
FORCEINLINE void | LkEngine::UI::PushStyle (const EStyle Style, const float Value) |
FORCEINLINE void | LkEngine::UI::PopStyle (const int StylesToPop=1) |
FORCEINLINE void | LkEngine::UI::SetNextComboFlags (const ImGuiComboFlags Flags) |
FORCEINLINE bool | LkEngine::UI::InTable () |
void | LkEngine::UI::ShowMessageBox (const char *Title, const std::function< void()> &RenderFunction, uint32_t Flags, const uint32_t Width, const uint32_t Height, const uint32_t MinWidth, const uint32_t MinHeight, const uint32_t MaxWidth, const uint32_t MaxHeight) |
void | LkEngine::UI::RenderMessageBoxes () |
const char * | LkEngine::UI::GenerateID () |
void | LkEngine::UI::PushID () |
void | LkEngine::UI::PopID () |
void | LkEngine::UI::Separator (const ImVec2 &Size, const ImVec4 &Color) |
bool | LkEngine::UI::IsInputEnabled () |
bool | LkEngine::UI::IsMouseEnabled () |
bool | LkEngine::UI::IsKeyboardEnabled () |
void | LkEngine::UI::SetInputEnabled (const bool Enabled) |
void | LkEngine::UI::SetMouseEnabled (const bool Enabled) |
bool | LkEngine::UI::Begin (const char *WindowTitle, bool *Open, ImGuiWindowFlags WindowFlags) |
void | LkEngine::UI::End () |
void | LkEngine::UI::BeginViewport (TObjectPtr< LWindow > Window) |
ImTextureID | LkEngine::UI::GetTextureID (TObjectPtr< LTexture2D > Texture) |
ImGuiDockNode * | LkEngine::UI::FindCentralNode (const ImGuiID DockspaceID) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE bool | LkEngine::UI::IsWindowFocused (T Identifier, const bool CheckRootWindow=true) |
Check if a window is focused, defaults to use the window name. | |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowFocused (const char *WindowName, const bool CheckRootWindow) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowFocused (const ImGuiID ID, const bool CheckRootWindow) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE bool | LkEngine::UI::IsWindowDocked (T Identifier) |
Check if a window is docked, defaults to use the window name. | |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowDocked< EFindType::ID > (const ImGuiID ID) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowDocked< EFindType::Name > (const char *WindowName) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE bool | LkEngine::UI::IsWindowHovered (T Identifier) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowHovered< EFindType::Name > (const char *WindowName) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowHovered< EFindType::ID > (const ImGuiID ID) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE bool | LkEngine::UI::IsWindowAbove (T Window1, T Window2) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowAbove< EFindType::Name > (const char *Window1Name, const char *Window2Name) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsWindowAbove< EFindType::ID > (const ImGuiID Window1ID, const ImGuiID Window2ID) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE bool | LkEngine::UI::IsAnyWindowAbove (T Window) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsAnyWindowAbove< EFindType::Name > (const char *WindowName) |
template<> | |
FORCEINLINE bool | LkEngine::UI::IsAnyWindowAbove< EFindType::ID > (const ImGuiID WindowID) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE ImGuiWindow * | LkEngine::UI::GetWindowAbove (T Window1, T Window2) |
template<> | |
FORCEINLINE ImGuiWindow * | LkEngine::UI::GetWindowAbove< EFindType::Name > (const char *Window1Name, const char *Window2Name) |
template<> | |
FORCEINLINE ImGuiWindow * | LkEngine::UI::GetWindowAbove< EFindType::ID > (const ImGuiID Window1ID, const ImGuiID Window2ID) |
template<EFindType FindType = EFindType::Name, typename T = const char*> | |
FORCEINLINE ImVec2 | LkEngine::UI::GetWindowSize (T Identifier) |
Check if a window is docked, defaults to use the window name. | |
template<> | |
FORCEINLINE ImVec2 | LkEngine::UI::GetWindowSize< EFindType::ID > (const ImGuiID ID) |
template<> | |
FORCEINLINE ImVec2 | LkEngine::UI::GetWindowSize< EFindType::Name > (const char *WindowName) |
FORCEINLINE ImGuiID | LkEngine::UI::GetWindowID (const char *WindowName) |
FORCEINLINE const char * | LkEngine::UI::GetWindowName (const ImGuiID ID) |
FORCEINLINE bool | LkEngine::UI::IsItemDisabled () |
FORCEINLINE bool | LkEngine::UI::IsItemHovered (const float DelayInSeconds=0.10f, ImGuiHoveredFlags Flags=ImGuiHoveredFlags_None) |
FORCEINLINE ImRect | LkEngine::UI::GetItemRect () |
FORCEINLINE ImRect | LkEngine::UI::RectExpanded (const ImRect &Rect, const float x, const float y) |
FORCEINLINE ImRect | LkEngine::UI::RectOffset (const ImRect &Rect, const float x, const float y) |
FORCEINLINE void | LkEngine::UI::ShiftCursorX (const float Distance) |
FORCEINLINE void | LkEngine::UI::ShiftCursorY (const float Distance) |
FORCEINLINE void | LkEngine::UI::ShiftCursor (const float InX, const float InY) |
FORCEINLINE void | LkEngine::UI::DrawItemActivityOutline () |
FORCEINLINE void | LkEngine::UI::HelpMarker (const char *HelpDesc, const char *HelpSymbol="(?)") |
FORCEINLINE void | LkEngine::UI::SetTooltip (std::string_view Text, const float DelayInSeconds=0.10f, const bool AllowWhenDisabled=true, const ImVec2 Padding=ImVec2(5, 5)) |
FORCEINLINE void | LkEngine::UI::PopupMenuHeader (const std::string &Text, const bool IndentAfter=true, const bool UnindentBefore=false) |
FORCEINLINE void | LkEngine::UI::VSeparator (const float Height=10.0f) |
void | LkEngine::UI::Image (const TObjectPtr< LTexture2D > &texture, const ImVec2 &Size, const ImVec2 &UV0=ImVec2(0, 0), const ImVec2 &UV1=ImVec2(1, 1), const ImVec4 &TintColor=ImVec4(1, 1, 1, 1), const ImVec4 &BorderColor=ImVec4(0, 0, 0, 0)) |
void | LkEngine::UI::Image (const TObjectPtr< LTexture2D > &Image, const glm::vec2 &Size, const glm::vec2 &UV0=glm::vec2(0, 0), const glm::vec2 &UV1=glm::vec2(1, 1), const glm::vec4 &TintColor=glm::vec4(1, 1, 1, 1), const glm::vec4 &BorderColor=glm::vec4(0, 0, 0, 0)) |
void | LkEngine::UI::Image (const TObjectPtr< LImage2D > &Image, const ImVec2 &Size, const ImVec2 &UV0=ImVec2(0, 0), const ImVec2 &UV1=ImVec2(1, 1), const ImVec4 &TintColor=ImVec4(1, 1, 1, 1), const ImVec4 &BorderColor=ImVec4(0, 0, 0, 0)) |
void | LkEngine::UI::Image (const TObjectPtr< LImage2D > &Image, const glm::vec2 &Size, const glm::vec2 &UV0=glm::vec2(0, 0), const glm::vec2 &UV1=glm::vec2(1, 1), const glm::vec4 &TintColor=glm::vec4(1, 1, 1, 1), const glm::vec4 &BorderColor=glm::vec4(0, 0, 0, 0)) |
FORCEINLINE void | LkEngine::UI::Draw::Underline (bool FullWidth=false, const float OffsetX=0.0f, const float OffsetY=-1.0f) |
FORCEINLINE void | LkEngine::UI::Spring (const float Weight=1.0f) |
FORCEINLINE void | LkEngine::UI::AlignHorizontalCenter (const float ItemWidth) |
FORCEINLINE bool | LkEngine::UI::ColoredButton (const char *Label, const ImVec4 &BgColor, const ImVec2 &ButtonSize) |
FORCEINLINE bool | LkEngine::UI::ColoredButton (const char *Label, const ImVec4 &BgColor, const ImVec4 &FgColor, const ImVec2 &ButtonSize) |
FORCEINLINE void | LkEngine::UI::DrawButtonImage (const TObjectPtr< LTexture2D > &ImageNormal, const TObjectPtr< LTexture2D > &ImageHovered, const TObjectPtr< LTexture2D > &ImagePressed, const ImU32 TintNormal, const ImU32 TintHovered, const ImU32 TintPressed, const ImVec2 &RectMin, const ImVec2 &RectMax) |
FORCEINLINE void | LkEngine::UI::DrawButtonImage (const TObjectPtr< LTexture2D > &Image, const ImU32 TintNormal, const ImU32 TintHovered, const ImU32 TintPressed, const ImRect &Rectangle) |
Core UI.