Author Topic: Is it possible to have different controls for different themes  (Read 3468 times)

BadFurDay

  • Full Member
  • ***
  • Posts: 82
    • View Profile
Is it possible to have different controls for different themes
« 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.

keilmillerjr

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1167
    • View Profile
Re: Is it possible to have different controls for different themes
« Reply #1 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.

BadFurDay

  • Full Member
  • ***
  • Posts: 82
    • View Profile
Re: Is it possible to have different controls for different themes
« Reply #2 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.

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: Is it possible to have different controls for different themes
« Reply #3 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...

BadFurDay

  • Full Member
  • ***
  • Posts: 82
    • View Profile
Re: Is it possible to have different controls for different themes
« Reply #4 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?

zpaolo11x

  • Hero Member
  • *****
  • Posts: 1233
    • View Profile
    • My deviantart page
Re: Is it possible to have different controls for different themes
« Reply #5 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

}

« Last Edit: December 21, 2018, 01:23:57 AM by zpaolo11x »

BadFurDay

  • Full Member
  • ***
  • Posts: 82
    • View Profile
Re: Is it possible to have different controls for different themes
« Reply #6 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.