Dirty wrap around implementation

This commit is contained in:
Clement Roblot 2024-10-31 21:09:59 +07:00 committed by ArthurSonzogni
parent 23a8c94bef
commit 195871e62b
No known key found for this signature in database
GPG Key ID: 41D98248C074CD6C

View File

@ -42,13 +42,18 @@ class Text : public Node {
continue;
}
screen.PixelAt(x, y).character = cell;
if(screen.PixelAt(x, y).selectable == true)
{
if(screen.selection_region.Contain(x, y)) {
screen.PixelAt(x, y).inverted ^= true;
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;