Attract-Mode Support > Scripting
How to detect the layout is presenting the display menu?
(1/1)
henrikes:
Hi,
I guess the title says it all.... How can my layout detect that its presenting the display menu?
Thanks in advance.
zpaolo11x:
The way I do it is this: in a transition response routine you can add the following check:
--- Code: ---if ((ttype == Transition.ShowOverlay) && (var == Overlay.Displays)) {
// DISPLAY MENU IS BEING TURNED ON
}
--- End code ---
I think there's also an "is up" option but I didn't know much about that when coding my layout :D
henrikes:
--- Quote from: zpaolo11x on February 03, 2020, 02:17:42 AM ---The way I do it is this: in a transition response routine you can add the following check:
--- Code: ---if ((ttype == Transition.ShowOverlay) && (var == Overlay.Displays)) {
// DISPLAY MENU IS BEING TURNED ON
}
--- End code ---
I think there's also an "is up" option but I didn't know much about that when coding my layout :D
--- End quote ---
I try that, but i cant get it to work. I encapsulated that in a transition callback and all it did was depending on your IF statement it would chang the value of a boolean variable.....
PocketChange:
On the Displays Menu layout options you can set the prompt name of the display. For example mine is "Main Menu"
--- Code: ---if (fe.list.name == "Main Menu") {
//See if this works
}
--- End code ---
Navigation
[0] Message Index
Go to full version