Author Topic: Conveyor_Helper Module for Themers: Updated - 11/28/2017  (Read 1462 times)

jedione

  • Sr. Member
  • ****
  • Posts: 363
  • punktoe
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #15 on: October 30, 2017, 12:23:38 PM »
well i have to chime in once moor just to say you have done an amazing job,,
you have made it 2-easy..

after fiddling for a bought an 15 min was able to update my fry theme, and the wheel is what it needed!

just throw my wheel.nut in any theme you want, and call it from the layout "fe.do_nut("wheel.nut");"

here is what it looks like adding it quickly and switching Right to Left, and screen placement,   easy thanks to
you....peace

youtube = https://youtu.be/tell2dGGosw

haven't even got to the grafix yet that will be fun,   

« Last Edit: October 30, 2017, 12:25:57 PM by jedione »
help a friend....

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #16 on: October 30, 2017, 12:43:55 PM »
I'm trying to suss this out myself but struggling, any chance you get get the conveyor to appear like the robospin conveyor? e.g.

Also any chance to add the option to fade out the wheel? I also really like the idea, if possible, to fade out all the wheel except the one highlighted, if it could have those two options would be sweet.  :)

This is possible. Just use the following settings:
 item.alphaScaling.low = 60;             // OPTIONS: 0-100 Scaling size percentage to use for the item furthest from the selected item
      item.alphaScaling.high = 60;             // OPTIONS: 0-100 Scaling size percentage to use for item closest to the selected item
      item.alphaScaling.currentlySelected = 255;          // OPTIONS: 0-100 Scaling size percentage to use for the currently selected item

Sweet, I've got the wheel looking very similar to the robospin, just wondering about the possibility of reversing the order and the way the wheel spins to match how the robospin works.  Also any chance on getting the wheels to fade? I have code that works with the robospin wheel but I'm guessing won't work on this.

Edit: In case it helps here is the code:

//for fading of the wheel
first_tick <- 0;
stop_fading <- true;
wheel_fade_ms <- 0;
try {   wheel_fade_ms = my_config["wheel_fade_ms"].tointeger(); } catch ( e ) { }

//Wheel fading
if ( wheel_fade_ms > 0 )
{
   function wheel_fade_transition( ttype, var, ttime )
   {
      if ( ttype == Transition.ToNewSelection || ttype == Transition.ToNewList )
            first_tick = -1;
   }
   fe.add_transition_callback( "wheel_fade_transition" );
   
   function wheel_alpha( ttime )
   {
      if (first_tick == -1)
         stop_fading = false;

      if ( !stop_fading )
      {
         local elapsed = 0;
         if (first_tick > 0)
            elapsed = ttime - first_tick;

         local count = conveyor.m_objs.len();

         for (local i=0; i < count; i++)
         {
            if ( elapsed > wheel_fade_ms)
               conveyor.m_objs.alpha = 0;
            else
               //uses hardcoded default alpha values does not use wheel_a
               //4 = middle one -> full alpha others use 80
               if (i == 4)
                  conveyor.m_objs.alpha = (255 * (wheel_fade_ms - elapsed)) / wheel_fade_ms;
               else
                  conveyor.m_objs.alpha = (80 * (wheel_fade_ms - elapsed)) / wheel_fade_ms;
         }

         if ( elapsed > wheel_fade_ms)
         {
            //So we don't keep doing the loop above when all values have 0 alpha
            stop_fading = true;
         }
      
        if (first_tick == -1)
            first_tick = ttime;
      }
   }
   fe.add_ticks_callback( "wheel_alpha" );
}
« Last Edit: October 30, 2017, 12:49:42 PM by BadFurDay »

jedione

  • Sr. Member
  • ****
  • Posts: 363
  • punktoe
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #17 on: October 30, 2017, 05:06:30 PM »
possible bug  ,, anyone that could test ..thanks

when running the module. my animation is now not running ok in some themes weird .

it will kick in after going up or down a bunch, and just stick..

