mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-09-16 08:04:21 +08:00
We can select in every directions
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user