|
@@ -92,7 +92,7 @@ public:
|
|
|
void SetClipboardText(const String& text);
|
|
void SetClipboardText(const String& text);
|
|
|
/// Set UI element double click interval in seconds.
|
|
/// Set UI element double click interval in seconds.
|
|
|
void SetDoubleClickInterval(float interval);
|
|
void SetDoubleClickInterval(float interval);
|
|
|
- /// Set max screen distance in pixels for double clicks to register. default is FLT_MAX.
|
|
|
|
|
|
|
+ /// Set max screen distance in pixels for double clicks to register. default is a very large distance as to have no effect.
|
|
|
void SetMaxDoubleClickDistance(float pixels);
|
|
void SetMaxDoubleClickDistance(float pixels);
|
|
|
/// Set UI drag event start interval in seconds.
|
|
/// Set UI drag event start interval in seconds.
|
|
|
void SetDragBeginInterval(float interval);
|
|
void SetDragBeginInterval(float interval);
|
|
@@ -165,11 +165,11 @@ public:
|
|
|
|
|
|
|
|
/// Return UI element double click interval in seconds.
|
|
/// Return UI element double click interval in seconds.
|
|
|
float GetDoubleClickInterval() const { return doubleClickInterval_; }
|
|
float GetDoubleClickInterval() const { return doubleClickInterval_; }
|
|
|
-
|
|
|
|
|
- /// Get max screen distance for double clicks to register. default is FLT_MAX.
|
|
|
|
|
|
|
+
|
|
|
|
|
+ /// Get max screen distance for double clicks to register. default is FLT_MAX.
|
|
|
float GetMaxDoubleClickDistance() const { return maxDoubleClickDist_;}
|
|
float GetMaxDoubleClickDistance() const { return maxDoubleClickDist_;}
|
|
|
|
|
|
|
|
- /// Return UI drag start event interval in seconds.
|
|
|
|
|
|
|
+ /// Return UI drag start event interval in seconds.
|
|
|
float GetDragBeginInterval() const { return dragBeginInterval_; }
|
|
float GetDragBeginInterval() const { return dragBeginInterval_; }
|
|
|
|
|
|
|
|
/// Return UI drag start event distance threshold in pixels.
|
|
/// Return UI drag start event distance threshold in pixels.
|
|
@@ -299,10 +299,10 @@ private:
|
|
|
(StringHash eventType, UIElement* beginElement, UIElement* endElement, const IntVector2& pos, int button, int buttons,
|
|
(StringHash eventType, UIElement* beginElement, UIElement* endElement, const IntVector2& pos, int button, int buttons,
|
|
|
int qualifiers);
|
|
int qualifiers);
|
|
|
|
|
|
|
|
- /// Send a UI double click event
|
|
|
|
|
- void SendDoubleClickEvent(StringHash eventType, UIElement* beginElement, UIElement* endElement, const IntVector2& firstPos, const IntVector2& secondPos, int button, int buttons, int qualifiers);
|
|
|
|
|
-
|
|
|
|
|
- /// Handle screen mode event.
|
|
|
|
|
|
|
+ /// Send a UI double click event
|
|
|
|
|
+ void SendDoubleClickEvent(StringHash eventType, UIElement* beginElement, UIElement* endElement, const IntVector2& firstPos, const IntVector2& secondPos, int button, int buttons, int qualifiers);
|
|
|
|
|
+
|
|
|
|
|
+ /// Handle screen mode event.
|
|
|
void HandleScreenMode(StringHash eventType, VariantMap& eventData);
|
|
void HandleScreenMode(StringHash eventType, VariantMap& eventData);
|
|
|
/// Handle mouse button down event.
|
|
/// Handle mouse button down event.
|
|
|
void HandleMouseButtonDown(StringHash eventType, VariantMap& eventData);
|
|
void HandleMouseButtonDown(StringHash eventType, VariantMap& eventData);
|
|
@@ -411,10 +411,10 @@ private:
|
|
|
Timer clickTimer_;
|
|
Timer clickTimer_;
|
|
|
/// UI element last clicked for tracking double clicks.
|
|
/// UI element last clicked for tracking double clicks.
|
|
|
WeakPtr<UIElement> doubleClickElement_;
|
|
WeakPtr<UIElement> doubleClickElement_;
|
|
|
- /// Screen position of first mouse click for double click distance checking.
|
|
|
|
|
- IntVector2 doubleClickFirstPos_;
|
|
|
|
|
- /// Max screen distance the first click in a double click can be from the second click in a double click.
|
|
|
|
|
- float maxDoubleClickDist_;
|
|
|
|
|
|
|
+ /// Screen position of first mouse click for double click distance checking.
|
|
|
|
|
+ IntVector2 doubleClickFirstPos_;
|
|
|
|
|
+ /// Max screen distance the first click in a double click can be from the second click in a double click.
|
|
|
|
|
+ float maxDoubleClickDist_;
|
|
|
/// Currently hovered elements.
|
|
/// Currently hovered elements.
|
|
|
HashMap<WeakPtr<UIElement>, bool> hoveredElements_;
|
|
HashMap<WeakPtr<UIElement>, bool> hoveredElements_;
|
|
|
/// Currently dragged elements.
|
|
/// Currently dragged elements.
|