DDraceNetwork Docs
CUi Class Reference

#include <ui.h>

Collaboration diagram for CUi:
[legend]

Classes

class  CDoubleClickState
 
class  CTouchState
 
class  CValueSelectorState
 
struct  SColorPickerPopupContext
 
struct  SConfirmPopupContext
 
struct  SDropDownState
 
struct  SMessagePopupContext
 
struct  SPopupMenu
 
struct  SSelectionPopupContext
 

Public Types

enum  EPopupMenuFunctionResult { POPUP_KEEP_OPEN = 0 , POPUP_CLOSE_CURRENT = 1 , POPUP_CLOSE_CURRENT_AND_DESCENDANTS = 2 }
 
enum  EHotkey : unsigned {
  HOTKEY_ENTER = 1 << 0 , HOTKEY_ESCAPE = 1 << 1 , HOTKEY_UP = 1 << 2 , HOTKEY_DOWN = 1 << 3 ,
  HOTKEY_LEFT = 1 << 4 , HOTKEY_RIGHT = 1 << 5 , HOTKEY_DELETE = 1 << 6 , HOTKEY_TAB = 1 << 7 ,
  HOTKEY_SCROLL_UP = 1 << 8 , HOTKEY_SCROLL_DOWN = 1 << 9 , HOTKEY_PAGE_UP = 1 << 10 , HOTKEY_PAGE_DOWN = 1 << 11 ,
  HOTKEY_HOME = 1 << 12 , HOTKEY_END = 1 << 13
}
 
enum  { SCROLLBAR_OPTION_INFINITE = 1 << 0 , SCROLLBAR_OPTION_NOCLAMPVALUE = 1 << 1 , SCROLLBAR_OPTION_MULTILINE = 1 << 2 }
 
typedef EPopupMenuFunctionResult(* FPopupMenuFunction) (void *pContext, CUIRect View, bool Active)
 
typedef std::function< void()> FPopupMenuClosedCallback
 

Public Member Functions

void Init (IKernel *pKernel)
 
IClientClient () const
 
IGraphicsGraphics () const
 
IInputInput () const
 
ITextRenderTextRender () const
 
 CUi ()
 
 ~CUi ()
 
void ResetUIElement (CUIElement &UIElement) const
 
CUIElementGetNewUIElement (int RequestedRectCount)
 
void AddUIElement (CUIElement *pElement)
 
void OnElementsReset ()
 
void OnWindowResize ()
 
void OnCursorMove (float X, float Y)
 
void SetEnabled (bool Enabled)
 
bool Enabled () const
 
void Update (vec2 MouseWorldPos=vec2(-1.0f, -1.0f))
 
void DebugRender (float X, float Y)
 
vec2 MousePos () const
 
float MouseX () const
 
float MouseY () const
 
vec2 MouseDelta () const
 
float MouseDeltaX () const
 
float MouseDeltaY () const
 
vec2 MouseWorldPos () const
 
float MouseWorldX () const
 
float MouseWorldY () const
 
vec2 UpdatedMousePos () const
 
vec2 UpdatedMouseDelta () const
 
int MouseButton (int Index) const
 
int MouseButtonClicked (int Index) const
 
bool CheckMouseLock ()
 
void EnableMouseLock (const void *pId)
 
void DisableMouseLock ()
 
void SetHotItem (const void *pId)
 
void SetActiveItem (const void *pId)
 
bool CheckActiveItem (const void *pId)
 
void SetHotScrollRegion (CScrollRegion *pId)
 
const void * HotItem () const
 
const void * NextHotItem () const
 
const void * ActiveItem () const
 
const CScrollRegionHotScrollRegion () const
 
void StartCheck ()
 
void FinishCheck ()
 
bool MouseInside (const CUIRect *pRect) const
 
bool MouseInsideClip () const
 
bool MouseHovered (const CUIRect *pRect) const
 
void ConvertMouseMove (float *pX, float *pY, IInput::ECursorType CursorType) const
 
void UpdateTouchState (CTouchState &State) const
 
void ResetMouseSlow ()
 
bool ConsumeHotkey (EHotkey Hotkey)
 
void ClearHotkeys ()
 
bool OnInput (const IInput::CEvent &Event)
 
