Simulate actual physical off-screen switches to test UI in SLS simulator

What do you want to achieve?

My project has a 320 x 240 NON TOUCH display.
To navigate there will be 4 push buttons placed around the screen, next to icons that change to indicate current function.
I was wondering if there is a way to simulate those off-screen button inputs to test the UI in the SLS simulator on the PC.

What have you tried so far?

I have ported the library and produced a very simple code example that hooks the switches ok.
But I want to be able to use SLS to design and test the UI.

Newbie just asking!

Screenshot or video

Others

  • SquareLine Studio version:
    1.1.1

  • Operating system:
    Win 10

  • Target hardware:
    Custom board, SAMD51 with an SPI interface to HX8347-A01 controller.

It’s not implemented in SquareLine but LVGL has this feature: Input device interface — LVGL documentation

You can create a (semi-)transparent buttons in SLS and make the external buttons click these UI buttons. This way you can test it in with mouse but with a different driver the same code will work on HW too.

Great, so I can combine these with the on-screen icons next to the switches so I can click the icon in SLS and use physical buttons hitting the same co-ordinates in the real hardware.

Very neat.

Thank you

Exactly! :slight_smile: