U3D
Open-source, cross-platform 2D and 3D game engine built in C++
Loading...
Searching...
No Matches
Urho3D::UI Class Reference

UI subsystem. Manages the graphical user interface. More...

#include </var/dev/u3d/stable/Source/Urho3D/UI/UI.h>

Inheritance diagram for Urho3D::UI:
[legend]
Collaboration diagram for Urho3D::UI:
[legend]

Classes

struct  DragData
 Data structure used to represent the drag data associated to a UIElement. More...
 
struct  RenderToTextureData
 Data structured used to hold data of UI elements that are rendered to texture. More...
 

Public Member Functions

 UI (Context *context)
 Construct.
 
 ~UI () override
 Destruct.
 
void SetCursor (Cursor *cursor)
 
void SetFocusElement (UIElement *element, bool byKey=false)
 Set focused UI element.
 
bool SetModalElement (UIElement *modalElement, bool enable)
 
void Clear ()
 Clear the UI (excluding the cursor).
 
void Update (float timeStep)
 Update the UI logic. Called by HandlePostUpdate().
 
void RenderUpdate ()
 Update the UI for rendering. Called by HandleRenderUpdate().
 
void Render (bool renderUICommand=false)
 Render the UI. If renderUICommand is false (default), is assumed to be the default UI render to backbuffer called by Engine, and will be performed only once. Additional UI renders to a different rendertarget may be triggered from the renderpath.
 
void DebugDraw (UIElement *element)
 Debug draw a UI element.
 
SharedPtr< UIElementLoadLayout (Deserializer &source, XMLFile *styleFile=nullptr)
 Load a UI layout from an XML file. Optionally specify another XML file for element style. Return the root element.
 
SharedPtr< UIElementLoadLayout (XMLFile *file, XMLFile *styleFile=nullptr)
 Load a UI layout from an XML file. Optionally specify another XML file for element style. Return the root element.
 
bool SaveLayout (Serializer &dest, UIElement *element)
 Save a UI layout to an XML file. Return true if successful.
 
void SetClipboardText (const String &text)
 
void SetDoubleClickInterval (float interval)
 
void SetMaxDoubleClickDistance (float distPixels)
 
void SetDragBeginInterval (float interval)
 
void SetDragBeginDistance (int pixels)
 
void SetDefaultToolTipDelay (float delay)
 
void SetMaxFontTextureSize (int size)
 
void SetNonFocusedMouseWheel (bool nonFocusedMouseWheel)
 
void SetUseSystemClipboard (bool enable)
 
void SetUseScreenKeyboard (bool enable)
 
void SetUseMutableGlyphs (bool enable)
 
void SetForceAutoHint (bool enable)
 
void SetFontHintLevel (FontHintLevel level)
 
void SetFontSubpixelThreshold (float threshold)
 
void SetFontOversampling (int oversampling)
 
void SetScale (float scale)
 
void SetWidth (float width)
 Scale UI to the specified width in pixels.
 
void SetHeight (float height)
 Scale UI to the specified height in pixels.
 
void SetCustomSize (const IntVector2 &size)
 
void SetCustomSize (int width, int height)
 Set custom size of the root element.
 
UIElementGetRoot () const
 
UIElementGetRootModalElement () const
 
CursorGetCursor () const
 
IntVector2 GetCursorPosition () const
 
UIElementGetElementAt (const IntVector2 &position, bool enabledOnly=true)
 Return UI element at global screen coordinates. By default returns only input-enabled elements.
 
UIElementGetElementAt (int x, int y, bool enabledOnly=true)
 Return UI element at global screen coordinates. By default returns only input-enabled elements.
 
UIElementGetElementAt (UIElement *root, const IntVector2 &position, bool enabledOnly=true)
 Get a child element at element's screen position relative to specified root element.
 
IntVector2 ConvertSystemToUI (const IntVector2 &systemPos) const
 Convert system mouse position (or offset) to scaled UI position (or offset).
 
