The International Simutrans Forum

 

Author Topic: [r9531] script tool icon is not shown when menu key contains ")"  (Read 543 times)

0 Members and 1 Guest are viewing this topic.

Offline THLeaderH

  • Coder/patcher
  • Devotee
  • *
  • Posts: 424
  • Languages: JP,EN
In r9531, the script tool icon is not shown in menubar when the menu key of the script tool contains ")" character. This is just a parsing problem and should be fixed with the attached patch.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10567
  • Languages: De,EN,JP
Re: [r9531] script tool icon is not shown when menu key contains ")"
« Reply #1 on: January 09, 2021, 12:36:30 PM »
I do not think that get_sound will work with that too. So maybe a little more effort is needed. Still submitted this, thank you.

Offline THLeaderH

  • Coder/patcher
  • Devotee
  • *
  • Posts: 424
  • Languages: JP,EN
Re: [r9531] script tool icon is not shown when menu key contains ")"
« Reply #2 on: January 09, 2021, 01:16:25 PM »
script_tool_manager_t::fill_menu() does not take sound parameter. To be precise, the function ignores the sound argument.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10567
  • Languages: De,EN,JP
Re: [r9531] script tool icon is not shown when menu key contains ")"
« Reply #3 on: January 09, 2021, 01:50:10 PM »
But it should be possible to connect a sound to it, I think.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4863
  • Languages: EN, DE, AT
Re: [r9531] script tool icon is not shown when menu key contains ")"
« Reply #4 on: January 09, 2021, 02:55:55 PM »
This parameter is ignored in all these fill_menu methods.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10567
  • Languages: De,EN,JP
Re: [r9531] script tool icon is not shown when menu key contains ")"
« Reply #5 on: January 10, 2021, 12:12:32 PM »
Probably the get_sound() call should go then as well. Although building definitively makes noise.