Custom overlay to set global setting


#1

Hi guys.
I’m managing an overlays speech with an NPC and I need the user can choose the primary language and the translation.
I’d like a custom window like this one:

So if I set italian on Primary language in the dropdown menu, I can get it in my Entity scripts.
For example:

if(Global.getLanguage == "italian") 
  textToShow = "Ciao come va?";
else
  textToShow = "Hi! What's up?";

var properties = {
   font: { size: 25 },
   text: textToShow ,
   ...
   visible: true
};

customOverlay = Overlays.addOverlay("text", properties);

I’m not an HiFi expert and I don’t know which’s the easiest way to accomplish it.
Thanks for the help :slight_smile: