# Fighter Factory Studio - Reference Documentation

For problems and bug report, go to VirtuallTek Game Studios web site. For doubts related to some specific engine, go to their own web pages or community forums.

# Preset system

The Preset system controls the interface of Fighter Factory. Within this sysem, all buttons, sliders, ..., are placed in the desired position.

This file is written in Lua.

Fighter Factory supports a large set of widgets and some classes to change them, as described bellow:

# Lua Enumerations

## FF.Align

FF.Left

FF.HCenter

FF.Right

FF.Top

FF.VCenter

FF.Bottom

# Lua classes

## FF.Toolbar

A toolbar that contains a set of icons that can trigger functions.

### Properties

iconSize: changes the size of icons in this toolbar.

### Functions

addButton(string): appends a button to execute the function specified by first argument. The string argument can be any action of Fighter Factory. To see all possible actions, go to Iconset.

addSeparator(): appends a separator (vertical line).

## FF.Panel

A panel that contains other widgets and has a title.

### Properties

layout: controls the panel layout (FF.Layout).

## FF.Control

A widget.

### Functions

size(int, int): changes the size of the widget (width, height).

icon(int): changes the size of the icon (for button controls).

flat(): setup button appearance to be flat, without depth.

horizontal(): set slider orientation to horizontal.

vertical(): set slider orientation to vertical.

align(int, int): appends a separator (vertical line).

## FF.Layout

Control widget alignment, size and spacing.

### Properties

spacing: manage layout's spacing between widgets.

margin: manage the margins from the edges of parent widget.

## FF.GridLayout

Control widget alignment, size and spacing in a uniform grid.

### Functions

addLayout(layout, row, column) / addLayout(layout, row, column, rowSpan, colSpan): adds another 'layout' in the grid specified by 'row', 'column'. 'rowSpan' and 'colSpan' can optionally be set to extend the item to next cells. All values are integer.

addControl(name, row, column) / addControl(name, row, column, rowSpan, colSpan): adds a control (widget) in the grid specified by 'row', 'column'. 'rowSpan' and 'colSpan' can optionally be set to extend the item to next cells. All values are integer. 'name' must be a valid control. See Controls for details.

addVerticalSpacer(row, column) / addHorizontalSpacer(row, column): adds a spacer that extends to the edge of the panel, in the direction specified by the function name. All values are integer.

## FF.VerticalLayout / FF.HorizntalLayout

Control widget alignment, size and spacing in a single direction. Each child control will fill the entire length of that direction, and will be displayed in the order they were added.

### Functions

addLayout(layout): adds another 'layout'.

addControl(name): adds a control (widget). 'name' must be a valid control. See Controls for details.

addSpacing(size): adds a blank space of 'size'.

addVerticalSpacer() / addHorizontalSpacer(): adds a spacer that extends to the edge of the panel, in the direction specified by the function name.

# Lua functions

## FF.toolBar(string)

Returns an instance of an interface toolbar, by name.

Return value: 'FF.ToolBar' class

## FF.panel(string)

Returns an instance of an interface panel (the left ones), by name.

Return value: 'FF.ToolBar' class

## FF.extraPanel(string)

Returns an instance of an interface panel (the right ones), by name.

Return value: 'FF.Panel' class

## FF.gridLayout()

Returns a new instance of FF.GridLayout. 'margin' and 'spacing' are set to 0.

Return value: 'FF.GridLayout' class

## FF.horizontalLayout()

Returns a new instance of FF.HorizontalLayout. 'margin' and 'spacing' are set to 0.

Return value: 'FF.HorizontalLayout' class

## FF.verticalLayout()

Returns a new instance of FF.VerticalLayout. 'margin' and 'spacing' are set to 0.

Return value: 'FF.VerticalLayout' class

# Controls

Any other supported interface widget, manageable by FF.Control class.

Some controls have additional functions:

Button: 'flat' and 'icon'. Buttons are treated in the same way as the toolbar ones, then you can use any action supported by toolbars as 'name' (except the ones prefixed with 'advpal').

Label: 'align'.

Slider: 'horizontal' and 'vertical'".

All supported controls are listed below, except those listed for buttons (see Iconset for more details).

Here, we will use the notation: "ctrl_name: Widget; Description".

For controls that are editor-dependent, we use a underlined ctrl_name. When the user activates one of these controls, the program will switch to the editor of the control's preffix. Eg.: 'spr_sel' will switch to the sprites editor even if used in another editor. Most of the actions listed in the Iconset section are editor-dependent.

## All engines

spr_sel: Slider; Current sprite selector.

spr_sel_lb: Label; Current sprite (current index / count).

pal_sel: Slider; Current palette selector.

pal_sel_lb: Label; Current palette (current index / count).

pal_view: Palette; Palette widget.

air_sel: Slider; Current animation selector.

