Author Topic: help with controls on a theme  (Read 966 times)

mxstar1

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
help with controls on a theme
« on: December 27, 2016, 08:29:30 AM »
I flipped the wheel on a theme to horizontal, and i am wondering how to get the wheel to scroll left and right ONLY for this theme, using left and right, not up and down. I dont want to change the controls for the rest of the system, only on this theme. Right now it scrolls left and right, but only by using up and down on my controller. If i swap my controls, then my other vertical wheels go up and down with left and right. Any ideas? Adding custom controls to the layout? I have no idea how to do this

keilmillerjr

  • Hero Member
  • *****
  • Posts: 631
    • View Profile
Re: help with controls on a theme
« Reply #1 on: October 15, 2018, 03:47:32 AM »
Bump on a really old topic, but I was wondering the same. Sharing horizontal and vertical navigation on the same machine would require “swapping” controls to not confuse the user. Unless I’m missing something, which I have been lately with all the new features rolling out, only way to accomplish this is to have themes utilize custom keys, or not for default mapping.

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
Re: help with controls on a theme
« Reply #2 on: October 15, 2018, 07:53:24 AM »
this is what i use in my own themes, and just alter as needed

right know the code is set up to do what you need..

Code: [Select]


local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;



function on_signal( sig )
{
switch ( sig )
{
case "up":
fe.signal( "" );

return true;


case "down":
fe.signal( "" );

return true;


case "left":
fe.signal( "next_game" );

return true;


case "right":
fe.signal( "prev_game" );

return true;


case "select":
default:

}

return false;
}

fe.add_signal_handler(this, "on_signal");


though i know you will not like doing it this way,   ???
« Last Edit: October 15, 2018, 07:56:47 AM by jedione »
help a friend....

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: help with controls on a theme
« Reply #3 on: October 15, 2018, 08:02:06 AM »
this is what i use in my own themes, and just alter as needed


I do something similar but instead of signaling "next game" and "prev game" I just use fe.list.index++ or fe.list.index--. Why? I honestly don't remember, something to do with how transitions are managed when signaling instead of pressing keys.

keilmillerjr

  • Hero Member
  • *****
  • Posts: 631
    • View Profile
Re: help with controls on a theme
« Reply #4 on: October 15, 2018, 08:47:30 AM »
@jedione makes sense. Thank you. Do you have any issues with navigating the config menu trigging your theme?

@zapaolo11x interesting. Do you have a layout of yours I can reference to understand why? I would have thought the other way around. List index can change, but it’s easy for lots of things to hook into a signal change and execute code with it.
« Last Edit: October 15, 2018, 08:52:22 AM by keilmillerjr »

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: help with controls on a theme
« Reply #5 on: October 15, 2018, 11:17:50 AM »
@zapaolo11x interesting. Do you have a layout of yours I can reference to understand why? I would have thought the other way around. List index can change, but it’s easy for lots of things to hook into a signal change and execute code with it.

My Arcadeflow theme uses this method, the layout is huge with a lot of stuff happening, I can craft a minimal version if you think it's useful. If I remember well, I didn't use "next game" "prev game" because I didn't like the transitions it triggered, therefore I'm using index++ with a custom method to take care of long keypresses.