We can select in every directions

This commit is contained in:
Clement Roblot
2024-08-02 22:28:56 +07:00
parent 70b32fe523
commit c1c6afc0ba
2 changed files with 6 additions and 5 deletions

View File

@@ -72,9 +72,10 @@ int main() {
});
// TODO: Make the textToCopy a callback called every times the selected text change
// TODO: Is there a way for me to embedd the catchEvent in the selected decorator?
// TODO: Implement the double click on word to select the word
// TODO: Implement the double click and drag to select word by word (optional)
// TODO: Is there a way for me to embedd the catchEvent in the selected decorator?
// TODO: Add a "selectable" flag in the pixel class and take it into account when selecting things
renderer |= CatchEvent([&](Event event) {
if (event.is_mouse()) {
@@ -85,7 +86,7 @@ int main() {
{
selection.startx = mouse.x;
selection.starty = mouse.y;
selection.endx = mouse.x-1;
selection.endx = mouse.x;
selection.endy = mouse.y;
}
else if (mouse.motion == Mouse::Released)
@@ -95,7 +96,7 @@ int main() {
}
else if (mouse.motion == Mouse::Moved)
{
selection.endx = mouse.x-1;
selection.endx = mouse.x;
selection.endy = mouse.y;
}