Author Topic: Redirect controls doesnt seems to work on RPI  (Read 236 times)

qqplayer

  • Sr. Member
  • ****
  • Posts: 249
    • View Profile
Redirect controls doesnt seems to work on RPI
« on: July 29, 2018, 08:26:08 AM »
Trying Filter Grid layout on the rpi with a fresh hyperpie 1 installation but when I press "right" on the filter grid layout it doesnt change to the next filter.

Code: [Select]
fe.add_signal_handler( "on_signal" );
function on_signal( sig )
{
switch ( sig )
{
case "up":
if ( sel_index > 0 )
{
sel_index--;
update_frame();
}
else
{
fe.signal( "prev_game" );
}
return true;
case "down":
if ( sel_index < sel_count - 1 )
{
sel_index++;
update_frame();
}
else
{
fe.signal( "next_game" );
}
return true;
case "left":
if ( ftr_index > 0 )
{
ftr_index--;
update_filters();
update_frame();
return true;
}
else
{
// swap images to reduce reloading
for ( local i=ftr_count-1; i>0; i-- )
{
for ( local j=0; j<sel_count; j++ )
{
filters[i].m_objs[j].m_obj.swap(
filters[i-1].m_objs[j].m_obj );
}
}
transition_state = TState.Prev;

fe.signal( "prev_filter" );
return true;
}
break;
case "right":
if ( ftr_index < ftr_count - 1 )
{
ftr_index++;
update_filters();
update_frame();
return true;
}
else
{
// swap images to reduce reloading
for ( local i=1; i<ftr_count; i++ )
{
for ( local j=0; j<sel_count; j++ )
{
filters[i].m_objs[j].m_obj.swap(
filters[i-1].m_objs[j].m_obj );
}
}
transition_state = TState.Next;

fe.signal( "next_filter" );
return true;
}
break;
case "next_game":
case "prev_game":
case "next_filter":
case "prev_filter":
case "exit":
case "exit_no_menu":
break;
case "select":
default:

This is the code of the layout.nut
Works great on all my windows versions.

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 225
    • View Profile
Re: Redirect controls doesnt seems to work on RPI
« Reply #1 on: August 01, 2018, 12:37:44 AM »
What is update_frame() function? Is it a function you wrote or a standard A.M. function? I couldn’t find it in the layouts documentation... and if it forces a screen redraw I could make use of it a n my theme instead of using tricks :O

qqplayer

  • Sr. Member
  • ****
  • Posts: 249
    • View Profile
Re: Redirect controls doesnt seems to work on RPI
« Reply #2 on: August 02, 2018, 05:03:56 AM »
You can catch the complete code inside the Filter Grid layout.
I dont change anything inside.
But I dont  know why doesnt change between filters on my pi.