constexpr float ButtonColorMulActive () const
 
constexpr float ButtonColorMulHot () const
 
constexpr float ButtonColorMulDefault () const
 
float ButtonColorMul (const void *pId)
 
const CUIRectScreen ()
 
void MapScreen ()
 
float PixelSize ()
 
void ClipEnable (const CUIRect *pRect)
 
void ClipDisable ()
 
const CUIRectClipArea () const
 
bool IsClipped () const
 
int DoButtonLogic (const void *pId, int Checked, const CUIRect *pRect)
 
int DoDraggableButtonLogic (const void *pId, int Checked, const CUIRect *pRect, bool *pClicked, bool *pAbrupted)
 
bool DoDoubleClickLogic (const void *pId)
 
EEditState DoPickerLogic (const void *pId, const CUIRect *pRect, float *pX, float *pY)
 
void DoSmoothScrollLogic (float *pScrollOffset, float *pScrollOffsetChange, float ViewPortSize, float TotalSize, bool SmoothClamp=false, float ScrollSpeed=10.0f) const
 
void DoLabel (const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps={}) const
 
void DoLabel (CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps={}, int StrLen=-1, const CTextCursor *pReadCursor=nullptr) const
 
void DoLabelStreamed (CUIElement::SUIElementRect &RectEl, const CUIRect *pRect, const char *pText, float Size, int Align, const SLabelProperties &LabelProps={}, int StrLen=-1, const CTextCursor *pReadCursor=nullptr) const
 
bool DoEditBox (CLineInput *pLineInput, const CUIRect *pRect, float FontSize, int Corners=IGraphics::CORNER_ALL, const std::vector< STextColorSplit > &vColorSplits={})
 
bool DoClearableEditBox (CLineInput *pLineInput, const CUIRect *pRect, float FontSize, int Corners=IGraphics::CORNER_ALL, const std::vector< STextColorSplit > &vColorSplits={})
 
bool DoEditBox_Search (CLineInput *pLineInput, const CUIRect *pRect, float FontSize, bool HotkeyEnabled)
 
int DoButton_Menu (CUIElement &UIElement, const CButtonContainer *pId, const std::function< const char *()> &GetTextLambda, const CUIRect *pRect, const SMenuButtonProperties &Props={})
 
int DoButton_PopupMenu (CButtonContainer *pButtonContainer, const char *pText, const CUIRect *pRect, float Size, int Align, float Padding=0.0f, bool TransparentInactive=false, bool Enabled=true)
 
SEditResult< int64_t > DoValueSelectorWithState (const void *pId, const CUIRect *pRect, const char *pLabel, int64_t Current, int64_t Min, int64_t Max, const SValueSelectorProperties &Props={})
 
int64_t DoValueSelector (const void *pId, const CUIRect *pRect, const char *pLabel, int64_t Current, int64_t Min, int64_t Max, const SValueSelectorProperties &Props={})
 
float DoScrollbarV (const void *pId, const CUIRect *pRect, float Current)
 
float DoScrollbarH (const void *pId, const CUIRect *pRect, float Current, const ColorRGBA *pColorInner=nullptr)
 
bool DoScrollbarOption (const void *pId, int *pOption, const CUIRect *pRect, const char *pStr, int Min, int Max, const IScrollbarScale *pScale=&ms_LinearScrollbarScale, unsigned Flags=0u, const char *pSuffix="")
 
void RenderProgressBar (CUIRect ProgressBar, float Progress)
 
void RenderProgressSpinner (vec2 Center, float OuterRadius, const SProgressSpinnerProperties &Props={}) const
 
void DoPopupMenu (const SPopupMenuId *pId, float X, float Y, float Width, float Height, void *pContext, FPopupMenuFunction pfnFunc, const SPopupMenuProperties &Props={})
 
void RenderPopupMenus ()
 
void ClosePopupMenu (const SPopupMenuId *pId, bool IncludeDescendants=false)
 
void ClosePopupMenus ()
 
bool IsPopupOpen () const
 
bool IsPopupOpen (const SPopupMenuId *pId) const
 
bool IsPopupHovered () const
 
void SetPopupMenuClosedCallback (FPopupMenuClosedCallback pfnCallback)
 
void ShowPopupMessage (float X, float Y, SMessagePopupContext *pContext)
 
void ShowPopupConfirm (float X, float Y, SConfirmPopupContext *pContext)
 
void ShowPopupSelection (float X, float Y, SSelectionPopupContext *pContext)
 
void ShowPopupColorPicker (float X, float Y, SColorPickerPopupContext *pContext)
 
int DoDropDown (CUIRect *pRect, int CurSelection, const char **pStrs, int Num, SDropDownState &State)
 

Static Public Member Functions

static vec2 CalcAlignedCursorPos (const CUIRect *pRect, vec2 TextSize, int Align, const float *pBiggestCharHeight=nullptr)
 

Static Public Attributes

static const CLinearScrollbarScale ms_LinearScrollbarScale
 
static const CLogarithmicScrollbarScale ms_LogarithmicScrollbarScale
 
static const CDarkButtonColorFunction ms_DarkButtonColorFunction
 
static const CLightButtonColorFunction ms_LightButtonColorFunction
 
static const CScrollBarColorFunction ms_ScrollBarColorFunction
 
static const float ms_FontmodHeight = 0.8f
 

Private Member Functions

void UpdateClipping ()
 

Static Private Member Functions

static CUi::EPopupMenuFunctionResult PopupMessage (void *pContext, CUIRect View, bool Active)
 
static CUi::EPopupMenuFunctionResult PopupConfirm (void *pContext, CUIRect View, bool Active)
 
static CUi::EPopupMenuFunctionResult PopupSelection (void *pContext, CUIRect View, bool Active)
 
static CUi::EPopupMenuFunctionResult PopupColorPicker (void *pContext, CUIRect View, bool Active)
 

Private Attributes

bool m_Enabled
 
const void * m_pHotItem = nullptr
 
const void * m_pActiveItem = nullptr
 
const void * m_pLastActiveItem = nullptr
 
const void * m_pBecomingHotItem = nullptr
 
CScrollRegionm_pHotScrollRegion = nullptr
 
CScrollRegionm_pBecomingHotScrollRegion = nullptr
 
bool m_ActiveItemValid = false
 
int m_ActiveButtonLogicButton = -1
 
int m_ActiveDraggableButtonLogicButton = -1
 
CDoubleClickState m_DoubleClickState
 
const void * m_pLastEditingItem = nullptr
 
float m_ActiveScrollbarOffset = 0.0f
 
float m_ProgressSpinnerOffset = 0.0f
 
CValueSelectorState m_ActiveValueSelectorState
 
vec2 m_UpdatedMousePos = vec2(0.0f, 0.0f)
 
vec2 m_UpdatedMouseDelta = vec2(0.0f, 0.0f)
 
vec2 m_MousePos = vec2(0.0f, 0.0f)
 
vec2 m_MouseDelta = vec2(0.0f, 0.0f)
 
vec2 m_MouseWorldPos = vec2(-1.0f, -1.0f)
 
unsigned m_UpdatedMouseButtons = 0
 
unsigned m_MouseButtons = 0
 
unsigned m_LastMouseButtons = 0
 
CTouchState m_TouchState
 
bool m_MouseSlow = false
 
bool m_MouseLock = false
 
const void * m_pMouseLockId = nullptr
 
unsigned m_HotkeysPressed = 0
 
CUIRect m_Screen
 
std::vector< CUIRectm_vClips
 
std::vector< SPopupMenum_vPopupMenus
 
FPopupMenuClosedCallback m_pfnPopupMenuClosedCallback = nullptr
 
IClientm_pClient
 
IGraphicsm_pGraphics
 
IInputm_pInput
 
ITextRenderm_pTextRender
 
std::vector< CUIElement * > m_vpOwnUIElements
 
std::vector< CUIElement * > m_vpUIElements
 

Member Typedef Documentation

◆ FPopupMenuClosedCallback

typedef std::function<void()> CUi::FPopupMenuClosedCallback

Callback that is called when one or more popups are closed.

◆ FPopupMenuFunction

typedef EPopupMenuFunctionResult(* CUi::FPopupMenuFunction) (void *pContext, CUIRect View, bool Active)

Callback that draws a popup menu.

