Added a option to set the style of the selection

This commit is contained in:
Clement Roblot
2024-12-02 19:34:27 +07:00
committed by ArthurSonzogni
parent d62dc6e305
commit cbd28403af
6 changed files with 63 additions and 20 deletions

View File

@@ -73,9 +73,14 @@ int main() {
});
});
screen.onSelectionModified([&] {
selectionChangeCounter++;
selection = screen.GetSelectedContent(renderer);
screen.setSelectionOptions({
.transform = [](Pixel& pixel) {
pixel.underlined_double = true;
},
.on_change = [&] {
selectionChangeCounter++;
selection = screen.GetSelectedContent(renderer);
}
});
screen.Loop(renderer);