IntVector2 ConvertUIToSystem (const IntVector2 &uiPos) const
 Convert scaled UI position (or offset) to system mouse position (or offset).
 
UIElementGetFocusElement () const
 
UIElementGetFrontElement () const
 
const Vector< UIElement * > GetDragElements ()
 Return currently dragged elements.
 
unsigned GetNumDragElements () const
 Return the number of currently dragged elements.
 
UIElementGetDragElement (unsigned index)
 Return the drag element at index.
 
const StringGetClipboardText () const
 
float GetDoubleClickInterval () const
 
float GetMaxDoubleClickDistance () const
 
float GetDragBeginInterval () const
 
int GetDragBeginDistance () const
 
float GetDefaultToolTipDelay () const
 
int GetMaxFontTextureSize () const
 
bool IsNonFocusedMouseWheel () const
 
bool GetUseSystemClipboard () const
 
bool GetUseScreenKeyboard () const
 
bool GetUseMutableGlyphs () const
 
bool GetForceAutoHint () const
 
FontHintLevel GetFontHintLevel () const
 
float GetFontSubpixelThreshold () const
 
int GetFontOversampling () const
 
bool HasModalElement () const
 Return true when UI has modal element(s).
 
bool IsDragging () const
 Return whether a drag is in progress.
 
float GetScale () const
 
const IntVector2GetCustomSize () const
 
void SetElementRenderTexture (UIElement *element, Texture2D *texture)
 Set texture to which element will be rendered.
 
- Public Member Functions inherited from Urho3D::Object
 Object (Context *context)
 Construct.
 
 ~Object () override
 Destruct. Clean up self from event sender & receiver structures.
 
virtual StringHash GetType () const =0
 
virtual const StringGetTypeName () const =0
 
virtual const TypeInfoGetTypeInfo () const =0
 Return type info.
 
virtual void OnEvent (Object *sender, StringHash eventType, VariantMap &eventData)
 Handle event.
 
bool IsInstanceOf (StringHash type) const
 Check current instance is type of specified type.
 
bool IsInstanceOf (const TypeInfo *typeInfo) const
 Check current instance is type of specified type.
 
template<typename T >
bool IsInstanceOf () const
 Check current instance is type of specified class.
 
template<typename T >
T * Cast ()
 Cast the object to specified most derived class.
 
template<typename T >
const T * Cast () const
 Cast the object to specified most derived class.
 
void SubscribeToEvent (StringHash eventType, EventHandler *handler)
 Subscribe to an event that can be sent by any sender.
 
void SubscribeToEvent (Object *sender, StringHash eventType, EventHandler *handler)
 Subscribe to a specific sender's event.
 
void SubscribeToEvent (StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr)
 Subscribe to an event that can be sent by any sender.
 
void SubscribeToEvent (Object *sender, StringHash eventType, const std::function< void(StringHash, VariantMap &)> &function, void *userData=nullptr)
 Subscribe to a specific sender's event.
 
void UnsubscribeFromEvent (StringHash eventType)
 Unsubscribe from an event.
 
void UnsubscribeFromEvent (Object *sender, StringHash eventType)
 Unsubscribe from a specific sender's event.
 
void UnsubscribeFromEvents (Object *sender)
 Unsubscribe from a specific sender's events.
 
void UnsubscribeFromAllEvents ()
 Unsubscribe from all events.
 
void UnsubscribeFromAllEventsExcept (const PODVector< StringHash > &exceptions, bool onlyUserData)
 Unsubscribe from all events except those listed, and optionally only those with userdata (script registered events).
 
void SendEvent (StringHash eventType)
 Send event to all subscribers.
 
void SendEvent (StringHash eventType, VariantMap &eventData)
 Send event with parameters to all subscribers.
 
VariantMapGetEventDataMap () const
 Return a preallocated map for event data. Used for optimization to avoid constant re-allocation of event data maps.
 
template<typename... Args>
void SendEvent (StringHash eventType, Args... args)
 Send event with variadic parameter pairs to all subscribers. The parameter pairs is a list of paramID and paramValue separated by comma, one pair after another.
 
ContextGetContext () const
 Return execution context.
 
const VariantGetGlobalVar (StringHash key) const
 
const VariantMapGetGlobalVars () const
 
void SetGlobalVar (StringHash key, const Variant &value)
 
ObjectGetSubsystem (StringHash type) const
 Return subsystem by type.
 
ObjectGetEventSender () const
 Return active event sender. Null outside event handling.
 
EventHandlerGetEventHandler () const
 Return active event handler. Null outside event handling.
 
bool HasSubscribedToEvent (StringHash eventType) const
 Return whether has subscribed to an event without specific sender.
 
bool HasSubscribedToEvent (Object *sender, StringHash eventType) const
 Return whether has subscribed to a specific sender's event.
 
bool HasEventHandlers () const
 Return whether has subscribed to any event.
 
template<class T >
T * GetSubsystem () const
 Template version of returning a subsystem.
 
const StringGetCategory () const
 
void SetBlockEvents (bool block)
 Block object from sending and receiving events.
 
bool GetBlockEvents () const
 Return sending and receiving events blocking status.
 
- Public Member Functions inherited from Urho3D::RefCounted
 RefCounted ()
 Construct. Allocate the reference count structure and set an initial self weak reference.
 
virtual ~RefCounted ()
 Destruct. Mark as expired and also delete the reference count structure if no outside weak references exist.
 
 RefCounted (const RefCounted &rhs)=delete
 Prevent copy construction.
 
RefCountedoperator= (const RefCounted &rhs)=delete
 Prevent assignment.
 
void AddRef ()
 
void ReleaseRef ()
 
int Refs () const
 
int WeakRefs () const
 
RefCountRefCountPtr ()
 Return pointer to the reference count structure.
 

Private Member Functions

 URHO3D_OBJECT (UI, Object)
 
void Initialize ()
 Initialize when screen mode initially set.
 
void Update (float timeStep, UIElement *element)
 Update UI element logic recursively.
 
void SetVertexData (VertexBuffer *dest, const PODVector< float > &vertexData)
 Upload UI geometry into a vertex buffer.
 
void Render (VertexBuffer *buffer, const PODVector< UIBatch > &batches, unsigned batchStart, unsigned batchEnd)
 Render UI batches to the current rendertarget. Geometry must have been uploaded first.
 
void GetBatches (PODVector< UIBatch > &batches, PODVector< float > &vertexData, UIElement *element, IntRect currentScissor)
 Generate batches from an UI element recursively. Skip the cursor element.
 
UIElementGetElementAt (const IntVector2 &position, bool enabledOnly, IntVector2 *elementScreenPosition)
 Return UI element at global screen coordinates. Return position converted to element's screen coordinates.
 
void GetElementAt (UIElement *&result, UIElement *current, const IntVector2 &position, bool enabledOnly)
 Return UI element at screen position recursively.
 
UIElementGetFocusableElement (UIElement *element)
 Return the first element in hierarchy that can alter focus.
 
void GetCursorPositionAndVisible (IntVector2 &pos, bool &visible)
 Return cursor position and visibility either from the cursor element, or the Input subsystem.
 
void SetCursorShape (CursorShape shape)
 Set active cursor's shape.
 
void ReleaseFontFaces ()
 Force release of font faces when global font properties change.
 
void ProcessHover (const IntVector2 &windowCursorPos, MouseButtonFlags buttons, QualifierFlags qualifiers, Cursor *cursor)
 Handle button or touch hover.
 
void ProcessClickBegin (const IntVector2 &windowCursorPos, MouseButton button, MouseButtonFlags buttons, QualifierFlags qualifiers, Cursor *cursor, bool cursorVisible)
 Handle button or touch begin.
 
void ProcessClickEnd (const IntVector2 &windowCursorPos, MouseButton button, MouseButtonFlags buttons, QualifierFlags qualifiers, Cursor *cursor, bool cursorVisible)
 Handle button or touch end.
 
void ProcessMove (const IntVector2 &windowCursorPos, const IntVector2 &cursorDeltaPos, MouseButtonFlags buttons, QualifierFlags qualifiers, Cursor *cursor, bool cursorVisible)
 Handle mouse or touch move.
 
void SendDragOrHoverEvent (StringHash eventType, UIElement *element, const IntVector2 &screenPos, const IntVector2 &deltaPos, UI::DragData *dragData)
 Send a UI element drag or hover begin event.
 
void SendClickEvent (StringHash eventType, UIElement *beginElement, UIElement *endElement, const IntVector2 &pos, MouseButton button, MouseButtonFlags buttons, QualifierFlags qualifiers)
 Send a UI click event.
 
void SendDoubleClickEvent (UIElement *beginElement, UIElement *endElement, const IntVector2 &firstPos, const IntVector2 &secondPos, MouseButton button, MouseButtonFlags buttons, QualifierFlags qualifiers)
 Send a UI double click event.
 
void HandleScreenMode (StringHash eventType, VariantMap &eventData)
 Handle screen mode event.
 
void HandleMouseButtonDown (StringHash eventType, VariantMap &eventData)
 Handle mouse button down event.
 
void HandleMouseButtonUp (StringHash eventType, VariantMap &eventData)
 Handle mouse button up event.
 
void HandleMouseMove (StringHash eventType, VariantMap &eventData)
 Handle mouse move event.
 
void HandleMouseWheel (StringHash eventType, VariantMap &eventData)
 Handle mouse wheel event.
 
void HandleTouchBegin (StringHash eventType, VariantMap &eventData)
 Handle touch begin event.
 
void HandleTouchEnd (StringHash eventType, VariantMap &eventData)
 Handle touch end event.
 
void HandleTouchMove (StringHash eventType, VariantMap &eventData)
 Handle touch move event.
 
void HandleKeyDown (StringHash eventType, VariantMap &eventData)
 Handle keypress event.
 
void HandleTextInput (StringHash eventType, VariantMap &eventData)
 Handle text input event.
 
void HandleBeginFrame (StringHash eventType, VariantMap &eventData)
 Handle frame begin event.
 
void HandlePostUpdate (StringHash eventType, VariantMap &eventData)
 Handle logic post-update event.
 
void HandleRenderUpdate (StringHash eventType, VariantMap &eventData)
 Handle render update event.
 
void HandleDropFile (StringHash eventType, VariantMap &eventData)
 Handle a file being drag-dropped into the application window.
 
HashMap< WeakPtr< UIElement >, DragData * >::Iterator DragElementErase (HashMap< WeakPtr< UIElement >, DragData * >::Iterator i)
 Remove drag data and return next iterator.
 
void ProcessDragCancel ()
 Handle clean up on a drag cancel.
 
IntVector2 SumTouchPositions (UI::DragData *dragData, const IntVector2 &oldSendPos)
 Sum touch positions and return the begin position ready to send.
 
void ResizeRootElement ()
 Resize root element to effective size.
 
IntVector2 GetEffectiveRootElementSize (bool applyScale=true) const
 Return effective size of the root element, according to UI scale and resolution / custom size.
 

Private Attributes

WeakPtr< Graphicsgraphics_
 Graphics subsystem.
 
SharedPtr< UIElementrootElement_
 UI root element.
 
SharedPtr< UIElementrootModalElement_
 UI root modal element.
 
SharedPtr< Cursorcursor_
 Cursor.
 
WeakPtr< UIElementfocusElement_
 Currently focused element.
 
PODVector< UIBatchbatches_
 UI rendering batches.
 
PODVector< float > vertexData_
 UI rendering vertex data.
 
PODVector< UIBatchdebugDrawBatches_
 UI rendering batches for debug draw.
 
PODVector< float > debugVertexData_
 UI rendering vertex data for debug draw.
 
SharedPtr< VertexBuffervertexBuffer_
 UI vertex buffer.
 
SharedPtr< VertexBufferdebugVertexBuffer_
 UI debug geometry vertex buffer.
 
PODVector< UIElement * > tempElements_
 UI element query vector.
 
String clipBoard_
 Clipboard text.
 
float doubleClickInterval_
 Seconds between clicks to register a double click.
 
float dragBeginInterval_
 Seconds from mouse button down to begin a drag if there has been no movement exceeding pixel threshold.
 
float defaultToolTipDelay_
 Tooltip default display delay in seconds.
 
int dragBeginDistance_
 Drag begin event distance threshold in pixels.
 
MouseButtonFlags mouseButtons_
 Mouse buttons held down.
 
MouseButtonFlags lastMouseButtons_
 Last mouse button pressed.
 
QualifierFlags qualifiers_
 Qualifier keys held down.
 
int maxFontTextureSize_
 Font texture maximum size.
 
bool initialized_
 Initialized flag.
 
bool usingTouchInput_
 Touch used flag.
 
bool nonFocusedMouseWheel_
 Flag to switch mouse wheel event to be sent to non-focused element at cursor.
 
bool useSystemClipboard_
 Flag for using operating system clipboard instead of internal.
 
bool useScreenKeyboard_
 Flag for showing the on-screen keyboard on focusing a LineEdit.
 
bool useMutableGlyphs_
 Flag for using mutable (erasable) font glyphs.
 
bool forceAutoHint_
 Flag for forcing FreeType auto hinting.
 
FontHintLevel fontHintLevel_
 FreeType hinting level (default is FONT_HINT_LEVEL_NORMAL).
 
float fontSubpixelThreshold_
 Maxmimum font size for subpixel glyph positioning and oversampling (default is 12).
 
int fontOversampling_
 Horizontal oversampling for subpixel fonts (default is 2).
 
bool uiRendered_
 Flag for UI already being rendered this frame.
 
unsigned nonModalBatchSize_
 Non-modal batch size (used internally for rendering).
 
Timer clickTimer_
 Timer used to trigger double click.
 
WeakPtr< UIElementdoubleClickElement_
 UI element last clicked for tracking double clicks.
 
IntVector2 doubleClickFirstPos_
 Screen position of first mouse click for double click distance checking.
 
float maxDoubleClickDist_
 Max screen distance the first click in a double click can be from the second click in a double click.
 
HashMap< WeakPtr< UIElement >, bool > hoveredElements_
 Currently hovered elements.
 
HashMap< WeakPtr< UIElement >, DragData * > dragElements_
 Currently dragged elements.
 
int dragElementsCount_
 Number of elements in dragElements_.
 
int dragConfirmedCount_
 Number of elements in dragElements_ with dragPending = false.
 
HashMap< WeakPtr< UIElement >, MouseButtonFlags > touchDragElements_
 UI elements that are being touched with touch input.
 
Vector< UIElement * > dragElementsConfirmed_
 Confirmed drag elements cache.
 
float uiScale_
 Current scale of UI.
 
IntVector2 customSize_
 Root element custom size. 0,0 for automatic resizing (default).
 
HashMap< UIElement *, RenderToTextureDatarenderToTexture_
 Elements that should be rendered to textures.
 

Additional Inherited Members

- Static Public Member Functions inherited from Urho3D::Object
static const TypeInfoGetTypeInfoStatic ()
 Return type info static.
 
- Protected Attributes inherited from Urho3D::Object
Contextcontext_
 Execution context.
 

Detailed Description

UI subsystem. Manages the graphical user interface.

Member Function Documentation

◆ GetClipboardText()

const String & Urho3D::UI::GetClipboardText ( ) const

