Author Topic: Wheel help  (Read 2376 times)

clockman

  • Sr. Member
  • ****
  • Posts: 109
    • View Profile
Wheel help
« on: October 07, 2024, 01:20:51 PM »
So I am making a simple theme that has the video snap playing full screen in the back ground at 1280x1080. But I need help with is a scrolling wheel going across the bottom of the screen, and fades after a second or two while on a the game selection. Then fades back in when selecting a new game. Could some help with the wheel? do not know much about coding.
Here is a image a found with the kind of wheel I want.
« Last Edit: October 07, 2024, 01:33:27 PM by clockman »

justintime

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Wheel help
« Reply #1 on: October 11, 2024, 07:26:38 PM »
Fading wheels is probably the biggest ask in the forums including myself. For some reasons no one provided guidance on how to do this.  I know the AM hyper spin conversion layout does it though.  I can't figure out how it works.  I tried!

clockman

  • Sr. Member
  • ****
  • Posts: 109
    • View Profile
Re: Wheel help
« Reply #2 on: October 12, 2024, 11:22:06 AM »
Thanks for the reply, yes I see all these cool themes that they take down or they're in progress they say that they will release them but they never release them and very seldom will anybody reply on trying to help you figure something out.

tankman37

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Wheel help
« Reply #3 on: October 13, 2024, 03:27:43 AM »
fe.load_module("inertia");
fe.load_module("wheel");


local surface = fe.add_surface(1920, 1080);/// to suit your screen, you may have to adjust wheel slot positions, see below
surface.set_pos( 0,0)
surface.mipmap = true
local retro =
{
    function init()
    {
    slots <- 9
    speed <- 0900
    artwork_label <- "wheel"
    video_flags <- Vid.ImagesOnly
    x <- 200                 //gobal position of wheel
    y <- 900               //gobal position of wheel
    layout.y <- [ 140, 140, 140, 140, 120, 140, 140, 140, 140 ]
    layout.x <- [ -740, -410, -20, 360, 760, 1150, 1530, 1940, 1940 ]
    layout.width <- [ 300, 300, 300, 300, 350, 300, 300, 300, 300 ]                //////individual positions of wheel slots
    layout.height <- [ 100, 100, 100, 100, 150, 100, 100, 100, 100 ]
    layout.alpha <- [ 255, 255, 255, 255, 255, 255, 255, 255, 255 ]
    zorder <- 2
    anchor <- Wheel.Anchor.Bottom
    }
}   
local wheel = fe.add_wheel( retro,surface )

//////////animate wheel///////

   surface= Inertia( surface, 700,"alpha"); // the surface to fade 700=speed of fade

     function  surface( ttype, var, ttime )
     {
         if( ttype==Transition.StartLayout || ttype==Transition.ToNewSelection )
         {
             
                surface.alpha=255
          surface.to_alpha=0
          surface.delay_y=3000;      ///delay to fade=3s                  
         }

    }

fe.add_transition_callback( "surface" );
« Last Edit: October 13, 2024, 03:35:28 AM by tankman37 »

tankman37

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: Wheel help
« Reply #4 on: October 13, 2024, 03:31:31 AM »
You will need both the "wheel" and "inertia " modules. i use AM+, it's been a while since i have used plain AM so not sure if those modules come with it.
Best place for AM+ is disord

 https://discord.gg/v3DuVcaP

justintime

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Wheel help
« Reply #5 on: October 13, 2024, 08:45:22 PM »
Thanks for the code.  I tried it in both AM and AM+ and it does work, so as long as you get ALL the required modules, which took me a while...

I still would like to be able to do this using the basic modules for portability purposes.  Furthermore, I am really tied to the conveyor module as the basis for my wheel code (because I made extensive changes to customize the functionality to meet my needs), so if you have any ideas how to make the Conveyor class fade after x seconds, please let me know.  i have been trying for days!  :-\

Also, any idea if one can use the Animate module to animate the X positioning of the conveyor? (for example, to move the wheel out to the right and hide away when coming to/from a Transition.StartLayout or Transition.EndLayout.      Im trying to make it look like HyperSpin did as a challenge :)

justintime

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Wheel help
« Reply #6 on: October 14, 2024, 05:26:56 AM »
I've solved this using just the conveyor module and plain AM.

I will be releasing the code in the coming week or two with my new layout.  Fading works a charm!

justintime

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: Wheel help
« Reply #7 on: October 14, 2024, 03:38:36 PM »
Here is a preview of things to come!

https://youtu.be/XxKdkWYpGnc?feature=shared