Skip to main content
MBrau.7
Associate II
March 22, 2023
Question

Hey Guys! Is there any way to change a selected simulator skin image while running the simulator?

  • March 22, 2023
  • 2 replies
  • 1070 views

..

This topic has been closed for replies.

2 replies

Osman SOYKURT
ST Technical Moderator
March 22, 2023

Hello MBrau.7,

I'm not sure what do you mean by "change a selected simulator skin image". Can you elaborate a bit more please :)

/Osman

ST Software Developer | TouchGFX
MBrau.7
MBrau.7Author
Associate II
March 24, 2023

Hey Osman!

Sorry for my imprecise question :grinning_face_with_sweat:

In the TouchGFX Designer you can select a skin which is used

as a static background image for a running simulation. I wanted to

change this image while running the simulation if e.g. a button is

clicked. Found the solution for myself:

I have extended the HALSDL2 class with a custom loadSkin()-function,

where i pass the name of a skin image. I just have to specify the desired

images i want to use in the Makefile. When setting the first skin, it is necessary

to call the recreateWindow()-function. When changing the skin a second, third, ... time

you can just call the SDL_SetWindowShape()-function.