Return clipboard text.

◆ GetCursor()

Cursor * Urho3D::UI::GetCursor ( ) const
inline

Return cursor.

◆ GetCursorPosition()

IntVector2 Urho3D::UI::GetCursorPosition ( ) const

Return cursor position.

Here is the call graph for this function:

◆ GetCustomSize()

const IntVector2 & Urho3D::UI::GetCustomSize ( ) const
inline

Return root element custom size. Returns 0,0 when custom size is not being used and automatic resizing according to window size is in use instead (default).

◆ GetDefaultToolTipDelay()

float Urho3D::UI::GetDefaultToolTipDelay ( ) const
inline

Return tooltip default display delay in seconds.

◆ GetDoubleClickInterval()

float Urho3D::UI::GetDoubleClickInterval ( ) const
inline

Return UI element double click interval in seconds.

◆ GetDragBeginDistance()

int Urho3D::UI::GetDragBeginDistance ( ) const
inline

Return UI drag start event distance threshold in pixels.

◆ GetDragBeginInterval()

float Urho3D::UI::GetDragBeginInterval ( ) const
inline

Return UI drag start event interval in seconds.

◆ GetFocusElement()

UIElement * Urho3D::UI::GetFocusElement ( ) const
inline

Return focused element.

◆ GetFontHintLevel()

FontHintLevel Urho3D::UI::GetFontHintLevel ( ) const
inline

Return the current FreeType font hinting level.

◆ GetFontOversampling()

int Urho3D::UI::GetFontOversampling ( ) const
inline

Get the oversampling (horizonal stretching) used to improve subpixel font rendering. Only affects fonts smaller than the subpixel limit.

◆ GetFontSubpixelThreshold()

float Urho3D::UI::GetFontSubpixelThreshold ( ) const
inline

Get the font subpixel threshold. Below this size, if the hint level is LIGHT or NONE, fonts will use subpixel positioning plus oversampling for higher-quality rendering. Has no effect at hint level NORMAL.

◆ GetForceAutoHint()

bool Urho3D::UI::GetForceAutoHint ( ) const
inline

Return whether is using forced autohinting.

◆ GetFrontElement()

UIElement * Urho3D::UI::GetFrontElement ( ) const

Return topmost enabled root-level non-modal element.

Here is the call graph for this function:

◆ GetMaxDoubleClickDistance()

float Urho3D::UI::GetMaxDoubleClickDistance ( ) const
inline

Return max screen distance in pixels for double clicks to register.

◆ GetMaxFontTextureSize()

int Urho3D::UI::GetMaxFontTextureSize ( ) const
inline

Return font texture maximum size.

Here is the caller graph for this function:

◆ GetRoot()

UIElement * Urho3D::UI::GetRoot ( ) const
inline

Return root UI element.

◆ GetRootModalElement()

UIElement * Urho3D::UI::GetRootModalElement ( ) const
inline

Return root modal element.

◆ GetScale()

float Urho3D::UI::GetScale ( ) const
inline

Return current UI scale.

Here is the caller graph for this function:

◆ GetUseMutableGlyphs()

bool Urho3D::UI::GetUseMutableGlyphs ( ) const
inline

Return whether is using mutable (eraseable) glyphs for fonts.

◆ GetUseScreenKeyboard()

bool Urho3D::UI::GetUseScreenKeyboard ( ) const
inline

Return whether focusing a LineEdit will show the on-screen keyboard.

◆ GetUseSystemClipboard()

bool Urho3D::UI::GetUseSystemClipboard ( ) const
inline

Return whether is using the system clipboard.

◆ IsNonFocusedMouseWheel()

bool Urho3D::UI::IsNonFocusedMouseWheel ( ) const
inline

Return whether mouse wheel can control also a non-focused element.

◆ SetClipboardText()

void Urho3D::UI::SetClipboardText ( const String text)

Set clipboard text.

