Ai ref image layouts

From VASSAL
Jump to: navigation, search

AutoImage Reference Manual

AutoImage > Reference > Auto Images > Layouts

Image Layouts

Imagelayout.png

An Image Layout defines the general look and layout of the components that make up a set of counters. Specific color and text information is defined for individual counter images in an Image Definition.

An Image is built up by drawing in order:

  1. A rectangle of the background color.
  2. The selected border.
  3. Each defined item in the order displayed in the Item panel.


Options

Imagelayoutoptions.png
Name: The name of the Image Layout.
Counter Width: The width of all counters created using this layout.
Counter Height: The height of all counters created using this layout.
Border Style: The border style for all counters created using this layout. Border styles currently available are:

  • None - No Border
  • Plain - Single pixel line of defined color.
  • Fancy - Two pixel shaded line of defined color. Mild 3D effect.
  • 3D - Java 3DRECT style shaded border. Two pixels wide, colour automatically determined from background color.

Visualizer

Imagelayoutvisualizer.png
The next section conatains a visualizer, showing you in actual size what your finished counter will look like. No colors or text have been defined yet, so the image is in black and white and shows sample text only.

Item List

Imagelayoutitems.png
The Items panel shows the list of defined items for this Layout. Layout items are drawn onto the counter image in the order specified. Click on an item in the panel to display and edit its attributes in the lower display panel.

Buttons

Imagelayoutbuttons.png
Use the buttons to add, remove or move Items in the list.

  • Symbol - Add a NATO Unit Symbol.
  • Text - Add a Text label.
  • Image - Add an image from the module images directory.
  • Shape - Draw and color fill a rectangle, rounded rectangle or oval.
  • Remove - Remove the selected Item.
  • Up - Move the selected Item up the list (i.e. draw earlier).
  • Down - Move the selected Item down the list (i.e. draw later).


Symbol Item

Symbolitem.png

Name: The name of the Item. Items MUST be uniquely named within an Image Layout.
Location: Select the location of the item on the counter.
Symbol Set: Select the Symbol Set to use. Only Sysmbol set available currently is NATO Unit Symbols.
Width: The width of the body of the symbol in pixels.
Height: The height of the body of the symbol (not including the Size specifier) in pixels.
Line Width: The width of the line (in pixels)used to draw the symbol. Fractional line widths can be used. The lines are drawn with antialiasing turned on to produce smooth looking lines of any width. When using a small symbol size, a line width of 1.0 will usually give the best results.

Text Items

The current value of Text Items can be accessed from other VASSAL components as a Marker value by prefixing the text item name with AI_ and using that as the marker value.

For example, to display the current value of the Text Item HP in a text label, you could specify the text label text as

 Current Hit Points: $AI_HP$


Variable Text Item

Imagelayouttext1.png

A Variable Text item specified a place holder for a label on the counter. The actual text to be displayed is specified when you create the individual Image Definitions.

Name: The name of the Item. Items MUST be uniquely named within an Image Layout.
Location: Select the location of the item on the counter.
Font Style: Select the name of the Font Style to be used for this Text Item.
Alignment: Select the alignment for the text (Left, Center, Right) relative to the selected location.
Label Source: Select the Source of the text for this item:

  • Variable - Text defined within each Image Definition.
  • Fixed - Fixed text used on all Images.
  • Command - Text specified by the user.

Counter Name Format: Specify how the label text for this Text item is added to the name of the counter. $pieceName$ is replaced by the name of the counter without this text item. $label$ is replaced by the text of this Text Item.

Fixed Text Item

Imagelayouttext2.png

A Fixed Text Item displays the same on text on all Images defined using this layout. Most options are the same as for a Fixed Text Item.

Label: Enter the fixed text to be displayed on all Image Definitions.

Command Text Item

Imagelayouttext3.png

A Command Text Item is similiar to a Variable Text Item, but allows module designers and users to change the text displayed in this item. The text can also be optionally locked so that no further changes are possible. Once the text is locked on a counter, no more changes are possible and the Change Label and Lock label commands no longer appear on the right-click menu.

Use Command Text Items to create multiple copies of units that differ only in unit Id, set the Unit Id on each, then lock the unit id in place. Use the report Format to generate different names for each counter (e.g. use '$pieceName$-$label$').

Change Label Command Name: The Keyboard command name that will appear in the right-click menu to change the text on the counter.
Change Label Keyboard Command: The shortcut key to change the text on the counter
Lockable?: Click on to allow the counter text to be locked.
Lock Label Command Name: The keyboard command name that will appear in the right-click menu to lock the counter text.
Lock Label Keyboard Command: The Shortcut key to lock the text on the counter.


Image Item

Imageitem.png

Name: The name of the Item. Items MUST be uniquely named within an Image Layout.
Location: Select the location of the item on the counter.
Image: The name of the image file to use. Use the File Open Dialog box to locate a copy of the image you wish to use on your PC. When you save the module, VASSAL will attempt to copy this image into the images folder within the module zip file. You can also manually copy images into your images folder.


Shape Item

Shapeitem.png
Name: The name of the Item. Items MUST be uniquely named within an Image Layout.
Location: Select the location of the item on the counter.
Width: The width of the shape in pixels.
Height: The height of the shape in pixels.
Shape: The shape to draw. Select an option from:

  • Rectangle - A rectangle with square corners.
  • Rounded Rectangle - A rectangle with rounded corners.
  • Oval - An oval or circle shape.

Bevel: For Rounded Rectangles, the radius of the corner in pixels.


Advanced Options

Advancedoptions.png

Advanced Options: Click on to reveal additional Advanced Options.
X Offset: Offset the item from the standard Location by this number of pixels in the X axis (left/right).
Y Offset: Offset the item from the standard Location by this number of pixels in the Y axis (up/down).
Rotation: For Symbol and Text Items, rotate the item by this number of degrees about its' center before display.
Antialias? Option to turn Antialiasing off when drawing this item.





Sub Components

Image Definitions

Image Definitions define the colors and text to use to create a specific instance of a counter based on an Image Layout. Right-click on an Image Layout and select 'Add Image Definition'.