Update to latest ZWidget
This commit is contained in:
parent
640a2b2c41
commit
92b08a5c18
78 changed files with 7123 additions and 1261 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "widgets/scrollbar/scrollbar.h"
|
||||
#include "core/utf8reader.h"
|
||||
#include "core/colorf.h"
|
||||
#include <algorithm>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4267) // warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
|
||||
|
|
@ -290,7 +291,7 @@ bool TextEdit::OnMouseDown(const Point& pos, InputKey key)
|
|||
{
|
||||
if (key == InputKey::LeftMouse)
|
||||
{
|
||||
CaptureMouse();
|
||||
SetPointerCapture();
|
||||
mouse_selecting = true;
|
||||
cursor_pos = GetCharacterIndex(pos);
|
||||
selection_start = cursor_pos;
|
||||
|
|
@ -312,14 +313,14 @@ bool TextEdit::OnMouseUp(const Point& pos, InputKey key)
|
|||
{
|
||||
if (ignore_mouse_events) // This prevents text selection from changing from what was set when focus was gained.
|
||||
{
|
||||
ReleaseMouseCapture();
|
||||
ReleasePointerCapture();
|
||||
ignore_mouse_events = false;
|
||||
mouse_selecting = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
scroll_timer->Stop();
|
||||
ReleaseMouseCapture();
|
||||
ReleasePointerCapture();
|
||||
mouse_selecting = false;
|
||||
ivec2 sel_end = GetCharacterIndex(pos);
|
||||
selection_length = ToOffset(sel_end) - ToOffset(selection_start);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue