Widgets/TextAreaWidgets: Keep selections active (and visible) when losing focus
This commit is contained in:
@@ -86,11 +86,13 @@ namespace Nz
|
||||
NazaraSignal(OnTextAreaSelection, const AbstractTextAreaWidget* /*textArea*/, Vector2ui* /*start*/, Vector2ui* /*end*/);
|
||||
|
||||
protected:
|
||||
virtual AbstractTextDrawer& GetTextDrawer() = 0;
|
||||
virtual const AbstractTextDrawer& GetTextDrawer() const = 0;
|
||||
Color GetCursorColor() const;
|
||||
|
||||
virtual void CopySelectionToClipboard(const Vector2ui& selectionBegin, const Vector2ui& selectionEnd) = 0;
|
||||
|
||||
virtual AbstractTextDrawer& GetTextDrawer() = 0;
|
||||
virtual const AbstractTextDrawer& GetTextDrawer() const = 0;
|
||||
|
||||
virtual void HandleIndentation(bool add) = 0;
|
||||
virtual void HandleSelectionIndentation(bool add) = 0;
|
||||
virtual void HandleWordCursorMove(bool left) = 0;
|
||||
@@ -113,7 +115,8 @@ namespace Nz
|
||||
|
||||
virtual void PasteFromClipboard(const Vector2ui& targetPosition) = 0;
|
||||
|
||||
void RefreshCursor();
|
||||
void RefreshCursorColor();
|
||||
void RefreshCursorSize();
|
||||
|
||||
inline void SetCursorPositionInternal(std::size_t glyphIndex);
|
||||
inline void SetCursorPositionInternal(Vector2ui cursorPosition);
|
||||
|
||||
@@ -226,7 +226,8 @@ namespace Nz
|
||||
m_cursorPositionBegin = NormalizeCursorPosition(fromPosition);
|
||||
m_cursorPositionEnd = NormalizeCursorPosition(toPosition);
|
||||
|
||||
RefreshCursor();
|
||||
RefreshCursorColor();
|
||||
RefreshCursorSize();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -250,7 +251,8 @@ namespace Nz
|
||||
m_cursorPositionBegin = cursorPosition;
|
||||
m_cursorPositionEnd = m_cursorPositionBegin;
|
||||
|
||||
RefreshCursor();
|
||||
RefreshCursorColor();
|
||||
RefreshCursorSize();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user