Menu Sections:
|
- Girder Variables as Caption/Commandstring:
You can use girder variables in both the caption and commandstrings
which will be replaced with the variable values before the menu is opened.
Eg. Launch [thegame]=c:\games\[gamename].
Special case: Eg. [mycaptionvar]=fred. This would fail because the ini file interprets this as a
separate section. To fix this use a % sign before the variable (ONLY if the variable comes first):
Eg. %[mycaptionvar]=fred.
(The % sign is removed internally).
- Menuitem Caption: The inifile variable name specifies the caption for a menuitem.
- Menuitem Commandstring: The commandstring for the menuitem specifies what happens when it is triggered.
- Specifying Submenu to start:
By default, initial submenu is [main]. To specify initial submenu:
In the settings dialog, add a # followed by the submenu name to the ini file path.
Eg. menu file: F:\Program Files\girder\Plugins\osdmenu\samplemenu.ini#greatmenu would display a submenu called greatmenu.
-
Spacer/Blank Entry: You can create non-selectable menuitems which act as spacers within the menu. To do this you must specify the menuitem caption as #CMD: followed by any text you wish displayed, or one of the following keywords:
BLANK, LINETOP, LINEMID, LINEBOTTOM.
Eg. #CMD:LINETOP= would display a spacer with a horizontal line across the top of the space.
NOTE: The spacers are still treated as menuitems by the program logic. This means when you execute an item by number (keyboard or message) you must take into account the spacer (if the spacer entry is triggered the message is just dropped by osdmenu).
-
Tab character: You can use \t in the caption to shift all text after the \t to the right of the menu. This is useful for Title-Artist situations. It will display as (eg):
Titlexxx1 | - Artist |
Titlexxxxxx2 | - Artist |
|
Actions available for each menuitem: | Description |
Executing a file |
- Type the path to the file WITHOUT quotes:
Eg. c:\program files\winamp\winamp.exe
-
If you want to use parameter for the file add them on the end:
Eg. c:\program files\winamp\winamp.exe /ADD "e:\my playlists\myplaylist.m3u"
(Note that the filename in the parameters has been enclosed by quotes,
otherwise winamp would try and load it as two files - you'll have to experiment
to see whether the parameters need to be quoted or not).
-
NOTE: If the file is located in the plugins/osdmenu subfolder you can just specify the filename. Otherwise use full paths.
|
Triggering an event in Girder |
- OSDMenu can send events directly to Girder.
This is done by using # in a commandstring:
myevent=#[devicenum]#[event_string]#[payload]
[devicenum] - corresponds to the plugin device number which would be 18 for girderevent, or plugin id for any other.
[eventstring] - any eventstring you wish(that exists in girder).
[payload] - optional payload, referenced in girder by [pld1] -
if you don't want a payload simply omit the final #[payload] section.
-
You can assign custom eventstrings in Girder through the usual method, selecting 'Girder Events' from the dropdown box and clicking 'Learn Event'. Type the eventstring in the textbox.
|
Opening a submenu |
- To open another submenu add a % sign to the beginning of the commandstring.
Eg. newmenu=%mysubmenu.
-
You can also open submenus from another inifile in the same way:
Eg. anothermenu=%moremenus.ini#anothersubmenu.
|
Visual Sections:
|
-
Master visual section must be [visual].
-
For submenu specific visual settings use [vis_{submenu name}] -
Variables specifed here will override [visual] for that submenu.
-
Some variables are required, some optional.
|
Variable | Values | Description |
backcolor | {-1, $BBGGRR} | Use -1 for transparency, color value otherwise.
|
oncolor | {$BBGGRR} |
|
offcolor | {$BBGGRR} |
|
fontsize | {££} |
|
fontname | {any windows fontname} |
|
fontstyle | {bold, italic} | Any combination of the options can be used, separated by spaces.
|
textalign | {left, right, top, bottom, center} | specifies alignment of text on OSD.
|
wnd_pos | {topleft, topright, bottomleft, bottomright, screencenter} | specifies
onscreen position of osd (overrides wnd_left, wnd_top - set to any other value to ignore).
|
wnd_size | {fit2text, fullscreen} | Overrides wnd_width, wnd_height if used.
fit2text: Sets OSDMenu window to fit around text (+border etc.).
fullscreen: Sets OSDMenu window to screen size.
|
wnd_left | {££} | Overridden by wnd_pos if specified.
|
wnd_top | {££} | Overridden by wnd_pos if specified.
|
wnd_width | {££} | Overridden by wnd_size if specified.
|
wnd_height | {££} | Overridden by wnd_size if specified.
|
timeout | {-1, ££} | Time until menu closes (in seconds). Set to -1 for no timeout(menu will display until deactivated). |
startpos | {££} | Menu item which is selected when the menu starts. |
menustartposvar | {varname} | specify a girder variable to retrieve startpos var from
NOTE: This overrides the startpos var. |
bordercolor | {$BBGGRR} | Set this to a color value for a border of that color, or
leave blank to disable. |
itemsperscreen | {££} | Set this value to enable scrolling. If itemsperscreen is
smaller than the number of items in the menu it will create a scrolling
menu. |
onbackcolor | {$BBGGRR} | Set this to a color value to highlight selected entry or
leave blank to disable. Doesn't work with transparency. |
closeonexecute | {0,1} | Specifies whether menu closes when command is executed or
not - useful for adjustments menus (such as hue/saturation...). When set
to 0 close the menu by:
a)wait for timeout;
b)Goto submenu which has closeonexecute set to 1;
c)create a menuitem that executes a girder command to start the same menu
- this will close it since it is already running.
|
autoexecute | {any commandstring} | Set this to a commandstring you want to execute as the submenu is displayed. |
title | {title string} | Set this to a string you want displayed as a menu title, or leave blank for no title. Titles work best when textalign is set to 'top' |
titlefontname | {any available windows font} | |
titlefontstyle | {bold, italic} | Any combination of the options can be used, separated by spaces.
|
titlefontsize | {££} | Set this to a commandstring you want to execute as the submenu is displayed. |
titlefontcolor | {$BBGGRR} | Set this to a color for the title. |
spacercolor | {$BBGGRR} | Set this to a color for the line spacers. |