The International Simutrans Forum

Development => Technical Documentation => Topic started by: jamespetts on August 12, 2012, 05:42:50 PM

Title: Shortcut key for narrow gauge?
Post by: jamespetts on August 12, 2012, 05:42:50 PM
I am trying to add "q" as the shortcut key for building narrow gauge track in Pak128.Britain-Ex, but am doing something wrong, as "q" ends up being bound to ordinary track instead.

Here is the existing menuconf.tab:


# railtools
toolbar[2][0]=ways(2,0)
toolbar[2][1]=ways(2,1)
toolbar[2][2]=bridges(2)
toolbar[2][3]=tunnels(2)
toolbar[2][4]=wayobjs(2)
toolbar[2][5]=signs(2)
toolbar[2][6]=general_tool[17],16,,2
toolbar[2][7]=general_tool[33],30,,2
toolbar[2][8]=buildings(33,2)
toolbar[2][9]=buildings(34,2)
toolbar[2][10]=buildings(35,2)
toolbar[2][11]=buildings(35,0)
toolbar[2][12]=general_tool[14],,t,2
toolbar[2][13]=general_tool[18],,e,2

# narrowgaugetools
toolbar[3][0]=ways(8,0)
toolbar[3][1]=ways(8,1)
toolbar[3][2]=bridges(8)
toolbar[3][3]=tunnels(8)
toolbar[3][4]=wayobjs(8)
toolbar[3][5]=signs(8)
toolbar[3][6]=general_tool[17],16,,8
toolbar[3][7]=buildings(33,8)
toolbar[3][8]=buildings(34,8)
toolbar[3][9]=buildings(35,8)
toolbar[3][10]=buildings(35,0)
toolbar[3][11]=general_tool[14],,t,2
toolbar[3][12]=general_tool[18],,e,2


I have modified this to replace the line "toolbar[3][11]=general_tool[14],,t,2" with "toolbar[3][11]=general_tool[14],,q,2". Before modifying it, "q" was unbound. Now, "q" is bound to standard gauge track.

I am rather confused, as I thought that "toolbar[3][11]=general_tool[14],,t,2" was the definition line for a the tool for laying narrow gauge track, and that the letter specified afterwards was the shortcut key for it. Is this not so?
Title: Re: Shortcut key for narrow gauge?
Post by: Lubak91 on August 12, 2012, 06:06:19 PM
"2" is number for track waytype, "8" is number for narrowgauge waytype...


toolbar[3][11]=general_tool[14],,q,8
Title: Re: Shortcut key for narrow gauge?
Post by: jamespetts on August 12, 2012, 09:23:39 PM
That works excellently - thank you very much.
Title: Re: Shortcut key for narrow gauge?
Post by: greenling on August 13, 2012, 04:17:50 PM
james do you rechange the menu struktur?
Title: Re: Shortcut key for narrow gauge?
Post by: jamespetts on August 13, 2012, 09:08:47 PM
No, the structure remains unchanged: I have simply added a shortcut key.
Title: Re: Shortcut key for narrow gauge?
Post by: greenling on August 13, 2012, 09:15:10 PM
Ok.
Thank you for you info.