Implementation of the selection in the text node

This commit is contained in:
Clement Roblot
2024-10-31 21:05:39 +07:00
committed by ArthurSonzogni
parent 011b9a1426
commit 23a8c94bef
2 changed files with 12 additions and 21 deletions

View File

@@ -42,6 +42,15 @@ 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;
}
}
++x;
}
}