Here is the call graph for this function:

◆ SetCursor()

void Urho3D::UI::SetCursor ( Cursor cursor)

Set cursor UI element.

Here is the call graph for this function:

◆ SetCustomSize()

void Urho3D::UI::SetCustomSize ( const IntVector2 size)

Set custom size of the root element. This disables automatic resizing of the root element according to window size. Set custom size 0,0 to return to automatic resizing.

Here is the call graph for this function:

◆ SetDefaultToolTipDelay()

void Urho3D::UI::SetDefaultToolTipDelay ( float  delay)

Set tooltip default display delay in seconds.

Here is the call graph for this function:

◆ SetDoubleClickInterval()

void Urho3D::UI::SetDoubleClickInterval ( float  interval)

Set UI element double click interval in seconds.

Here is the call graph for this function:

◆ SetDragBeginDistance()

void Urho3D::UI::SetDragBeginDistance ( int  pixels)

Set UI drag event start distance threshold in pixels.

Here is the call graph for this function:

◆ SetDragBeginInterval()

void Urho3D::UI::SetDragBeginInterval ( float  interval)

Set UI drag event start interval in seconds.

Here is the call graph for this function:

◆ SetFontHintLevel()

void Urho3D::UI::SetFontHintLevel ( FontHintLevel  level)

Set the hinting level used by FreeType fonts.

Here is the call graph for this function:

◆ SetFontOversampling()

void Urho3D::UI::SetFontOversampling ( int  oversampling)

Set the oversampling (horizonal stretching) used to improve subpixel font rendering. Only affects fonts smaller than the subpixel limit.

Here is the call graph for this function:

◆ SetFontSubpixelThreshold()

void Urho3D::UI::SetFontSubpixelThreshold ( float  threshold)

Set the font subpixel threshold. Below this size, if the hint level is LIGHT or NONE, fonts will use subpixel positioning plus oversampling for higher-quality rendering. Has no effect at hint level NORMAL.

Here is the call graph for this function:

◆ SetForceAutoHint()

void Urho3D::UI::SetForceAutoHint ( bool  enable)

Set whether to force font autohinting instead of using FreeType's TTF bytecode interpreter.

Here is the call graph for this function:

◆ SetMaxDoubleClickDistance()

void Urho3D::UI::SetMaxDoubleClickDistance ( float  distPixels)

Set max screen distance in pixels between double click clicks.

◆ SetMaxFontTextureSize()

void Urho3D::UI::SetMaxFontTextureSize ( int  size)

Set maximum font face texture size. Must be a power of two. Default is 2048.

Here is the call graph for this function:

◆ SetModalElement()

bool Urho3D::UI::SetModalElement ( UIElement modalElement,
bool  enable 
)

Set modal element. Until all the modal elements are dismissed, all the inputs and events are only sent to them. Return true when successful. Only the modal element can clear its modal status or when it is being destructed.

Here is the call graph for this function:

◆ SetNonFocusedMouseWheel()

void Urho3D::UI::SetNonFocusedMouseWheel ( bool  nonFocusedMouseWheel)

Set whether mouse wheel can control also a non-focused element.

◆ SetScale()

void Urho3D::UI::SetScale ( float  scale)

Set UI scale. 1.0 is default (pixel perfect). Resize the root element to match.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetUseMutableGlyphs()

void Urho3D::UI::SetUseMutableGlyphs ( bool  enable)

Set whether to use mutable (eraseable) glyphs to ensure a font face never expands to more than one texture. Default false.

Here is the call graph for this function:

◆ SetUseScreenKeyboard()

void Urho3D::UI::SetUseScreenKeyboard ( bool  enable)

Set whether to show the on-screen keyboard (if supported) when a LineEdit is focused. Default true on mobile devices.

◆ SetUseSystemClipboard()

void Urho3D::UI::SetUseSystemClipboard ( bool  enable)

Set whether to use system clipboard. Default false.


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