ill show you....  thanks

you tube..= https://youtu.be/cdXZWTrMW_o

allmost forgot im talking abought the little pointy hand anime

Code: [Select]
local flx = fe.layout.width;
local fly = fe.layout.height;
local flw = fe.layout.width;
local flh = fe.layout.height;


fe.load_module("animate");



local rarrow = fe.add_image("images/cursor.png", flx*0.999, fly*0.500, flw*0.045, flh*0.045 );
local rarrow_move_cfg = {
when =Transition.ToNewSelection ,
property = "x",
start = flx*1.970,
end = flx*0.945,
time = 600,
//loop=true,
}
animation.add( PropertyAnimation( rarrow, rarrow_move_cfg ) );

« Last Edit: October 30, 2017, 05:09:07 PM by jedione »
help a friend....

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #18 on: October 30, 2017, 09:34:57 PM »
Send me you layout so I can try something if that is ok?

jedione

  • Sr. Member
  • ****
  • Posts: 363
  • punktoe
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #19 on: October 31, 2017, 07:29:31 AM »
FIXed......

thanks,,https://youtu.be/RH1o7JX_-Uk

ok,,,ill pm you right now .....

also Happy Halloween  ;D

update...  it's not the module...  for some reason running the anima through donuts ,,it dont like

so now iv moved the code back to the original layout and killed the donut..and now its working..


fe.do_nut("wheel.nut");

local rarrow = fe.add_image("images/cursor.png", flx*0.999, fly*0.500, flw*0.045, flh*0.045 );
local rarrow_move_cfg = {
   when =Transition.ToNewSelection ,
   property = "x",
   start = flx*1.970,
   end = flx*0.945,
   time = 600,    
   //loop=true,
}
animation.add( PropertyAnimation( rarrow, rarrow_move_cfg ) );

//fe.do_nut("scripts/finger.nut");

sorry for the false alarm,  and for the offer of help!
« Last Edit: October 31, 2017, 06:56:10 PM by jedione »
help a friend....

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #20 on: November 03, 2017, 01:23:28 AM »
my pleasure

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #21 on: November 11, 2017, 09:41:30 AM »
Is there anyway to change the order of the games and the direction the wheel scrolls? Both are currently the opposite to how the robospin wheel would work. Thanks.

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #22 on: November 13, 2017, 04:17:42 AM »
I need you to elaborate what you mean:


- if you are using a spinwheel and you want to change the direction the wheel flows. it can be done with these commands:


Code: [Select]

spinList.type = ch.Spinwheel; // OPTIONS: ch.Spinwheel / ch.Linear_Vertical / ch.Linear_Horizontal
spinList.bend.direction = ch.Right;  // OPTIONS: ch.Left / ch.Right
spinList.bend.gl_radius = fe.layout.height * 0.3; // OPTIONS: radius of the spinwheel in pixels
spinList.x = fe.layout.width / 2; // OPTIONS: top left x-coordinate if gamelist is linear or the center x-coordinate if a spinwheel
spinList.y = fe.layout.height / 2; // OPTIONS: top left y-coordinate if gamelist is linear or the center y-coordinate if a spinList
spinList.width = 270; // OPTIONS: linear game list total width in pixels
spinList.height = 0; // OPTIONS: linear list's height in pixels


// ----------- Spinwheel options -----------
spinList.spinwheel.shape = 180; // OPTIONS: shape of the spinwheel arc in degrees eg: 270, 180, 360
spinList.spinwheel.rotate_items = true; // OPTIONS: true / false - Rotate the items along the spinwheel arc
spinList.spinwheel.startDegree = 90; // The degree on a circle to start drawing the spinwheel. From left to right 0= left, 90 = top, 180 = right, 270= bottom
spinList.spinwheel.effects.x = 1.00; // a number that changes the spinwheel algorithm to create cool effects Default is 1
spinList.spinwheel.effects.y = 1.00; // a number that changes the spinList algorithm to create cool effects Default is 1




