There is no specific API for this you need to create a full screen size transparent container to absorb the clicks, then draw your ‘modal’ object on it. please take a look at the docs here there is a code sample for a message box to get you started. If you need any further assistance don’t hesitate to ask.
Personally I usually set the opacity of the container to about 30% and set the colour to LV_COLOR_SILVER to slightly grey out the screen behind.
For people needing a modal window, this is the code in v8.3 that following Pete suggestion.
For visual widgets inside the window, you can design a panel with full childen widgets in SquareLine Studio, then set parent of that panel to this window after creation.
Your code looks great thanks for sharing your update on this old post…
Just for completeness, it is now also possible to create the model message box just by setting its parent to NULL see the V8.3 documents here. This greatly simplifies the whole process.
I stumbled on this post.
Thnx for the idea to make a modal dialog like this.
I have a question about the ‘or’ of two enumerations: LV_PART_MAIN | LV_STATE_DEFAULT
See that more often.
Why is it done like this?
In C++ this it is not allowed to make this kind of calculation with two different enumeration types.
Above all, both have value of 0.