Author Topic: ScrollingText module  (Read 25082 times)

arthurvalenca

  • Sr. Member
  • ****
  • Posts: 125
    • View Profile
Re: ScrollingText module
« Reply #15 on: June 27, 2018, 01:07:47 PM »
Thank you! I was able to correct the problem of the text going up, another problem that appears and that in the folder overview contains a .cfg file with a text of the description of the game, but the scroll is only reading three words, somebody knows how I can increase the number of words can the scroll read?

Dal1980

  • Full Member
  • ***
  • Posts: 54
    • View Profile
Re: ScrollingText module
« Reply #16 on: June 27, 2018, 03:02:21 PM »
Don't know if this helps but I ended up having an annoying problem with sending values created from functions over to the scrollingtext. It would either cull any text after the function call even if I had stored the value in a variable before including it in the string or stop all other variables from being populated and somehow write over existing string with a populated value much like how the insert key works on the keyboard. My only guess was that it picked up a new line "/n" or carriage return "/r" (which doesn't explain everything anyway) somewhere but even after sanitising data it still seemed to be an issue. I ended up leaving it alone and just working around the problem.

Code: [Select]
    //function simpleCat just spits out the first cat name from catver.ini
    function simpleCat( ioffset ) {
      local m = fe.game_info(Info.Category, ioffset);
      return split( m, " / " )[0];
    }

    local txtMarquee = "*** [Title] *** Manufactured by [Manufacturer] in [Year] *** Listed Category: [!simpleCat]";
    local scroller = ScrollingText.add( txtMarquee + " ***", flw*0.450, flh*0.001, flw*0.370, flh*0.055 );

    //the above produces something like the following
    //*** A game title *** Manufactured by SomeCo in 1980 *** Listed Category: Sports
    //notice even concatenating the extra 3 **** at the end does not show

    //but if I do this
    local txtMarquee = "*** [Title] *** Listed as [!simpleCat] and Manufactured by [Manufacturer] in [Year] *** Insert Coin";
    local scroller = ScrollingText.add( txtMarquee + " ***", flw*0.450, flh*0.001, flw*0.370, flh*0.055 );
    //I get weird results
    //*** A game title *** Listed as Sportsufactured by in *** Insert Coin ***
    //I've lost my [Manufacturer] and [Year] magic tokens


I don't think this will be a fix in your script, you may need to start pulling the scrollingtext module apart. Maybe someone could shed some light on this but for me I went with a cheap workaround for now.

arthurvalenca

  • Sr. Member
  • ****
  • Posts: 125
    • View Profile
Re: ScrollingText module
« Reply #17 on: July 11, 2018, 07:31:53 PM »
I had some result in scrolling the text up but still is not expected, it follows the scrolling code of the text as the photo shows, does anyone have a hunch?   



Code: [Select]
#------------------------------------------Overview---------------------------------------

::OBJECTS <- {
    logo = fe.add_text("[Overview]", flx*0.422, fly*0.85, flw*0.509, flh*0.56 ), 
}

local pac = {
    when = Transition.ToNewSelection,
property = "y",
start = fly*0.670,
end = fly*0.350,
tween = Tween.Linear,
time = 30000,
delay = 0,
loop = true
 }

animation.add ( PropertyAnimation( OBJECTS.logo, pac ) );
OBJECTS.logo.font = "zektonbo";
OBJECTS.logo.set_rgb ( 255, 255, 255 );
//OBJECTS.logo.set_bg_rgb ( 0, 80, 220 );
OBJECTS.logo.charsize = 14;
OBJECTS.logo.word_wrap = true;
OBJECTS.logo.align = Align.Centre;

Steven Campoli

  • Guest
Re: ScrollingText module
« Reply #18 on: October 08, 2018, 08:35:53 PM »
How do I use this?
I have the module but how do I make it work?
I also pasted it in the plugins folder and enabled it but still doesn’t work?

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: ScrollingText module
« Reply #19 on: October 09, 2018, 06:05:15 AM »
here is one i use a theme....
Code: [Select]
// srolling text game title
local scroller1 = ScrollingText.add( "[Title]", 0, 0, 300, 45, ScrollType.HORIZONTAL_LEFT );

//scroller1.set_bg_rgb(0, 220, 0, 150);
scroller1.set_rgb( 255, 0, 0 );
//scroller1.text.font = "time";
scroller1.text.charsize = 36;
scroller1.set_pos( 805, 208, 311, 30 );
scroller1.settings.speed_x = 1.9;
//fixed_width = 1000;
//scroller.settings.delay = 250;
//scroller.settings.loop = 5;

uncomment the font time and replace with your one font....peace
help a friend....

Steven Campoli

  • Guest
Re: ScrollingText module
« Reply #20 on: October 09, 2018, 05:17:48 PM »
Hey, thanks for the reply

Where do I paste this?
In the layout.nut file?

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: ScrollingText module
« Reply #21 on: October 09, 2018, 07:15:57 PM »
well yes ,, the layout.. :o
help a friend....

Steven Campoli

  • Guest
Re: ScrollingText module
« Reply #22 on: October 09, 2018, 07:26:57 PM »
Ok I’ll try this and get back to you tomorrow :)
Thanks again

Steven Campoli

  • Guest
Re: ScrollingText module
« Reply #23 on: October 10, 2018, 08:37:12 AM »
i pasted it in the layout file but nothing is happening...is thier something im missing? i just want the title and filters to scroll...