Attract-Mode Support Forum

Attract-Mode Support => General => Topic started by: BadFurDay on December 20, 2018, 08:15:07 AM

Title: Is it possible to have different controls for different themes
Post by: BadFurDay on December 20, 2018, 08:15:07 AM
If I'm using a horizontal scrolling theme for my systems menu but then a vertical scrolling wheel for the individual system/displays it's weird having to scroll the wrong way for one of them. Is there any way around this? I have up and down set as the next game buttons so on my horizontal theme I'm still pushing up or down, however it would feel more natural to push left and right instead.
Title: Re: Is it possible to have different controls for different themes
Post by: keilmillerjr on December 20, 2018, 09:08:53 AM
I recently came into the same dilemma. I will post my config tonight for solution. I have it set so you can navigate left/right and up/down at same time. User will naturally use the control that makes sense for the layout.
Title: Re: Is it possible to have different controls for different themes
Post by: BadFurDay on December 20, 2018, 10:40:24 AM
It is what I'm doing but I used to have left and right to scroll next/previous page so I could go through the games quicker.
Title: Re: Is it possible to have different controls for different themes
Post by: zpaolo11x on December 20, 2018, 11:41:55 AM
My solution to this problem: my them catches "left" and "right" instead of relying on the "previous/next game" signals, so it doesn't take user settings into account...
Title: Re: Is it possible to have different controls for different themes
Post by: BadFurDay on December 20, 2018, 03:38:18 PM
My solution to this problem: my them catches "left" and "right" instead of relying on the "previous/next game" signals, so it doesn't take user settings into account...

Can you share the code you use?
Title: Re: Is it possible to have different controls for different themes
Post by: zpaolo11x on December 20, 2018, 10:40:50 PM
I tried to write a very simple layout that shows how you can intercept left and right and map next_game and prev_game. Here there's a signal callback function that basically shifts the games in the opposite direction with respect to what you press (so right = previous game, left = next game).

Code: [Select]

fe.add_text ("[Title]",0,0,fe.layout.width,fe.layout.width*0.05)

fe.add_signal_handler( this, "on_signal" )

function on_signal( sig ){

   if (sig == "left") {
      fe.signal ("next_game")
      return true
   }

   if (sig == "right"){
      fe.signal ("prev_game")
      return true
   }

   return false

}

Title: Re: Is it possible to have different controls for different themes
Post by: BadFurDay on December 22, 2018, 03:33:01 PM
I tried to write a very simple layout that shows how you can intercept left and right and map next_game and prev_game. Here there's a signal callback function that basically shifts the games in the opposite direction with respect to what you press (so right = previous game, left = next game).

Code: [Select]

fe.add_text ("[Title]",0,0,fe.layout.width,fe.layout.width*0.05)

fe.add_signal_handler( this, "on_signal" )

function on_signal( sig ){

   if (sig == "left") {
      fe.signal ("next_game")
      return true
   }

   if (sig == "right"){
      fe.signal ("prev_game")
      return true
   }

   return false

}


That hasn't worked for me I'm afraid.