Page 1 of 1

Icons in Main menu for em_usercmd

Posted: 2009-05-17, 16:58 UTC
by Mikefield
These days I made my first experiences with em_usercmd. I add some of it to the main menu.
Unfortunately it's not possible to show icons for these commands in the main menu.
If I add these commands to the button bar, the icons are shown correct.
Is it planned to show icons for em_usercmd in the main menu too?

Code: Select all

[em_usercmd609]
menu=Restart TC
cmd=ReloadTC.exe
button=D:\Util\Viewer\WinCmd\Plugins\Util\ReloadTC\ReloadTC.exe
path=%COMMANDER_PATH%\Plugins\Util\ReloadTC
mf

Posted: 2009-05-18, 13:00 UTC
by Sombra
2Mikefield

Hello,

Currently it is possible for em_xyz commands, but not in the way that we have in mind. Parameter "button=" for an extended command is ignored in main menu. Here a way for do it:
You can map icons for extended commands in the file WCMICONS.INC. The format is as follow:

Code: Select all

# Command -> Icon index for icons inside WCMICONS.DLL
I recommend to use WCICONEX.DLL and WCICONEX.INC instead WCMICONS.DLL & WCMICONS.INC. So you can avoid that files will be overwritten in a future update of TC or re-installation.

You must add your custom icons to WCICONEX.DLL (Any good icon editor is valid, although I know that Clo could recommend a very good icon editor ;) )
"Extended commands" in main menu takes the ID starting by the number 10000. Well, then the first extended command which appears in menu, have the ID 10000, the second em_xyz in main menu have the ID 10001, etc.

The content of your WCICONEX.INC should looks like:

Code: Select all

[mappings]
69=26
...
...
10000=#icon index in WCICONEX.DLL for the first extended command in main menu
10001=#icon index in...
HTH

Posted: 2009-05-18, 13:52 UTC
by Mikefield
Hello Sombra!
Thanks for your detailed answer! I've tried it and it works! Great!
Question: Points the mapping 10000 to the 1st command in the usercmd.ini or
to the 1st em_command in the which is found in the menu file?
How can I map the TC to use the WCMICONSEX.DLL and INC?

Last question, what is the magic icon editor which Claude recommended?
ADD: Found the answer on forum search -> something with Greenfish :)

mf

Posted: 2009-05-18, 17:00 UTC
by petermad
How can I map the TC to use the WCMICONSEX.DLL and INC?
Simply just place the two files in the TC program directory - then they will be used at next restart of TC.

Posted: 2009-05-18, 17:02 UTC
by Sombra
Hello Mikefield,

Points the mapping 10000 to the 1st command in the usercmd.ini or to the 1st em_command in the which is found in the menu file?
The ID 10000 is for the first extended command found in main menu. It don't care if the extended command is stored in usercmd.ini or in WCMD_<XXX>.ini.
<XXX> = Initials for the current language in TC. Perhaps you decide to use the usercmd.ini file for have access "always" to your custom commands (independently of the language used in TC .

How can I map the TC to use the WCMICONSEX.DLL and INC?
If you have not such files in main directory of TC, then you can copy
wcmicons.dll to > wciconex.dll
wcmicons.inc to > wciconex.inc

Last question, what is the magic icon editor which Claude recommended?
ADD: Found the answer on forum search -> something with Greenfish Smile
Yes it was :)

Posted: 2009-05-18, 17:11 UTC
by Mikefield
Thanks for clarification to both!

mf