Author Topic: PanAndScan module v1.2 release  (Read 22923 times)

bionictoothpick

  • Sr. Member
  • ****
  • Posts: 320
  • He who laughs lasts.
    • View Profile
Re: PanAndScan module v1.1 release
« Reply #15 on: March 21, 2016, 02:55:12 AM »
local l1= PanAndScanArt("laptop",431,845, 69,43);
l1.set_start_scale(0.5);
l1.set_zoom(1.25, 0.01);
l1.set_animate(::AnimateType.HorizBounce,0.2);

I did a git pull and built from source: attract -v Attract-Mode v2.0.0-rc3-1 (Linux, SFML 2.1 +FontConfig +SWF)
Image attached...

When the image reaches left border, it doesn't bounce back.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #16 on: March 21, 2016, 06:33:03 AM »
Thanks bionictoothpick,

I've uploaded a bugfix to the original post (version 1.2) .. give it a try and see what you think.

omegaman

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 880
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #17 on: March 21, 2016, 07:25:30 AM »
Nice module, I need to update robospin with this.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #18 on: March 21, 2016, 08:08:18 AM »
Nice module, I need to update robospin with this.

Thanks! I'd be keen to see what you do with it :)

bionictoothpick

  • Sr. Member
  • ****
  • Posts: 320
  • He who laughs lasts.
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #19 on: March 21, 2016, 05:11:31 PM »
Chrisvg!

Thanks for the update. Now it is working as expected...the logo is bouncing back and forth on the laptop.
I'm working on the menu options now to make it a bit more user friendly (my isometric magazine theme).

Thanks again!

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #20 on: March 21, 2016, 10:18:55 PM »
Thanks for the update. Now it is working as expected...the logo is bouncing back and forth on the laptop.
I'm working on the menu options now to make it a bit more user friendly (my isometric magazine theme).

Great! Glad to hear the update helped to resolve the problem.  I knew it had this problem at one point when I was first coding it, but I thought I got it sorted out already!  Oh well, it's fixed now :)

Also I haven't forgotten about your earlier request for setting arbitrary zoom-to co-ordinates, I'll see what I can do for you over the Easter break.  I'm a bit busy with a top secret project right now, but should have that wrapped up shortly ;)

Ize

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #21 on: March 23, 2016, 10:22:46 AM »
Is it possible to integrate the FadeArt module into this?
I've tried to use the FadeArt Image as the source for pan and scan but nothing happened.

chrisvg

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #22 on: March 23, 2016, 06:43:42 PM »
Is it possible to integrate the FadeArt module into this?
I've tried to use the FadeArt Image as the source for pan and scan but nothing happened.

Hmmm yeh that might be a pain in the arse.  If PreserveArt doesn't support it then PanAndScan isnt going to either.  I'll put it on the list of things to look into in a future version tho.

Ize

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #23 on: March 24, 2016, 03:47:29 AM »
Thanks, that would be great.

I really like the pan and scan effect but i don't like the "jump" it does when switching games... that's where FadeArt would come in handy :D

bionictoothpick

  • Sr. Member
  • ****
  • Posts: 320
  • He who laughs lasts.
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #24 on: March 25, 2016, 06:50:38 AM »
Thinking out loud:

I'm want to use the zoom feature on my magazine template so when a button is hit to display game info (history.dat) it zooms in on the notepad, and then displays the text. That's why I want to make the center of the zoom a specific x/y coordinate.

In the meantime I will come up with something else...

calle81

  • Sr. Member
  • ****
  • Posts: 184
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #25 on: October 14, 2017, 05:29:50 PM »
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. Does anyone here know how to fix this issue?

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;

8bitsdeep

  • Full Member
  • ***
  • Posts: 49
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #26 on: November 09, 2017, 07:56:47 AM »
Agreed, allowing art.trigger = Transition.EndNavigation would be great.

In the meantime, you can hack it in if you don't mind it being set for all your pan-and-scan stuff.  Open up pan-and-scan.nut and find this section on line 80 and add the last line to it:

Code: [Select]
constructor(name, x, y, w, h, parent = ::fe)
{
    if (base.VERSION != PRESERVEART_VERSION)
    {
        ::print("\n***\n*** WARNING: PreserveArt module version mismatch.\n*** PreserveArt version installed: " + base.VERSION + "\n*** PanAndScan expecting version: " + PRESERVEART_VERSION + "\n***\n\n")
    }
    base.constructor(name, x, y, w, h, parent = ::fe);
    art.trigger = Transition.EndNavigation;  //Add this line
}

Only issue is the animation still resets to the anchor as you scroll, but still better than a laggy interface.

calle81

  • Sr. Member
  • ****
  • Posts: 184
    • View Profile
Re: PanAndScan module v1.2 release
« Reply #27 on: November 09, 2017, 12:18:57 PM »
Yeah, I figured this out earlier but thanks anyway :)