New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game info text [Overview] causes pi to struggle #377

Closed
calle81 opened this Issue Oct 15, 2017 · 3 comments

Comments

Projects
None yet
1 participant
@calle81

calle81 commented Oct 15, 2017

Hi,

Adding game info text like below causes performance issues on a pi when scrolling through a wheel. I was hoping that adding a transition state would solve the problem but it seems transitions and text don't work together. If you have any ideas pleas let me know.

local gtext = fe.add_text("[Overview]", flx0.73, fly0.25, flw0.25, flh0.45 );
gtext.set_rgb( 255, 255, 255 );
gtext.align = Align.Left;
gtext.charsize = 20;
gtext.rotation = 0;
gtext.word_wrap = true;
gtext.font = "MyriadPro-Bold.otf"
gtext.trigger = Transition.EndNavigation;

@calle81

This comment has been minimized.

Show comment
Hide comment
@calle81

calle81 Oct 15, 2017

Same thing with the pan and scan module. This module doesn't seem to take the bgart.trigger = Transition.EndNavigation; option into consideration. When used on a pi this causes navigation performance issues because it loads the flyer for each game when moving through the wheel.

local bgart = PanAndScanArt( "flyer", 0, 0, flw, flh);
bgart.preserve_aspect_ratio = false;
bgart.set_fit_or_fill("fill");
bgart.set_anchor(::Anchor.Center);
bgart.set_zoom(4.5, 0.00008);
bgart.set_animate(::AnimateType.Bounce, 0.50, 0.50)
bgart.set_randomize_on_transition(true);
bgart.set_start_scale(1.1);
bgart.trigger = Transition.EndNavigation;

calle81 commented Oct 15, 2017

Same thing with the pan and scan module. This module doesn't seem to take the bgart.trigger = Transition.EndNavigation; option into consideration. When used on a pi this causes navigation performance issues because it loads the flyer for each game when moving through the wheel.

local bgart = PanAndScanArt( "flyer", 0, 0, flw, flh);
bgart.preserve_aspect_ratio = false;
bgart.set_fit_or_fill("fill");
bgart.set_anchor(::Anchor.Center);
bgart.set_zoom(4.5, 0.00008);
bgart.set_animate(::AnimateType.Bounce, 0.50, 0.50)
bgart.set_randomize_on_transition(true);
bgart.set_start_scale(1.1);
bgart.trigger = Transition.EndNavigation;

@calle81

This comment has been minimized.

Show comment
Hide comment
@calle81

calle81 Oct 22, 2017

I solved my problem with the pan and scan module by adding the transition directly in the module. The issue with the [overview] text remains however.

calle81 commented Oct 22, 2017

I solved my problem with the pan and scan module by adding the transition directly in the module. The issue with the [overview] text remains however.

@calle81

This comment has been minimized.

Show comment
Hide comment
@calle81

calle81 Jan 31, 2018

Here is how to only make overview update on EndNavigation:

local text = fe.add_text("info", flx0.72, fly0.13, flw0.26, flh0.7);

fe.add_transition_callback("on_infotransition")

function on_infotransition(ttype, var, ttime) {
if ( ttype == Transition.EndNavigation)
text.msg = fe.game_info(Info.Overview)
if ( ttype == Transition.StartLayout)
text.msg = fe.game_info(Info.Overview)
if ( ttype == Transition.ToNewList)
text.msg = fe.game_info(Info.Overview)
}

calle81 commented Jan 31, 2018

Here is how to only make overview update on EndNavigation:

local text = fe.add_text("info", flx0.72, fly0.13, flw0.26, flh0.7);

fe.add_transition_callback("on_infotransition")

function on_infotransition(ttype, var, ttime) {
if ( ttype == Transition.EndNavigation)
text.msg = fe.game_info(Info.Overview)
if ( ttype == Transition.StartLayout)
text.msg = fe.game_info(Info.Overview)
if ( ttype == Transition.ToNewList)
text.msg = fe.game_info(Info.Overview)
}

@calle81 calle81 closed this Aug 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment