Author Topic: How to detect the layout is presenting the display menu?  (Read 185 times)

henrikes

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
How to detect the layout is presenting the display menu?
« on: February 03, 2020, 01:03:22 AM »
Hi,

I guess the title says it all.... How can my layout detect that its presenting the display menu?

Thanks in advance.

zpaolo11x

  • Hero Member
  • *****
  • Posts: 676
    • View Profile
    • My deviantart page
Re: How to detect the layout is presenting the display menu?
« Reply #1 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: [Select]
if ((ttype == Transition.ShowOverlay) && (var == Overlay.Displays)) {
// DISPLAY MENU IS BEING TURNED ON
}

I think there's also an "is up" option but I didn't know much about that when coding my layout :D

henrikes

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: How to detect the layout is presenting the display menu?
« Reply #2 on: February 10, 2020, 11:39:41 PM »
The way I do it is this: in a transition response routine you can add the following check:

Code: [Select]
if ((ttype == Transition.ShowOverlay) && (var == Overlay.Displays)) {
// DISPLAY MENU IS BEING TURNED ON
}

I think there's also an "is up" option but I didn't know much about that when coding my layout :D

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

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: How to detect the layout is presenting the display menu?
« Reply #3 on: February 18, 2020, 11:30:27 AM »
On the Displays Menu layout options you can set the prompt name of the display. For example mine is "Main Menu"

Code: [Select]
if (fe.list.name == "Main Menu") {
//See if this works
}