Parameters
pContextThe context object of the popup menu.
ViewThe UI rect where the popup menu's contents should be drawn.
ActiveWhether this popup is active (the top-most popup). Only the active popup should handle key and mouse events.
Returns
Value from the EPopupMenuFunctionResult enum.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SCROLLBAR_OPTION_INFINITE 
SCROLLBAR_OPTION_NOCLAMPVALUE 
SCROLLBAR_OPTION_MULTILINE 

◆ EHotkey

enum CUi::EHotkey : unsigned
Enumerator
HOTKEY_ENTER 
HOTKEY_ESCAPE 
HOTKEY_UP 
HOTKEY_DOWN 
HOTKEY_LEFT 
HOTKEY_RIGHT 
HOTKEY_DELETE 
HOTKEY_TAB 
HOTKEY_SCROLL_UP 
HOTKEY_SCROLL_DOWN 
HOTKEY_PAGE_UP 
HOTKEY_PAGE_DOWN 
HOTKEY_HOME 
HOTKEY_END 

◆ EPopupMenuFunctionResult

These enum values are returned by popup menu functions to specify the behavior.

Enumerator
POPUP_KEEP_OPEN 

The current popup menu will be kept open.

POPUP_CLOSE_CURRENT 

The current popup menu will be closed.

POPUP_CLOSE_CURRENT_AND_DESCENDANTS 

The current popup menu and all popup menus above it will be closed.

Constructor & Destructor Documentation

◆ CUi()

CUi::CUi ( )

◆ ~CUi()

CUi::~CUi ( )

Member Function Documentation

◆ ActiveItem()

const void * CUi::ActiveItem ( ) const
inline

◆ AddUIElement()

void CUi::AddUIElement ( CUIElement pElement)

◆ ButtonColorMul()

float CUi::ButtonColorMul ( const void *  pId)

◆ ButtonColorMulActive()

constexpr float CUi::ButtonColorMulActive ( ) const
inlineconstexpr

◆ ButtonColorMulDefault()

constexpr float CUi::ButtonColorMulDefault ( ) const
inlineconstexpr

◆ ButtonColorMulHot()

constexpr float CUi::ButtonColorMulHot ( ) const
inlineconstexpr

◆ CalcAlignedCursorPos()

vec2 CUi::CalcAlignedCursorPos ( const CUIRect pRect,
vec2  TextSize,
int  Align,
const float *  pBiggestCharHeight = nullptr 
)
static

◆ CheckActiveItem()

bool CUi::CheckActiveItem ( const void *  pId)
inline

◆ CheckMouseLock()

bool CUi::CheckMouseLock ( )
inline

◆ ClearHotkeys()

void CUi::ClearHotkeys ( )
inline

◆ Client()

IClient * CUi::Client ( ) const
inline

◆ ClipArea()

const CUIRect * CUi::ClipArea ( ) const

◆ ClipDisable()

void CUi::ClipDisable ( )

◆ ClipEnable()

void CUi::ClipEnable ( const CUIRect pRect)

◆ ClosePopupMenu()

void CUi::ClosePopupMenu ( const SPopupMenuId pId,
bool  IncludeDescendants = false 
)

◆ ClosePopupMenus()

void CUi::ClosePopupMenus ( )

◆ ConsumeHotkey()

bool CUi::ConsumeHotkey ( EHotkey  Hotkey)

◆ ConvertMouseMove()

void CUi::ConvertMouseMove ( float *  pX,
float *  pY,
IInput::ECursorType  CursorType 
) const

◆ DebugRender()

void CUi::DebugRender ( float  X,
float  Y 
)

◆ DisableMouseLock()

void CUi::DisableMouseLock ( )
inline

◆ DoButton_Menu()

int CUi::DoButton_Menu ( CUIElement UIElement,
const CButtonContainer pId,
const std::function< const char *()> &  GetTextLambda,
const CUIRect pRect,
const SMenuButtonProperties Props = {} 
)

◆ DoButton_PopupMenu()

int CUi::DoButton_PopupMenu ( CButtonContainer pButtonContainer,
const char *  pText,
const CUIRect pRect,
float  Size,
int  Align,
float  Padding = 0.0f,
bool  TransparentInactive = false,
bool  Enabled = true 
)

◆ DoButtonLogic()

int CUi::DoButtonLogic ( const void *  pId,
int  Checked,
const CUIRect pRect 
)

◆ DoClearableEditBox()

bool CUi::DoClearableEditBox ( CLineInput pLineInput,
const CUIRect pRect,
float  FontSize,
int  Corners = IGraphics::CORNER_ALL,
const std::vector< STextColorSplit > &  vColorSplits = {} 
)

Creates an input field with a clear [x] button attached to it.

See also
DoEditBox
Parameters
pLineInputThis pointer will be stored and written to on next user input. So you can not pass in a pointer that goes out of scope such as a local variable. Pass in either a member variable of the current class or a static variable. For example static CLineInputBuffered<IO_MAX_PATH_LENGTH> s_MyInput;
pRectthe UI rect it will attach to
FontSizeSize of the font (10.0f, 12.0f and 14.0f are commonly used here)
CornersNumber of corners (default: IGraphics::CORNER_ALL)
vColorSplitsSets color splits of the CTextCursor to allow multicolored text
Returns
true if the value of the input field changed since the last call.

◆ DoDoubleClickLogic()

bool CUi::DoDoubleClickLogic ( const void *  pId)

◆ DoDraggableButtonLogic()

int CUi::DoDraggableButtonLogic ( const void *  pId,
int  Checked,
const CUIRect pRect,
bool *  pClicked,
bool *  pAbrupted 
)

◆ DoDropDown()

int CUi::DoDropDown ( CUIRect pRect,
int  CurSelection,
const char **  pStrs,
int  Num,
SDropDownState State 
)

◆ DoEditBox()

bool CUi::DoEditBox ( CLineInput pLineInput,
const CUIRect pRect,
float  FontSize,
int  Corners = IGraphics::CORNER_ALL,
const std::vector< STextColorSplit > &  vColorSplits = {} 
)

Creates an input field.

See also
DoClearableEditBox
Parameters
pLineInputThis pointer will be stored and written to on next user input. So you can not pass in a pointer that goes out of scope such as a local variable. Pass in either a member variable of the current class or a static variable. For example static CLineInputBuffered<IO_MAX_PATH_LENGTH> s_MyInput;
pRectthe UI rect it will attach to with a 2.0f margin
FontSizeSize of the font (10.0f, 12.0f and 14.0f are commonly used here)
CornersNumber of corners (default: IGraphics::CORNER_ALL)
vColorSplitsSets color splits of the CTextCursor to allow multicolored text
Returns
true if the value of the input field changed since the last call.

◆ DoEditBox_Search()

bool CUi::DoEditBox_Search ( CLineInput pLineInput,
const CUIRect pRect,
float  FontSize,
bool  HotkeyEnabled 
)

Creates an input field with a search icon and a clear [x] button attached to it. The input will have default text "Search" and the hotkey Ctrl+F can be used to activate the input.

See also
DoEditBox
Parameters
pLineInputThis pointer will be stored and written to on next user input. So you can not pass in a pointer that goes out of scope such as a local variable. Pass in either a member variable of the current class or a static variable. For example static CLineInputBuffered<IO_MAX_PATH_LENGTH> s_MyInput;
pRectthe UI rect it will attach to
FontSizeSize of the font (10.0f, 12.0f and 14.0f are commonly used here)
HotkeyEnabledWhether the hotkey to enable this editbox is currently enabled.
Returns
true if the value of the input field changed since the last call.

◆ DoLabel() [1/2]

void CUi::DoLabel ( const CUIRect pRect,
const char *  pText,
float  Size,
int  Align,
const SLabelProperties LabelProps = {} 
) const

◆ DoLabel() [2/2]

void CUi::DoLabel ( CUIElement::SUIElementRect RectEl,
const CUIRect pRect,
const char *  pText,
float  Size,
int  Align,
const SLabelProperties LabelProps = {},
int  StrLen = -1,
const CTextCursor pReadCursor = nullptr 
) const

◆ DoLabelStreamed()

void CUi::DoLabelStreamed ( CUIElement::SUIElementRect RectEl,
const CUIRect pRect,
const char *  pText,
float  Size,
int  Align,
const SLabelProperties LabelProps = {},
int  StrLen = -1,
const CTextCursor pReadCursor = nullptr 
) const

◆ DoPickerLogic()

EEditState CUi::DoPickerLogic ( const void *  pId,
const CUIRect pRect,
float *  pX,
float *  pY 
)

◆ DoPopupMenu()

void CUi::DoPopupMenu ( const SPopupMenuId pId,
float  X,
float  Y,
float  Width,
float  Height,
void *  pContext,
FPopupMenuFunction  pfnFunc,
const SPopupMenuProperties Props = {} 
)

◆ DoScrollbarH()

float CUi::DoScrollbarH ( const void *  pId,
const CUIRect pRect,
float  Current,
const ColorRGBA pColorInner = nullptr 
)

◆ DoScrollbarOption()

bool CUi::DoScrollbarOption ( const void *  pId,
int *  pOption,
const CUIRect pRect,
const char *  pStr,
int  Min,
int  Max,
const IScrollbarScale pScale = &ms_LinearScrollbarScale,
unsigned  Flags = 0u,
const char *  pSuffix = "" 
)

◆ DoScrollbarV()

float CUi::DoScrollbarV ( const void *  pId,
const CUIRect pRect,
float  Current 
)

◆ DoSmoothScrollLogic()

void CUi::DoSmoothScrollLogic ( float *  pScrollOffset,
float *  pScrollOffsetChange,
float  ViewPortSize,
float  TotalSize,
bool  SmoothClamp = false,
float  ScrollSpeed = 10.0f 
) const

◆ DoValueSelector()

int64_t CUi::DoValueSelector ( const void *  pId,
const CUIRect pRect,
const char *  pLabel,
int64_t  Current,
int64_t  Min,
int64_t  Max,
const SValueSelectorProperties Props = {} 
)

◆ DoValueSelectorWithState()

SEditResult< int64_t > CUi::DoValueSelectorWithState ( const void *  pId,
const CUIRect pRect,
const char *  pLabel,
int64_t  Current,
int64_t  Min,
int64_t  Max,
const SValueSelectorProperties Props = {} 
)

◆ Enabled()

bool CUi::Enabled ( ) const
inline

◆ EnableMouseLock()

void CUi::EnableMouseLock ( const void *  pId)
inline

◆ FinishCheck()

void CUi::FinishCheck ( )
inline

◆ GetNewUIElement()

CUIElement * CUi::GetNewUIElement ( int  RequestedRectCount)

◆ Graphics()

IGraphics * CUi::Graphics ( ) const
inline

◆ HotItem()

const void * CUi::HotItem ( ) const
inline

◆ HotScrollRegion()

const CScrollRegion * CUi::HotScrollRegion ( ) const
inline

◆ Init()

void CUi::Init ( IKernel pKernel)

◆ Input()

IInput * CUi::Input ( ) const
inline

◆ IsClipped()

bool CUi::IsClipped ( ) const
inline

◆ IsPopupHovered()

bool CUi::IsPopupHovered ( ) const

◆ IsPopupOpen() [1/2]

bool CUi::IsPopupOpen ( ) const

◆ IsPopupOpen() [2/2]

bool CUi::IsPopupOpen ( const SPopupMenuId pId) const

◆ MapScreen()

void CUi::MapScreen ( )

◆ MouseButton()

int CUi::MouseButton ( int  Index) const
inline

◆ MouseButtonClicked()

int CUi::MouseButtonClicked ( int  Index) const
inline

◆ MouseDelta()

vec2 CUi::MouseDelta ( ) const
inline

◆ MouseDeltaX()

float CUi::MouseDeltaX ( ) const
inline

◆ MouseDeltaY()

float CUi::MouseDeltaY ( ) const
inline

◆ MouseHovered()

bool CUi::MouseHovered ( const CUIRect pRect) const
inline

◆ MouseInside()

bool CUi::MouseInside ( const CUIRect pRect) const

◆ MouseInsideClip()

bool CUi::MouseInsideClip ( ) const
inline

◆ MousePos()

vec2 CUi::MousePos ( ) const
inline

◆ MouseWorldPos()

vec2 CUi::MouseWorldPos ( ) const
inline

◆ MouseWorldX()

float CUi::MouseWorldX ( ) const
inline

◆ MouseWorldY()

float CUi::MouseWorldY ( ) const
inline

◆ MouseX()

float CUi::MouseX ( ) const
inline

◆ MouseY()

float CUi::MouseY ( ) const
inline

◆ NextHotItem()

const void * CUi::NextHotItem ( ) const
inline

◆ OnCursorMove()

void CUi::OnCursorMove ( float  X,
float  Y 
)

◆ OnElementsReset()

void CUi::OnElementsReset ( )

◆ OnInput()

bool CUi::OnInput ( const IInput::CEvent Event)

◆ OnWindowResize()

void CUi::OnWindowResize ( )

◆ PixelSize()

float CUi::PixelSize ( )

◆ PopupColorPicker()

CUi::EPopupMenuFunctionResult CUi::PopupColorPicker ( void *  pContext,
CUIRect  View,
bool  Active 
)
staticprivate

◆ PopupConfirm()

CUi::EPopupMenuFunctionResult CUi::PopupConfirm ( void *  pContext,
CUIRect  View,
bool  Active 
)
staticprivate

◆ PopupMessage()

CUi::EPopupMenuFunctionResult CUi::PopupMessage ( void *  pContext,
CUIRect  View,
bool  Active 
)
staticprivate

◆ PopupSelection()

CUi::EPopupMenuFunctionResult CUi::PopupSelection ( void *  pContext,
CUIRect  View,
bool  Active 
)
staticprivate

◆ RenderPopupMenus()

void CUi::RenderPopupMenus ( )

◆ RenderProgressBar()

void CUi::RenderProgressBar ( CUIRect  ProgressBar,
float  Progress 
)

◆ RenderProgressSpinner()

void CUi::RenderProgressSpinner ( vec2  Center,
float  OuterRadius,
const SProgressSpinnerProperties Props = {} 
) const

◆ ResetMouseSlow()

void CUi::ResetMouseSlow ( )
inline

◆ ResetUIElement()

void CUi::ResetUIElement ( CUIElement UIElement) const

◆ Screen()

const CUIRect * CUi::Screen ( )

◆ SetActiveItem()

void CUi::SetActiveItem ( const void *  pId)
inline

◆ SetEnabled()

void CUi::SetEnabled ( bool  Enabled)
inline

◆ SetHotItem()

void CUi::SetHotItem ( const void *  pId)
inline

◆ SetHotScrollRegion()

void CUi::SetHotScrollRegion ( CScrollRegion pId)
inline

◆ SetPopupMenuClosedCallback()

void CUi::SetPopupMenuClosedCallback ( FPopupMenuClosedCallback  pfnCallback)

◆ ShowPopupColorPicker()

void CUi::ShowPopupColorPicker ( float  X,
float  Y,
SColorPickerPopupContext pContext 
)

◆ ShowPopupConfirm()

void CUi::ShowPopupConfirm ( float  X,
float  Y,
SConfirmPopupContext pContext 
)

◆ ShowPopupMessage()

void CUi::ShowPopupMessage ( float  X,
float  Y,
SMessagePopupContext pContext 
)

◆ ShowPopupSelection()

void CUi::ShowPopupSelection ( float  X,
float  Y,
SSelectionPopupContext pContext 
)

◆ StartCheck()

void CUi::StartCheck ( )
inline

◆ TextRender()

ITextRender * CUi::TextRender ( ) const
inline

◆ Update()

void CUi::Update ( vec2  MouseWorldPos = vec2(-1.0f, -1.0f))

◆ UpdateClipping()

void CUi::UpdateClipping ( )
private

◆ UpdatedMouseDelta()

vec2 CUi::UpdatedMouseDelta ( ) const
inline

◆ UpdatedMousePos()

vec2 CUi::UpdatedMousePos ( ) const
inline

◆ UpdateTouchState()

void CUi::UpdateTouchState ( CTouchState State) const

Member Data Documentation

◆ m_ActiveButtonLogicButton

int CUi::m_ActiveButtonLogicButton = -1
private

◆ m_ActiveDraggableButtonLogicButton

int CUi::m_ActiveDraggableButtonLogicButton = -1
private

◆ m_ActiveItemValid

bool CUi::m_ActiveItemValid = false
private

◆ m_ActiveScrollbarOffset

