Skip to content
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

Added Transition.EndNavigation trigger to preserve-art #567

Merged
merged 1 commit into from
Jun 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions config/modules/preserve-art.nut
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
// img.set_anchor( ::Anchor.Top );
//
// local art = PreserveArt( "snap", 0, 0, 320, 240 );
// art.trigger = Transition.EndNavigation; // Optional
// art.set_fit_or_fill( "fit" ); // fit, fill or stretch
// art.set_anchor( ::Anchor.Bottom ); // Top, Left, Center, Centre, Right, Bottom
//
Expand Down Expand Up @@ -225,7 +226,11 @@ class PreserveArt
function _get( idx ) { return surface[idx]; }
function _set( idx, val )
{
if ( idx == "index_offset" ) art.index_offset = val; else if ( idx == "filter_offset" ) art.filter_offset = val; else if ( idx == "file_name" ) art.file_name = val; else surface[idx] = val;
if ( idx == "index_offset" ) art.index_offset = val;
else if ( idx == "filter_offset" ) art.filter_offset = val;
else if ( idx == "file_name" ) art.file_name = val;
else if ( idx == "trigger" ) art.trigger = val;
else surface[idx] = val;
}

function print( msg )
Expand All @@ -237,7 +242,7 @@ class PreserveArt

function onTransition( ttype, var, ttime )
{
if ( ttype == Transition.StartLayout || ttype == Transition.ToNewList || ttype == Transition.FromOldSelection ) request_size = true;
if ( ttype == Transition.StartLayout || ttype == Transition.FromOldSelection || ttype == Transition.ToNewList || ttype == Transition.EndNavigation ) request_size = true;
}

function onTick( ttime )
Expand Down