Closed kaiakz closed 5 years ago
In my opinion, it's better to use the SDL or JavaScript to display a rectangle because it will give more flexibility later.
The purpose of groups
is to enable keyboard/encoder navigation and highlighting is designed to work well with typical selectable objects. Some issues:
So, in summary, I think manually drawing a rectangle will give a more flexible and predictable result.
OK, I use JS to the CANVAS. Due to WASM also draw on CANVAS, highlights sometimes can't display normally, I might fix it later.
It is great to highlight the selected item. I have finished the swapping data between JS and WASM, JS can get a string(widget attribute) from WASM and parse it into JSON. We can get the position and size of the widget now, it's time to achieve the highlight, I think there are some ways:
In Browser, since WASM displays on a Canvas
In WASM:
Use SDL to draw.
Simulate the lv_group: I found the widgets in
lv_group
have the highligh. @kisvegabor @embeddedt How can I simulate it, can you show some details aboutlv_group
Change the selected widget style: border, colour, etc.