mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-11-26 12:37:06 +08:00
Dirty wrap around implementation
This commit is contained in:
parent
68ba5cf744
commit
2b5701214a
@ -42,13 +42,18 @@ class Text : public Node {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
screen.PixelAt(x, y).character = cell;
|
screen.PixelAt(x, y).character = cell;
|
||||||
|
|
||||||
if(screen.PixelAt(x, y).selectable == true)
|
if(screen.PixelAt(x, y).selectable == true)
|
||||||
{
|
{
|
||||||
if(screen.selection_region.Contain(x, y)) {
|
if(screen.selection_region.Contain(x, y)) {
|
||||||
screen.PixelAt(x, y).inverted ^= true;
|
screen.PixelAt(x, y).inverted ^= true;
|
||||||
screen.selection_text += screen.PixelAt(x, y).character;
|
screen.selection_text += screen.PixelAt(x, y).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)
|
||||||
|
{
|
||||||
|
screen.PixelAt(x, y).inverted ^= true;
|
||||||
|
screen.selection_text += screen.PixelAt(x, y).character;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
++x;
|
++x;
|
||||||
|
Loading…
Reference in New Issue
Block a user