Overlays

From MegaZine3
Jump to navigation Jump to search
{{#if: Overlays.jpg | }} {{#if: | }}{{#if: * overlays.swf | }}{{#if: * Links | }}
Plugin: Overlays
Overlays.jpg
Name Overlays
Since version

{{{version}}}

Files
  • overlays.swf
Related plugins

This plugin allows to use overlays on elements. An overlay can be a simple color overlay, or a border overlay (e.g. border glow). An overlay can have default alpha value, and a mouse over value.

Plugin interactions

The Links plugin can automatically add a border overlay to linked elements. This can be suppressed by individually assigning the linked element an empty overlay attribute (overlay=""), or globally by setting the book@linksoverlay attribute to false.

Settings

This plugin uses or defines the following settings.

== overlayfade =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: 250 |
  • Default: 250}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Time in milliseconds it takes for an overlay to fade between normal and mouseover states.{{#if: |

  • See also: {{{see}}}}}

Attributes

Element

=== overlay ==={{#if: Definition |

  • Type: Definition}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: |
  • Default: {{{default}}}}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Determines the overlay type when the element is hovered. The basic structure of the allowed values for this attribute is as follows:

type(normal, hover, attr1, attr2, ...); type(normal, hover, attr1, ...)

Please note that attributes (in brackets) may be omitted. Each overlay has attributes, the basic ones valid for all overlays being the alpha values for the normal and hovered states:

  • normal
    • The normal alpha, when the object is not hovered.
  • hover
    • The alpha when the object is hovered.

Other parameters depend on the overlay type. Available overlays are currently color and border. Their specific attributes are

Color overlay

  • color
    • The color of the overlay. This should be a value between 0 and 0xFFFFFF.

Border overlay

  • type
    • The type of the border. Available types are: glow, solid, dotted. They currently all have the same additional attributes:
      • color
        • The color of the border. This should be a value between 0 and 0xFFFFFF.
      • size
        • The size/width of the border. Can be any positive number.

Multiple overlay types may be set by separating them with semicolons (;). Examples:

  • color(0.5,1,0xFF0000)
  • border(0,1,dotted)
  • border(0.6,0.9,glow,0xFFFF00,8)
  • border(0,0.75,solid,0xFF0000,3);color(0.25,0.5,0x6699CC);border{{#if: |
  • See also: {{{see}}}}}

== overlayfade =={{#if: Number |

  • Type: Number}}{{#if: |
  • Valid values: {{{valid}}}}}{{#if: book@overlayfade |
  • Default: book@overlayfade}}{{#if: |
  • Overrides: {{{overrides}}}}}{{#if: |
  • Aliases: {{{alias}}}}}{{#if: |
  • Version: {{{version}}}}}

Time in milliseconds it takes for an overlay to fade between normal and mouseover states. Can be used to specify the fade time for one specific element.{{#if: |

  • See also: {{{see}}}}}

Examples

<book plugins="overlays">
    <chapter>
        <page>
            <img src="cover.jpg" overlay="color(0,0.5,0xff9900);border"/>
        </page>
    </chapter>
</book>
MegaZine3 Plugin-related articles
Plugins Anchors · Background Sounds · Batchpages · Bookmarks · Console · ElementIDs · Gallery · Google Analytics · Help · JavaScript · Keyboard Navigation · Links · NavigationBar · Options · Overlays · Password · PDFLinks · Print · PrintPDF · SWFAddress· Search · Sidebar · Slideshow · Titles
Plugin Articles Writing a plugin · Writing a plugin II · Plugin development

{{#if: | |}}