Author Topic: text scroller  (Read 484 times)

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
text scroller
« on: October 24, 2018, 03:27:56 PM »
Hi guys I'm looking for a function that scrolls text.
This is what I made, but it's not smooth and it works only one time when AM starts, can someone tell me how to improve this code, or where I can find a better scroller?


local line = 0;      // delay (-1 increase delay)
fe.add_ticks_callback( this, "scroller" );
function scroller( tick_time ) {
   line += 0.01;   // speed
   history.first_line_hint = line;
}


Thank you!  :D

jedione

  • Hero Member
  • *****
  • Posts: 564
  • punktoe
    • View Profile
Re: text scroller
« Reply #1 on: October 24, 2018, 05:55:40 PM »
have you tried the      text scroll module ?

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

it too has its own flaws,   was never completed,    still impressive i think


ps by the way love the "art_by_category.nut"    im in the process of using it to
make a art_by_controler.nut   for showing consoles "joy pad" layout in theme,,,thanks
help a friend....

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: text scroller
« Reply #2 on: October 24, 2018, 10:45:13 PM »
Thanks You jedione for the link.
art by controller is a great idea, I would like to see it and using in a new theme!

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: text scroller
« Reply #3 on: October 24, 2018, 11:32:29 PM »
Giacomo what is art by category? Is it in one of your themes?

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: text scroller
« Reply #4 on: October 25, 2018, 01:36:52 AM »
It is a simple class that pics a png compared to the game genre, yes it is in my HUD theme, I've also made another one that pics an rgb color to change background and it is in my PREV NEXT theme

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: text scroller
« Reply #5 on: October 25, 2018, 02:01:38 AM »
have you tried the      text scroll module ?

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

I taked a look and yes very impressive but is missing the most important thing, the text word wrap.
The thing I'm looking for is a vertical scroller for long descriptions
« Last Edit: October 25, 2018, 02:34:18 AM by Giacomo1982 »

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: text scroller
« Reply #6 on: October 25, 2018, 02:33:45 AM »
It is a simple class that pics a png compared to the game genre, yes it is in my HUD theme, I've also made another one that pics an rgb color to change background and it is in my PREV NEXT theme

I'll have to look at it. I don't know how to program a class, but that's what I'm doing with my "art_by_manufacturer" logos :D

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: text scroller
« Reply #7 on: October 25, 2018, 02:39:49 AM »
How you don't know how to do a class if you done Arcadeflow!
It's absurd you're making a class so similar the mine in the same period, but I'm curious to see it when it's done.
I made also art by system it is similar to art by manufacturer but mkre flexible you can pic many kind of art like logo or foto. It is in prev next theme
Good work!
« Last Edit: October 25, 2018, 02:45:14 AM by Giacomo1982 »

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: text scroller
« Reply #8 on: October 25, 2018, 02:47:03 AM »
How you don't know how to do a class if you done Arcadeflow!

LOL I'm a spaghetti programmer :D I just borrowed Oomek carrier class and changed it, but I never got so deep in squirrel programming as to touch the "class" topic. I suspect that would make many things much easier...

Actually for my tool I'm not using a class but just a function that parses the manufacturer name and returns it, then I call this function with a magic token like fe.add_image("[!parsemanufacturer].png") and it works...

Giacomo1982

  • Full Member
  • ***
  • Posts: 45
    • View Profile
Re: text scroller
« Reply #9 on: October 25, 2018, 04:44:49 AM »
I maded a "function" version in prev versions, but it has word restricted limit, I mean if your system is called sega32x and inside layout the png has another name like 32x.png, the function doesn't  work, that's why I prefer using an array with different names of the same system (32x, sega32x, Sega 32x?) to increase the matching of display and png

zpaolo11x

  • Sr. Member
  • ****
  • Posts: 199
    • View Profile
Re: text scroller
« Reply #10 on: October 25, 2018, 05:36:53 AM »
I maded a "function" version in prev versions, but it has word restricted limit, I mean if your system is called sega32x and inside layout the png has another name like 32x.png, the function doesn't  work, that's why I prefer using an array with different names of the same system (32x, sega32x, Sega 32x?) to increase the matching of display and png

Sure, right now my solution is to replicate the same image, so sega.png and segaofamerica.png are in fact the same file, but it would be much better in your way, less redundancy of logos.

Well I'm still very busy finding, cleaning up and fixing (or faking ;D) obscure manufacturers logos :D :D :D