air_sel_lb: Label; Current animation (current index / count).

air_frame_lb: Label; Animation frame.

air_frame_sel: Slider; Animation frame selector.

air_frame_sel_lb: Label; Current frame position (current index / count - tick count).

air_frame_xaxis_lb: Label; Frame's x axis.

air_frame_xaxis: IntEdit; Frame's x axis.

air_frame_yaxis_lb: Label; Frame's y axis.

air_frame_yaxis: IntEdit; Frame's y axis.

air_pos_left: Button; Move the frame's position 1px to the left.

air_pos_up: Button; Move the frame's position 1px up.

air_pos_right: Button; Move the frame's position 1px to the right.

air_pos_down: Button; Move the frame's position 1px down.

air_frame_time_lb: Label; Frame's time.

air_frame_time: IntEdit; Frame's time.

air_frame_flip_lb: Label; Frame's flip effect.

air_frame_flip: ComboBox; Frame's flip effect.

air_frame_loop: CheckBox; Start loop in the current frame.

air_frame_xscale_lb: Label; Frame's x scale.

air_frame_xscale: FloatEdit; Frame's x scale.

air_frame_yscale_lb: Label; Frame's y scale.

air_frame_yscale: FlotEdit; Frame's y scale.

air_frame_angle_lb: Label; Frame's angle.

air_frame_angle: FloatEdit; Frame's angle.

snd_sel: Slider; Current sound selector.

snd_sel_lb: Label; Current sound position (current index / count).

snd_info_lb: Label; Sound information (Channels, sample rate, bit count, duration).

org_list: ListView; Orginizer list.

thumb_view: ListView; Thumbnail container.

## M.U.G.E.N.

def_tree: TreeView; Hierarchical list of groups in the definitions document.

cmd_tree: TreeView; Hierarchical list of groups in the commands document.

st_tree: TreeView; Hierarchical list of groups in the states document.

spr_grp_lb: Label; Sprite group.

spr_grp: IntEdit; Sprite group.

spr_num_lb: Label; Sprite index.

spr_num: IntEdit; Sprite index.

spr_xaxis_lb: Label; Sprite x axis.

spr_xaxis: IntEdit; Sprite x axis.

spr_yaxis_lb: Label; Sprite y axis.

spr_yaxis: IntEdit; Sprite y axis.

spr_prev_grp: Button; Previous sprte group.

spr_next_grp: Button; Next sprite group.

spr_pos_left: Button; Move sprite 1px to the left.

spr_pos_up: Button; Move sprite 1px up.

spr_pos_right: Button; Move sprite 1px to the right.

spr_pos_down: Button; Move sprite 1px down.

spr_dec_load: CheckBox; Decompress sprite on load.

spr_trans_color: CheckBox; Displays the transparency color.

spr_switch_pal: CheckBox; Switch to the sprite palette.

spr_info_lb: Label; Sprite's image information (size, format and sharing).

spr_onion_skin: CheckBox; OnionSkin activation.

spr_onion_sel: Slider; Current OnionSkin sprite selector.

spr_onion_lb: Label; OnionSkin position.

pal_grp_lb: Label; Palette group.

pal_grp: IntEdit; Palette group.

pal_num_lb: Label; Palette index.

pal_num: IntEdit; Palette index.

pal_prev_grp: Button; Previous group.

pal_next_grp: Button; Next group.

anim_number_lb: Label; Animation number.

anim_number: IntEdit; Animation number.

anim_name_lb: Label; Animation name.

anim_name: TextEdit; Animation name.

anim_frame_grp_lb: Label; Frame's sprite group.

anim_frame_grp: IntEdit; Frame's sprite group.

anim_frame_num_lb: Label; Frame's sprite index.

anim_frame_num:IntEdit; Frame's sprite index.

anim_frame_trans_lb: Label; Frame's transparecy.

anim_frame_trans: ComboBox; Frame's transparecy type.

anim_frame_transsrc_lb: Label; Alpha source.

anim_frame_transsrc: IntEdit; Alpha source.

anim_frame_transdst_lb: Label; Alpha destination.

anim_frame_transdst: IntEdit; Alpha destination.

anim_frame_loop: CheckBox; Start loop in the current frame.

anim_frame_intp: Label; Frame interpolation.

anim_frame_intp_offset: CheckBox; Interpolate offset.

anim_frame_intp_blend: CheckBox; Interpolate blend.

anim_frame_intp_scale: CheckBox; Interpolate scale.

anim_frame_intp_angle: CheckBox; Interpolate angle.

snd_grp_lb: Label; Sound group.

snd_grp: IntEdit; Sound group.

snd_num_lb: Label; Sound index.

snd_num: IntEdit; Sound index.

snd_prev_grp: Button; Previous group.

snd_next_grp: Button; Next group.

thumb_grp_list: ComboBox; Sprite group list.