mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-06-29 20:01:12 +08:00
More intuitive selection of text
This commit is contained in:
parent
c9fbd8de9d
commit
92586f76bc
@ -50,14 +50,14 @@ class Text : public Node {
|
||||
currentPixel.inverted ^= true;
|
||||
screen.selection_text += currentPixel.character;
|
||||
}
|
||||
else if(screen.selection_region.x_min <= x && screen.selection_region.x_max <= x &&
|
||||
screen.selection_region.y_min <= y && screen.selection_region.y_max > y)
|
||||
else if((x >= screen.selection_region.x_min) && (x >= screen.selection_region.x_max) &&
|
||||
(y >= screen.selection_region.y_min) && (y < screen.selection_region.y_max))
|
||||
{
|
||||
currentPixel.inverted ^= true;
|
||||
screen.selection_text += currentPixel.character;
|
||||
}
|
||||
else if(screen.selection_region.x_min >= x && screen.selection_region.x_max >= x &&
|
||||
screen.selection_region.y_min < y && screen.selection_region.y_max >= y)
|
||||
else if((x <= screen.selection_region.x_min) && (x <= screen.selection_region.x_max) &&
|
||||
(y > screen.selection_region.y_min) && (y <= screen.selection_region.y_max))
|
||||
{
|
||||
currentPixel.inverted ^= true;
|
||||
screen.selection_text += currentPixel.character;
|
||||
|
Loading…
Reference in New Issue
Block a user