spinList.bend.direction - will change the direction the wheel is drawn... 
[/size]spinList.spinwheel.shape - will control the arc of the wheel. If you need something more specific, just let me know what you need and I will have a look.

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers
« Reply #23 on: November 13, 2017, 02:07:13 PM »
I need you to elaborate what you mean:

I'll try what you've suggested but I'll also try explain what I mean:

So the robospin wheel lists the items like so:

ZY
ZZ
AA <
AB
AC

If I push the down button it moves to this:

ZZ
AA
AB <
AC
AD

Your wheel lists the items like this:

AC
AB
AA <
ZZ
ZY

And if you push down it moves to this:

AD
AC
AB <
AA
ZZ

When I actually explain it out this way, the down button moves the wheel in the right way down the list (AA to AB) but the order of the wheel just needs reversing/flipping. Hope this makes sense, if not I'll try take pictures/videos of what I mean. Thanks for your help.

Edit: Just to note as I think this might be effecting this, it happens with the option spinList.bend.direction = ch.Left;
« Last Edit: November 13, 2017, 03:35:10 PM by BadFurDay »

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/10/2017
« Reply #24 on: November 13, 2017, 04:13:40 PM »
So, this is what I have with the following settings:


Quote
//Wheel

   // initialize the game list
   local spinList = MyGameList();

   // Configure spinlist options

      // ----------- General List Options -----------   
      spinList.type = ch.Spinwheel;                   // OPTIONS: ch.Spinwheel / ch.Linear_Vertical / ch.Linear_Horizontal
      spinList.bend.direction = ch.Left;              // OPTIONS: ch.Left / ch.Right
      spinList.bend.gl_radius = fe.layout.height / 1;   // OPTIONS: radius of the spinwheel in pixels
      spinList.x = fe.layout.width / 0.69;               // OPTIONS: top left x-coordinate if gamelist is linear or the center x-coordinate if a spinwheel
      spinList.y = fe.layout.height / 1.88;               // OPTIONS: top left y-coordinate if gamelist is linear or the center y-coordinate if a spinList
      spinList.width = 270;                         // OPTIONS: linear game list total width in pixels
      spinList.height = 0;                         // OPTIONS: linear list's height in pixels

      // ----------- Spinwheel options -----------
      spinList.spinwheel.shape = 180;                // OPTIONS: shape of the spinwheel arc in degrees eg: 270, 180, 360
      spinList.spinwheel.rotate_items = true;         // OPTIONS: true / false - Rotate the items along the spinwheel arc
      spinList.spinwheel.startDegree = 82.8;            // The degree on a circle to start drawing the spinwheel. From left to right 0= left, 90 = top, 180 = right, 270= bottom
      spinList.spinwheel.effects.x = 1.00;            // a number that changes the spinwheel algorithm to create cool effects Default is 1
      spinList.spinwheel.effects.y = 1.00;            // a number that changes the spinList algorithm to create cool effects Default is 1

      // ----------- List Item  Options -----------
      spinList.item.contentTemplate = ch.Artwork;   // OPTIONS: ch.Artwork / ch.Text / ch.Artwork_and_Text / ch.Artwork_or_Text / ch.Flyer_and_Artwork
      spinList.item.count = 24;                      // OPTIONS: Total number of gamelist items to display

      spinList.item.sizeScaling.low = 0.80;             // OPTIONS: 0-100 Scaling size percentage to use for the item furthest from the selected item
      spinList.item.sizeScaling.high = 0.80;          // OPTIONS: 0-100 Scaling size percentage to use for item closest to the selected item
      spinList.item.sizeScaling.currentlySelected = 1.0;   // OPTIONS: 0-100 Scaling size percentage to use for the currently selected item

      spinList.item.alphaScaling.low = 60;             // OPTIONS: 0-100 Scaling size percentage to use for the item furthest from the selected item
      spinList.item.alphaScaling.high = 60;          // OPTIONS: 0-100 Scaling size percentage to use for item closest to the selected item
      spinList.item.alphaScaling.currentlySelected = 255;// OPTIONS: 0-100 Scaling size percentage to use for the currently selected item

      spinList.item.height = 250;                   // OPTIONS: Height of each gameList item in pixels before scaling - dynamic with linear vertical lists
      spinList.item.width = 500;                     // OPTIONS: Width of each gameList item in pixels before scaling - dynamic with linear horizontal lists

      spinList.item.margin.left = 15;                // OPTION: bounding box left margin size for all images and text
      spinList.item.margin.right = 15;                // OPTION: bounding box right margin size for all images and text
      spinList.item.margin.top = 10;                  // OPTION: bounding box top margin size for all images and text
      spinList.item.margin.bottom = 15;               // OPTION: bounding box bottom margin size for all images and text

      // ----------- List Item Content: Text -----------
      spinList.text.message = "[Title]";
      spinList.text.alignment = Align.Centre;           // OPTIONS:left/right/center
      spinList.text.normal.font = "Arial Black";
      spinList.text.normal.size = 40;                // OPTIONS: text font size for every gameList item
      spinList.text.normal.color.red = 255;            // OPTIONS: text font red color channel 0 - 255
      spinList.text.normal.color.green = 255;         // OPTIONS: text font green color channel 0 - 255
      spinList.text.normal.color.blue = 128;            // OPTIONS: text font blue color channel 0 - 255
      
      spinList.text.currentlySelected.font = "Arial";
      spinList.text.currentlySelected.size = 40;       // OPTIONS: text font size for every gameList item
      spinList.text.currentlySelected.color.red = 128;   // OPTIONS: text font red color channel 0 - 255
      spinList.text.currentlySelected.color.green = 255; // OPTIONS: text font green color channel 0 - 255
      spinList.text.currentlySelected.color.blue = 128;  // OPTIONS: text font blue color channel 0 - 255
       
      // ----------- List Item Content: User Defined Artwork -----------   
      spinList.artwork.type = "wheel";          // OPTIONS: name of the artwork to use for the conveyour
      spinList.artwork.preserveAspect = true;    // OPTIONS: true / false
      spinList.add_favoriteImage(fe.script_dir + "favourite.png",spinList.item.width -30,20,30,25);

      if (spinList.item.contentTemplate == ch.Custom)
      {
   //      Configure custom gameitem
         local object = spinList;
         local temp = null;
         local x = 0
         local y = 0
         local w = object.item.width
         local h = object.item.height

         temp = object.add_customGameItemContent("artwork", x+w*0.40 ,y ,w*0.6 ,h * 0.80 );
         temp.preserve_aspect_ratio = object.artwork.preserveAspect;
         temp.trigger = Transition.EndNavigation;
         
         temp = object.add_customGameItemContent("text", "[Title]", x, h*0.85, w, h * 0.2);
         temp.font = object.text.normal.font;
         temp.charsize  = object.text.normal.size;
         temp.align = object.text.alignment;
         temp.set_rgb(object.text.normal.color.red, object.text.normal.color.green, object.text.normal.color.blue);
         
         temp = object.add_customGameItemContent("artwork","wheel", x ,y ,w*0.35 ,h * 0.80 );
         temp.preserve_aspect_ratio = object.artwork.preserveAspect;
         temp.trigger = Transition.EndNavigation;
         object.gi_textFallback = true;
      }
