Author Topic: Scrolling text?  (Read 4759 times)

tjhooker

  • Newbie
  • *
  • Posts: 6
    • View Profile
Scrolling text?
« on: January 13, 2024, 02:32:29 PM »
Hi
I'm trying to display the game title using a fixed width led type font. Is it possible to somehow display characters 1-25 then 2-26 then 3-27 and so on to simulate a scrolling led display?
If the game title is 25 characters or less I would just want the name to be stationary.
Hopefully someone is able to help.
« Last Edit: January 19, 2024, 08:56:32 AM by tjhooker »

therick3

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Scrolling text?
« Reply #1 on: April 14, 2025, 01:20:16 PM »
I did a smooth vertical scroll on one of my layouts borrowing code from this post:

http://forum.attractmode.org/index.php?topic=300.0

My give you something to leap off from.

I grabbed something from a layout called Smooth.  here is my code:

// **Add in game description text box taken from Smooth Theme
// setup Overview text
// make the new surface

local surface = fe.add_surface(screenWidth*0.44, screenHeight*0.35  );
surface.x = screenWidth*0.52;
surface.y = screenHeight*0.58;

// put overview text on the new surface
local text = surface.add_text( "Year: [Year]\nPlayed Count: [PlayedCount]\nManufacturer: [Manufacturer]\n\n[Overview]", 0, 0, screenWidth*0.44, screenHeight );
text.word_wrap = true;
text.align = Align.TopLeft;
text.set_rgb (255, 255, 255);
text.charsize = 12;

//text.set_bg_rgb( 100, 100, 100 );
// uncoment the ubove line to visibley see the transparent text layer !
// so can u position and size in layout easier!

// calling "local text" in the animation     
local an = { when=Transition.ToNewSelection,
//local an = { when=Transition.StartLayout,
property="y",
start=text.y+200 ,
end=text.y-340,
time=20000
loop = true,
}
animation.add( PropertyAnimation( text, an ) );