Module:ButtonBar

From PanoZona

Contents

ButtonBar
Author Marek Standio
Module version 1.3
Compatibility SaladoPlayer 1.0 +

ButtonBar is module for easy creation of standard panorama navigation. You can style your navigation buttons with custom buttons bitmaps, add bacground bar with any color or bitmap fill, move around panorama window all buttons or single buttons individually. You can easily extend navigation with additional buttons with apearience and functionalities of your choice.

Configuration structure

Configuration details

ButtonBar

Attribute TypeSub-attribute TypeDefaultValuesDescription
path S - - path to swf file Mandatory attribute. Value points to module swf file.

window

Attribute TypeSub-attribute TypeDefaultValuesDescription
open B - true true, false Determines visibility of module window on SaladoPlayer start.
alpha N - 1.0 0.1 to 1.0 Transparency of module window content.
align O horizontal S right left, center, right Horizontal alignment of module window against panorama window.
vertical S bottom top, middle, bottom Vertical alignment of module window against panorama window.
move O horizontal N -5 - Number of pixels module window is moved horizontally.
vertical N -5 - Number of pixels module window is moved vertically.
transition O type S slideDown fade, slideUp, slideDown, slideLeft, slideRight Determines kind of transition used when module window is opening/closing.
openTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is opening.
time N 0.5 - Duration in seconds of module window opening animation.
closeTween O transition F Linear.easeNone avaible functions Determines type of animation used when module window is closing.
time N 0.5 - Duration in seconds of module window closing animation.
onOpen S - - action id Action executed when module window changed state to closed.
onClose S - - action id Action executed when module window changed state to opened.

buttons

Attribute TypeSub-attribute TypeDefaultValuesDescription
path S - - path to image file Mandatory attribute. Value points to image file with bitmaps grid containing bitmaps for all buttons. There is no restriction for overall grid size, but it has to be formated properly. All bitmaps in grid have to be of the same size. Grid has to contain 4 rows and 9 columns with inner borders of 1 px. Two first rows contain bitmaps for hard coded buttons, and their sequence in grid cannot be changed. Two other rows contain bitmaps for extraButtons and can be filled with any content.
spacing N - 0 - Distance between buttons.
listenKeys B - false true, false When set to true, module reflects pressing keyboard arrows and zoom keys (shift and ctrl) by setting proper buttons state to active.

button

Attribute TypeSub-attribute TypeDefaultValuesDescription
name S - - up, down, left, right, in, out, drag, autorotation, fullscreen Mandatory attribute. You can set more than one button. Buttons use first and second row of buttons bitmaps grid, button of given name uses bitmaps from specific column. Buttons have basic virtual tour interface functionalities which are hard-coded into module. You can configure direction and zoom buttons parameters with keyboard attribute.
move O horizontal N NaN - When set to other value than NaN, determines number of pixels button is moved horizontally, beginning from first button.
vertical N NaN - When set to other value than NaN, determines number of pixels button is moved vertically, beginning from first button.
mouse O onOver S - action id Action executed when mouse cursor is moved over button.
onOut S - action id Action executed when mouse cursor is moved out from button.

extraButton

Attribute TypeSub-attribute TypeDefaultValuesDescription
name S - - a, b, c, d ,e, f, g, h, i Mandatory attribute. You can set more than one extraButton. ExtraButtons use bitmaps from third and fourth row of buttons bitmap grid, given button will use bitmpas pointed by its name. For instance: name "a" will result in using bitmaps from first column, name "b" will use second column, ect.
action S - - action id Mandatory attribute. Clicking on button will result in execution of action of specific id.
move, mouse - - - - See attributes in button.

Functions

setOpen

TypeDescriptionFunction description
B Value assigned to open attribute. Opens/closes bar window on demand. Opening window once window is opened makes no effect, same thing for closing window.

toggleOpen

TypeDescriptionFunction description
- - Calling this function toggles bar window open state. If called when window is opened it closes window, same thing other way around.

setActive

TypeDescriptionFunction description
S Name of extraButton. Function sets state of extraButton of given name (a, b, c, d, e, f, g, h, i) to given state. In case when passed value is "true", button changes state to active, when passed value is "false", button changes state to plain.
B State of extraButton.