The attributes that control the color and scaling of a GMS icon are not part of the
gms-highlightable-icon subclass that defines the icon. Defining them in the icon subclass would force every menu entry to use a given GMS icon class in the same way. To provide greater flexibility, the attributes that configure GMS icon appearance are defined separately by each template that uses the icon.The necessary attributes could be specified in the template object itself, but this practice would burden every template with many attributes that typically are not needed. To prevent this:
Gms-inline-icon-description.
gms-icon-specification, defines all icon configuration attributes.
gms-icon-specification as the value of its Gms-inline-icon-description attribute.
gms-icon-specification specify any special configuration applicable to the icon.
gms-icon-specification.
To prepare to configure a menu entry's GMS icon:
Gms-inline-icon-class attribute specifies the class of the icon. The template's Gms-inline-icon-description attribute has the value none.
Gms-inline-icon-description attribute somewhere away from the current value of the attribute (none).
add optional-subtable > gms-icon-specification.
gms-icon-specification appears.
Gms-inline-icon-description is now a gms-icon-specification.
To reconfigure a menu entry's GMS icon:
Gms-inline-icon-class attribute specifies the class of the icon. The template's Gms-inline-icon-description attribute has the value a gms-icon-specification.
Gms-inline-icon-description attribute.
subtable
gms-icon-specification appears.
The rest of this chapter refers to a
gms-icon-specification as an icon configuration object, and assumes that such an object exists for each menu entry template for which icon configuration is needed. Default Highlightable Icon Colors
If you use a highlightable icon in a menu entry, and do not do anything to specify the color(s) that its foreground layer(s) should have, GMS uses the text colors defined in the current User Preferences object.
Specifying Highlightable Icon Colors
You can also specify foreground colors that differ from the text colors defined in the current User Preferences object.
To specify the color of the foreground layer(s) when an entry is enabled but not selected:
Specify the color as the value of the icon configuration object's Gms-icon-normal-color attribute.
To specify the color of the foreground layer(s) when an entry is selected:
Specify the color as the value of the icon configuration object's Gms-icon-highlighted-color attribute.
To specify the color of the foreground layer(s) when an entry is disabled:
Specify the color as the value of the icon configuration object's Gms-icon-disabled-color attribute.
none (the default). GMS then defaults to the relevant text color, as listed in the previous table.
foreground color of a highlightable icon to indicate the menu entry state. For example, suppose you needed a menu that offered a choice of colors by showing examples of them. You could:
GMS-HIGHLIGHTABLE-ICON subclass that is a square whose color is foreground.