Author Topic: Need your help with History.dat plugin  (Read 4124 times)

Arcadefan1

  • Full Member
  • ***
  • Posts: 27
    • View Profile
Need your help with History.dat plugin
« on: November 05, 2017, 08:15:55 AM »
Hi guys,
I want a second button to start the plugin. Like, press "button 1" OR  "button 2" to start the plugin. That's all. I looked at the plugin.nut file, but can't figure out how to do it.
Can someone show me a way to do it please?

And one more thing. Can I somewhere change the scroll speed of the text while browsing with the stick? It's a little too fast for my liking...

Thanks guys! :)

Arcadefan1

  • Full Member
  • ***
  • Posts: 27
    • View Profile
Re: Need your help with History.dat plugin
« Reply #1 on: November 05, 2017, 11:48:26 AM »
This is the relevant part of the code...

Code: [Select]
constructor()
{
base.constructor( config["button"] );

m_text = fe.add_text( "", 0, 0, fe.layout.width, fe.layout.height );
m_text.first_line_hint = 0; // enables word wrapping
m_text.charsize = fe.layout.height / config[ "rows" ].tointeger();
m_text.bg_alpha=220;
m_text.visible=false;
}




This is the line of code that I don't get... How do I modify it to accept another button?

Code: [Select]
base.constructor( config["button"] );

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Need your help with History.dat plugin
« Reply #2 on: November 05, 2017, 12:01:06 PM »
That's built-in to the plug-in.

Configure-->Plug-ins-->History.dat-->Control = <anything you want>

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Need your help with History.dat plugin
« Reply #3 on: November 05, 2017, 03:59:45 PM »
think the plan is to have multiple buttons, right? You'd have to do a bit more hacking, the submenu module that History.dat uses is designed for just 1 control button.. you could hack it into submenu maybe?

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Need your help with History.dat plugin
« Reply #4 on: November 05, 2017, 06:25:33 PM »
The plug-in can accept multiple keys/buttons by default. I tested and it worked for me.

liquid8d

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 442
    • View Profile
Re: Need your help with History.dat plugin
« Reply #5 on: November 05, 2017, 08:26:26 PM »
oh, right - just set it to custom1 and add multiple key inputs in settings -> controls - DUH  ;D

Does that work for you Arcadefan1?

Arcadefan1

  • Full Member
  • ***
  • Posts: 27
    • View Profile
Re: Need your help with History.dat plugin
« Reply #6 on: November 06, 2017, 11:50:12 AM »
Oh yes! It worked for me! Thanks guys! I had no idea about how to set costum controls. But I still don't know how to set the input button to "custom1" via the menu... I had to modify the attract.cfg file... but it works and that's the point! Thanks again.

Any chance you know a way to modify the scrolling speed of the text in history.dat plugin? I think it might be located in the submenu, but don't know where exactly...