// show the spinwheel list
spinList.show()

As you can see the list is on Assault Course and above it is Astro Attack.  This game is the next one down in the list:

Quote
Artura (E);Artura (E);Amstrad CPC;;;;;;;;;;;;;;
Assault Course (E);Assault Course (E);Amstrad CPC;;;;;;;;;;;;;;
Astro Attack (E);Astro Attack (E);Amstrad CPC;;;;;;;;;;;;;;

...so it should be underneath Assault Course and Artura should be above it instead. Basically from top to bottom the games go from Z to A where on the robospin layouts it goes from top to bottom A to Z. I hope this makes sense, having a setting to swap this would be awesome as I wouldn't be surprised if some people prefer it this way.

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/10/2017
« Reply #25 on: November 14, 2017, 05:17:31 AM »
OOOOhhhhhhhhh. The game list is in reverse alphabetical order when bend = ch.Left is active.


OK. I will have a look to see about changing this. Thanks for the detailed explanation. Stay


Edit: Ok I fixed it. Redownload it and let me know if this works for you.
« Last Edit: November 14, 2017, 08:47:07 AM by ArcadeBliss »

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/10/2017
« Reply #26 on: November 14, 2017, 01:59:34 PM »
OOOOhhhhhhhhh. The game list is in reverse alphabetical order when bend = ch.Left is active.


OK. I will have a look to see about changing this. Thanks for the detailed explanation. Stay


Edit: Ok I fixed it. Redownload it and let me know if this works for you.

It goes the right way but the game that is highlighted is actually the one below the one you're on. On the screenshot the game that will play, showing the title on the bottom bar and the right box art is Rick Dangerous but the wheel is highlighting Rick Dangerous 2.

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/14/2017
« Reply #27 on: November 15, 2017, 01:31:33 AM »
Ok, I do not have this error. Please download the module again and see if the error is still there. Also, let me know if this happens in the demo layouts that I provided. It does not happen on my system. Also, please make sure you change this setting to 90: "spinList.spinwheel.startDegree = 82.8; "
« Last Edit: November 15, 2017, 02:02:43 AM by ArcadeBliss »

ArcadeBliss

  • Sr. Member
  • ****
  • Posts: 194
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/15/2017
« Reply #28 on: November 15, 2017, 01:58:42 AM »
this code should still work. you just need to prefix "conveyor.m_objs.alpha" with the variable of your game list e.g.: spinList.conveyor.m_objs.alpha

Code: [Select]
//for fading of the wheel
first_tick <- 0;
stop_fading <- true;
wheel_fade_ms <- 0;
try { wheel_fade_ms = my_config["wheel_fade_ms"].tointeger(); } catch ( e ) { }

//Wheel fading
if ( wheel_fade_ms > 0 )
{
function wheel_fade_transition( ttype, var, ttime )
{
if ( ttype == Transition.ToNewSelection || ttype == Transition.ToNewList )
first_tick = -1;
}
fe.add_transition_callback( "wheel_fade_transition" );

function wheel_alpha( ttime )
{
if (first_tick == -1)
stop_fading = false;

if ( !stop_fading )
{
local elapsed = 0;
if (first_tick > 0)
elapsed = ttime - first_tick;

local count = conveyor.m_objs.len();

for (local i=0; i < count; i++)
{
if ( elapsed > wheel_fade_ms)
conveyor.m_objs[i].alpha = 0;
else
//uses hardcoded default alpha values does not use wheel_a
//4 = middle one -> full alpha others use 80
if (i == 4)
conveyor.m_objs[i].alpha = (255 * (wheel_fade_ms - elapsed)) / wheel_fade_ms;
else
conveyor.m_objs[i].alpha = (80 * (wheel_fade_ms - elapsed)) / wheel_fade_ms;
}

if ( elapsed > wheel_fade_ms)
{
//So we don't keep doing the loop above when all values have 0 alpha
stop_fading = true;
}

  if (first_tick == -1)
first_tick = ttime;
}
}
fe.add_ticks_callback( "wheel_alpha" );
}

BadFurDay

  • Full Member
  • ***
  • Posts: 63
    • View Profile
Re: Conveyor_Helper Module for Themers: Updated - 11/15/2017
« Reply #29 on: November 15, 2017, 04:59:55 PM »
I fixed the wrong game issue, I changed the "spinList.item.count = 24;                      // OPTIONS: Total number of gamelist items to display" to an odd number and it works just fine. I can't get the wheel fade to work though, might this be something you would be interested in adding to the module itself? Brilliant work btw, don't think I said that yet.