float CUi::m_ActiveScrollbarOffset = 0.0f
private

◆ m_ActiveValueSelectorState

CValueSelectorState CUi::m_ActiveValueSelectorState
private

◆ m_DoubleClickState

CDoubleClickState CUi::m_DoubleClickState
private

◆ m_Enabled

bool CUi::m_Enabled
private

◆ m_HotkeysPressed

unsigned CUi::m_HotkeysPressed = 0
private

◆ m_LastMouseButtons

unsigned CUi::m_LastMouseButtons = 0
private

◆ m_MouseButtons

unsigned CUi::m_MouseButtons = 0
private

◆ m_MouseDelta

vec2 CUi::m_MouseDelta = vec2(0.0f, 0.0f)
private

◆ m_MouseLock

bool CUi::m_MouseLock = false
private

◆ m_MousePos

vec2 CUi::m_MousePos = vec2(0.0f, 0.0f)
private

◆ m_MouseSlow

bool CUi::m_MouseSlow = false
private

◆ m_MouseWorldPos

vec2 CUi::m_MouseWorldPos = vec2(-1.0f, -1.0f)
private

◆ m_pActiveItem

const void* CUi::m_pActiveItem = nullptr
private

◆ m_pBecomingHotItem

const void* CUi::m_pBecomingHotItem = nullptr
private

◆ m_pBecomingHotScrollRegion

CScrollRegion* CUi::m_pBecomingHotScrollRegion = nullptr
private

◆ m_pClient

IClient* CUi::m_pClient
private

◆ m_pfnPopupMenuClosedCallback

FPopupMenuClosedCallback CUi::m_pfnPopupMenuClosedCallback = nullptr
private

◆ m_pGraphics

IGraphics* CUi::m_pGraphics
private

◆ m_pHotItem

const void* CUi::m_pHotItem = nullptr
private

◆ m_pHotScrollRegion

CScrollRegion* CUi::m_pHotScrollRegion = nullptr
private

◆ m_pInput

IInput* CUi::m_pInput
private

◆ m_pLastActiveItem

const void* CUi::m_pLastActiveItem = nullptr
private

◆ m_pLastEditingItem

const void* CUi::m_pLastEditingItem = nullptr
private

◆ m_pMouseLockId

const void* CUi::m_pMouseLockId = nullptr
private

◆ m_ProgressSpinnerOffset

float CUi::m_ProgressSpinnerOffset = 0.0f
private

◆ m_pTextRender

ITextRender* CUi::m_pTextRender
private

◆ m_Screen

CUIRect CUi::m_Screen
private

◆ m_TouchState

CTouchState CUi::m_TouchState
private

◆ m_UpdatedMouseButtons

unsigned CUi::m_UpdatedMouseButtons = 0
private

◆ m_UpdatedMouseDelta

vec2 CUi::m_UpdatedMouseDelta = vec2(0.0f, 0.0f)
private

◆ m_UpdatedMousePos

vec2 CUi::m_UpdatedMousePos = vec2(0.0f, 0.0f)
private

◆ m_vClips

std::vector<CUIRect> CUi::m_vClips
private

◆ m_vPopupMenus

std::vector<SPopupMenu> CUi::m_vPopupMenus
private

◆ m_vpOwnUIElements

std::vector<CUIElement *> CUi::m_vpOwnUIElements
private

◆ m_vpUIElements

std::vector<CUIElement *> CUi::m_vpUIElements
private

◆ ms_DarkButtonColorFunction

const CDarkButtonColorFunction CUi::ms_DarkButtonColorFunction
static

◆ ms_FontmodHeight

const float CUi::ms_FontmodHeight = 0.8f
static

◆ ms_LightButtonColorFunction

const CLightButtonColorFunction CUi::ms_LightButtonColorFunction
static

◆ ms_LinearScrollbarScale

const CLinearScrollbarScale CUi::ms_LinearScrollbarScale
static

◆ ms_LogarithmicScrollbarScale

const CLogarithmicScrollbarScale CUi::ms_LogarithmicScrollbarScale
static

◆ ms_ScrollBarColorFunction

const CScrollBarColorFunction CUi::ms_ScrollBarColorFunction
static

The documentation for this class was generated from the following files: