Documentation ¶
Index ¶
- Constants
- func ColorFromStringOrDefault(s string, d color.Color) color.Color
- func CropToContent(i image.Image) image.Image
- func DrawGuides(s *Settings) (*image.Image, error)
- func Merge(d *Settings, s2 Settings, opt ...func(*mergo.Config)) error
- func Mergev2(d *Settings, s *Settings) error
- func SetColors(s *Settings)
- func TestImageContent(t *testing.T, expectedImagePath string, expectedImageLength int, ...)
- func ValidateSchemaAtPath[S CounterTemplate | CardsTemplate](inputPath string) error
- func ValidateSchemaBytes[S CounterTemplate | CardsTemplate](docByt []byte) error
- func ValidateSchemaReader[S CounterTemplate | CardsTemplate](r io.Reader) error
- type Board
- type BoardPicker
- type CSVTemplateData
- type Card
- func (c *Card) EncodeImage(w io.Writer, t *CardsTemplate) error
- func (c *Card) GetAreasHeights() (hs []float64)
- func (c *Card) Image(template *CardsTemplate) (image.Image, error)
- func (c *Card) ProcessAreav2(area *Counter, t *CardsTemplate, calculatedAreaHeight int, isLastArea bool) (*gg.Context, error)
- func (c *Card) ToCanvas(template *CardsTemplate) (*gg.Context, error)
- type CardTransformer
- type CardsExtra
- type CardsTemplate
- type Counter
- func (c *Counter) Canvas(withGuides bool) (*gg.Context, error)
- func (c *Counter) EncodeCounter(w io.Writer, drawGuides bool) error
- func (c *Counter) GenerateCounterFilename(sideName string, position int, filenamesInUse *sync.Map)
- func (c *Counter) GetTextInPosition(i int) string
- func (c *Counter) ToVassal(sideName string) error
- type CounterPrototype
- type CounterTemplate
- type CounterToCardTransformer
- type CounterTransfomer
- type Counters
- type DiceButton
- type Event
- type Extra
- type FileContent
- type HexGrid
- type Image
- type ImageExtraData
- type ImagePrototype
- type Images
- type ListWidget
- type Map
- type PanelWidget
- type PieceSlot
- type PieceSlots
- type PieceTemplateData
- type PieceWindow
- type Positioner
- type Quote
- type Quotes
- type Settings
- type SettingsGetter
- type TabWidget
- type Text
- type TextPrototype
- type Texts
- type VassalCounterTemplateSettings
- type VassalFileModuleData
- type VassalGameModule
Constants ¶
const ( DEFAULT_FONT_HEIGHT = 15.0 DEFAULT_MARGINS_DISTANCE = 10 DEFAULT_COUNTER_WIDTH = 200.0 DEFAULT_COUNTER_HEIGHT = 200.0 DEFAULT_MODE = "tiles" TEMPLATE_MODE_TILES = "tiles" TEMPLATE_MODE_TEMPLATE = "template" DEFAULT_FONT_COLOR string = "black" DEFAULT_BACKGROUND_COLOR string = "white" CARD_AREA_FRAME_WIDTH = 4 DEFAULT_CARD_MARGINS_DISTANCE = 10 DEFAULT_IMAGE_MARGINS_DISTANCE = 10 DEFAULT_TEXT_BOX_MARGINS = 10 DEFAULT_IMAGE_WIDTH = 800.0 DEFAULT_IMAGE_HEIGHT = 1200.0 DEFAULT_BORDER_WIDTH = 20 DEFAULT_BORDER_COLOR = "white" IMAGE_SCALING_FIT_NONE = "none" IMAGE_SCALING_FIT_WIDTH = "fitWidth" IMAGE_SCALING_FIT_HEIGHT = "fitHeight" IMAGE_SCALING_FIT_WRAP = "wrap" ALIGMENT_LEFT = "left" ALIGMENT_RIGHT = "right" ALIGMENT_CENTER = "center" BASE_FOLDER = "TemplateModule" STRIPE = "assets/stripe.png" VassalInputXmlFile = "template.xml" VassalOutputXmlFile = BASE_FOLDER + "/buildFile.xml" )
const ( FileContent_CounterTemplate = iota FileContent_CardTemplate FileContent_Events FileContent_Quotes FileContent_CSV FileContent_JSON )
const ( // Template_VassalPiece = `+/null/prototype;UnitStep prototype;RU\ emb2;Activate;128;A;;128;;;128;;;;1;false;0;0;{{ .FrontFilename }},{{ .BackFilename }};,;false;{{ .PieceName }};;;true;StepValue;1;1;true;65,130;;;;1.0;;true\\ piece;;;{{ .FrontFilename }};{{ .Id }}/ \ 1\\ null;0;0;398;0` Template_NewVassalPiece = `` /* 247-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func TestImageContent ¶
func ValidateSchemaAtPath ¶
func ValidateSchemaAtPath[S CounterTemplate | CardsTemplate](inputPath string) error
func ValidateSchemaBytes ¶
func ValidateSchemaBytes[S CounterTemplate | CardsTemplate](docByt []byte) error
func ValidateSchemaReader ¶
func ValidateSchemaReader[S CounterTemplate | CardsTemplate](r io.Reader) error
Types ¶
type BoardPicker ¶
type BoardPicker struct { XMLName xml.Name `xml:"VASSAL.build.module.map.BoardPicker"` Text string `xml:",chardata"` AddColumnText string `xml:"addColumnText,attr"` AddRowText string `xml:"addRowText,attr"` BoardPrompt string `xml:"boardPrompt,attr"` SlotHeight string `xml:"slotHeight,attr"` SlotScale string `xml:"slotScale,attr"` SlotWidth string `xml:"slotWidth,attr"` Title string `xml:"title,attr"` Board Board `xml:"VASSAL.build.module.map.boardPicker.Board"` }
type CSVTemplateData ¶
type Card ¶
type Card struct { Settings Areas []Counter `json:"areas,omitempty"` Texts Texts `json:"texts,omitempty"` Images Images `json:"images,omitempty"` }
func (*Card) EncodeImage ¶
func (c *Card) EncodeImage(w io.Writer, t *CardsTemplate) error
func (*Card) GetAreasHeights ¶
func (*Card) ProcessAreav2 ¶
type CardTransformer ¶
type CardTransformer interface {
ToNewCard(c *Card, sourceTemplate *CardsTemplate) (*Card, error)
}
type CardsExtra ¶
type CardsExtra struct { FactionImage string `json:"faction_image,omitempty"` FactionImageScale float64 `json:"faction_image_scale,omitempty"` BackImage string `json:"back_image,omitempty"` }
CardsExtra is a container for extra information used in different projects but that they are not common to all of them
type CardsTemplate ¶
type CardsTemplate struct { Settings Rows int `json:"rows,omitempty" default:"8"` Columns int `json:"columns,omitempty" default:"5"` DrawGuides bool `json:"draw_guides,omitempty"` // TODO is this field still used? Mode can be 'tiles' or 'template' to generate an A4 sheet // like of cards or a single file per card. Mode string `json:"mode,omitempty" default:"tiles"` // TODO Rename this to OutputFolder or the one in counters to OutputPath and update JSON's OutputPath string `json:"output_path,omitempty" default:"output_%02d"` Scaling float64 `json:"scaling,omitempty" default:"1.0"` Cards []Card `json:"cards"` MaxCardsPerFile int `json:"max_cards_per_file,omitempty"` Extra CardsExtra `json:",omitempty"` }
CardsTemplate is the template sheet (usually A4) to place cards on top in grid fashion
func ParseCardTemplate ¶
func ParseCardTemplate(byt []byte) (*CardsTemplate, error)
func (*CardsTemplate) ApplyCardWaterfallSettings ¶
func (t *CardsTemplate) ApplyCardWaterfallSettings() error
ApplyCardWaterfallSettings traverses the cards in the template applying the default settings to value that are zero-valued
func (*CardsTemplate) Canvas ¶
Canvas returns a Canvas with attributes (like background color or size) taken from `settings`
func (*CardsTemplate) SheetCanvas ¶
func (t *CardsTemplate) SheetCanvas() (*gg.Context, error)
type Counter ¶
type Counter struct { Settings SingleStep bool `json:"single_step,omitempty"` Frame bool `json:"frame,omitempty"` Images Images `json:"images,omitempty"` Texts Texts `json:"texts,omitempty"` Extra *Extra `json:"extra,omitempty"` // Generate the following counter with 'back' suffix in its filename Back *Counter `json:"back,omitempty"` Filename string `json:"filename,omitempty"` PrototypeName string `json:"-"` VassalPiece *PieceSlot `json:"vassal,omitempty"` }
Counter is POGO-like holder for data needed for other parts to fill and draw a counter in a container
func (*Counter) GenerateCounterFilename ¶
filenumber: CounterTemplate.PositionNumberForFilename. So it will always be fixed number position: The position of the text in the counter (0-16) suffix: A suffix on the file. Constant
func (*Counter) GetTextInPosition ¶
type CounterPrototype ¶
type CounterPrototype struct { Counter ImagePrototypes []ImagePrototype `json:"image_prototypes,omitempty"` TextPrototypes []TextPrototype `json:"text_prototypes,omitempty"` Back *CounterPrototype `json:"back,omitempty"` }
func (*CounterPrototype) ToCounters ¶
type CounterTemplate ¶
type CounterTemplate struct { Settings Rows int `` /* 136-byte string literal not displayed */ Columns int `` /* 142-byte string literal not displayed */ DrawGuides bool `json:"draw_guides,omitempty"` Mode string `json:"mode"` OutputFolder string `json:"output_folder" default:"output"` Scaling *float64 `json:"scaling,omitempty"` Vassal VassalCounterTemplateSettings `json:"vassal,omitempty"` WorkingDirectory string `json:"working_directory,omitempty"` // 0-16 Specify an position in the counter to use when writing a different file PositionNumberForFilename int `json:"position_number_for_filename,omitempty"` Counters []Counter `json:"counters,omitempty"` Prototypes map[string]CounterPrototype `json:"prototypes,omitempty"` }
func ParseCounterTemplate ¶
func ParseCounterTemplate(byt []byte, filenamesInUse *sync.Map) (t *CounterTemplate, err error)
ParseCounterTemplate reads a JSON file and parses it into a CounterTemplate after applying it some default settings (if not present in the file)
func (*CounterTemplate) ApplyCounterWaterfallSettings ¶
func (t *CounterTemplate) ApplyCounterWaterfallSettings() error
func (*CounterTemplate) EnrichTemplate ¶
func (t *CounterTemplate) EnrichTemplate() error
func (*CounterTemplate) ExpandPrototypeCounterTemplate ¶
func (t *CounterTemplate) ExpandPrototypeCounterTemplate(filenamesInUse *sync.Map) (*CounterTemplate, error)
func (*CounterTemplate) ParsePrototype ¶
func (t *CounterTemplate) ParsePrototype() (*CounterTemplate, error)
type CounterToCardTransformer ¶
type CounterToCardTransformer interface {
ToNewCard(c *Counter, sourceTemplate *CardsTemplate) (*Card, error)
}
type CounterTransfomer ¶
type DiceButton ¶
type DiceButton struct { XMLName xml.Name `xml:"VASSAL.build.module.DiceButton"` Raw string `xml:",innerxml"` AddToTotal int `xml:"addToTotal,attr"` CanDisable bool `xml:"canDisable,attr"` DisabledIcon string `xml:"disabledIcon,attr"` Hotkey string `xml:"hotkey,attr"` Icon string `xml:"icon,attr"` KeepCount string `xml:"keepCount,attr"` KeepDice string `xml:"keepDice,attr"` KeepOption string `xml:"keepOption,attr"` LockAdd string `xml:"lockAdd,attr"` LockDice string `xml:"lockDice,attr"` LockPlus string `xml:"lockPlus,attr"` LockSides string `xml:"lockSides,attr"` NDice string `xml:"nDice,attr"` NSides string `xml:"nSides,attr"` Name string `xml:"name,attr"` Plus string `xml:"plus,attr"` Prompt string `xml:"prompt,attr"` PropertyGate string `xml:"propertyGate,attr"` ReportFormat string `xml:"reportFormat,attr"` ReportTotal string `xml:"reportTotal,attr"` SortDice string `xml:"sortDice,attr"` Text string `xml:"text,attr"` Tooltip string `xml:"tooltip,attr"` }
type Extra ¶
type Extra struct { // PublicIcon in a FOW counter is the visible icon for the enemy. Imagine an icon for the back // of a block in a Columbia game CardImage *Image `json:"card_image,omitempty"` Cost int `json:"cost,omitempty"` PublicIcon *Image `json:"public_icon,omitempty"` Side string `json:"side,omitempty"` SkipCardGeneration bool `json:"skip_card_generation,omitempty"` Title string `json:"title,omitempty"` TitlePosition *int `json:"title_position,omitempty"` }
TODO This Extra contains data from all projects
type FileContent ¶
type FileContent int
type HexGrid ¶
type HexGrid struct { XMLName xml.Name `xml:"VASSAL.build.module.map.boardPicker.board.HexGrid" json:"-"` Text string `xml:",chardata" json:"text,omitempty"` Color string `xml:"color,attr" json:"color,omitempty"` CornersLegal string `xml:"cornersLegal,attr" json:"cornersLegal,omitempty"` DotsVisible string `xml:"dotsVisible,attr" json:"dotsVisible,omitempty"` Dx string `xml:"dx,attr" json:"dx,omitempty"` Dy string `xml:"dy,attr" json:"dy,omitempty"` EdgesLegal string `xml:"edgesLegal,attr" json:"edgesLegal,omitempty"` Sideways string `xml:"sideways,attr" json:"sideways,omitempty"` SnapTo string `xml:"snapTo,attr" json:"snapTo,omitempty"` Visible string `xml:"visible,attr" json:"visible,omitempty"` X0 string `xml:"x0,attr" json:"x0,omitempty"` Y0 string `xml:"y0,attr" json:"y0,omitempty"` }
type Image ¶
type Image struct { Settings Positioner Path string `json:"path,omitempty"` Scale float64 `json:"scale,omitempty"` AvoidCropping bool `json:"avoid_cropping,omitempty"` }
func (Image) GetSettings ¶
type ImageExtraData ¶
type ImagePrototype ¶
type ListWidget ¶
type Map ¶
type Map struct { XMLName xml.Name `xml:"VASSAL.build.module.Map"` BoardPicker BoardPicker `xml:"VASSAL.build.module.map.BoardPicker"` Text string `xml:",chardata"` AllowMultiple string `xml:"allowMultiple,attr"` Backgroundcolor string `xml:"backgroundcolor,attr"` ButtonName string `xml:"buttonName,attr"` ChangeFormat string `xml:"changeFormat,attr"` Color string `xml:"color,attr"` CreateFormat string `xml:"createFormat,attr"` EdgeHeight string `xml:"edgeHeight,attr"` EdgeWidth string `xml:"edgeWidth,attr"` HideKey string `xml:"hideKey,attr"` Hotkey string `xml:"hotkey,attr"` Icon string `xml:"icon,attr"` Launch string `xml:"launch,attr"` MapName string `xml:"mapName,attr"` MarkMoved string `xml:"markMoved,attr"` MarkUnmovedHotkey string `xml:"markUnmovedHotkey,attr"` MarkUnmovedIcon string `xml:"markUnmovedIcon,attr"` MarkUnmovedReport string `xml:"markUnmovedReport,attr"` MarkUnmovedText string `xml:"markUnmovedText,attr"` MarkUnmovedTooltip string `xml:"markUnmovedTooltip,attr"` MoveKey string `xml:"moveKey,attr"` MoveToFormat string `xml:"moveToFormat,attr"` MoveWithinFormat string `xml:"moveWithinFormat,attr"` OnlyReportChangedLocation string `xml:"onlyReportChangedLocation,attr"` ShowKey string `xml:"showKey,attr"` Thickness string `xml:"thickness,attr"` StackMetrics struct { Text string `xml:",chardata"` Bottom string `xml:"bottom,attr"` Disabled string `xml:"disabled,attr"` Down string `xml:"down,attr"` ExSepX string `xml:"exSepX,attr"` ExSepY string `xml:"exSepY,attr"` Top string `xml:"top,attr"` UnexSepX string `xml:"unexSepX,attr"` UnexSepY string `xml:"unexSepY,attr"` Up string `xml:"up,attr"` } `xml:"VASSAL.build.module.map.StackMetrics"` ForwardToKeyBuffer string `xml:"VASSAL.build.module.map.ForwardToKeyBuffer"` Scroller string `xml:"VASSAL.build.module.map.Scroller"` ForwardToChatter string `xml:"VASSAL.build.module.map.ForwardToChatter"` MenuDisplayer string `xml:"VASSAL.build.module.map.MenuDisplayer"` MapCenterer string `xml:"VASSAL.build.module.map.MapCenterer"` StackExpander string `xml:"VASSAL.build.module.map.StackExpander"` PieceMover string `xml:"VASSAL.build.module.map.PieceMover"` KeyBufferer string `xml:"VASSAL.build.module.map.KeyBufferer"` ImageSaver struct { Text string `xml:",chardata"` ButtonText string `xml:"buttonText,attr"` CanDisable string `xml:"canDisable,attr"` DisabledIcon string `xml:"disabledIcon,attr"` HideWhenDisabled string `xml:"hideWhenDisabled,attr"` Hotkey string `xml:"hotkey,attr"` Icon string `xml:"icon,attr"` PropertyGate string `xml:"propertyGate,attr"` Tooltip string `xml:"tooltip,attr"` } `xml:"VASSAL.build.module.map.ImageSaver"` CounterDetailViewer struct { Text string `xml:",chardata"` BgColor string `xml:"bgColor,attr"` BorderColor string `xml:"borderColor,attr"` BorderInnerThickness string `xml:"borderInnerThickness,attr"` BorderThickness string `xml:"borderThickness,attr"` BorderWidth string `xml:"borderWidth,attr"` CenterAll string `xml:"centerAll,attr"` CenterPiecesVertically string `xml:"centerPiecesVertically,attr"` CenterText string `xml:"centerText,attr"` CombineCounterSummary string `xml:"combineCounterSummary,attr"` CounterReportFormat string `xml:"counterReportFormat,attr"` Delay string `xml:"delay,attr"` Description string `xml:"description,attr"` Display string `xml:"display,attr"` EmptyHexReportForma string `xml:"emptyHexReportForma,attr"` EnableHTML string `xml:"enableHTML,attr"` ExtraTextPadding string `xml:"extraTextPadding,attr"` FgColor string `xml:"fgColor,attr"` FontSize string `xml:"fontSize,attr"` GraphicsZoom string `xml:"graphicsZoom,attr"` Hotkey string `xml:"hotkey,attr"` LayerList string `xml:"layerList,attr"` MinDisplayPieces string `xml:"minDisplayPieces,attr"` OnlyShowFirstSummary string `xml:"onlyShowFirstSummary,attr"` PropertyFilter string `xml:"propertyFilter,attr"` ShowDeck string `xml:"showDeck,attr"` ShowDeckDepth string `xml:"showDeckDepth,attr"` ShowDeckMasked string `xml:"showDeckMasked,attr"` ShowMoveSelectde string `xml:"showMoveSelectde,attr"` ShowNoStack string `xml:"showNoStack,attr"` ShowNonMovable string `xml:"showNonMovable,attr"` ShowOnlyTopOfStack string `xml:"showOnlyTopOfStack,attr"` ShowOverlap string `xml:"showOverlap,attr"` ShowTerrainBeneath string `xml:"showTerrainBeneath,attr"` ShowTerrainHeight string `xml:"showTerrainHeight,attr"` ShowTerrainSnappy string `xml:"showTerrainSnappy,attr"` ShowTerrainText string `xml:"showTerrainText,attr"` ShowTerrainWidth string `xml:"showTerrainWidth,attr"` ShowTerrainZoom string `xml:"showTerrainZoom,attr"` Showgraph string `xml:"showgraph,attr"` Showgraphsingle string `xml:"showgraphsingle,attr"` Showtext string `xml:"showtext,attr"` Showtextsingle string `xml:"showtextsingle,attr"` StopAfterShowing string `xml:"stopAfterShowing,attr"` StretchWidthPieces string `xml:"stretchWidthPieces,attr"` StretchWidthSummary string `xml:"stretchWidthSummary,attr"` SummaryReportFormat string `xml:"summaryReportFormat,attr"` UnrotatePieces string `xml:"unrotatePieces,attr"` Version string `xml:"version,attr"` VerticalBottomText string `xml:"verticalBottomText,attr"` VerticalOffset string `xml:"verticalOffset,attr"` VerticalTopText string `xml:"verticalTopText,attr"` Zoomlevel string `xml:"zoomlevel,attr"` } `xml:"VASSAL.build.module.map.CounterDetailViewer"` Flare struct { Text string `xml:",chardata"` CircleColor string `xml:"circleColor,attr"` CircleScale string `xml:"circleScale,attr"` CircleSize string `xml:"circleSize,attr"` FlareKey string `xml:"flareKey,attr"` FlareName string `xml:"flareName,attr"` FlarePulses string `xml:"flarePulses,attr"` FlarePulsesPerSec string `xml:"flarePulsesPerSec,attr"` ReportFormat string `xml:"reportFormat,attr"` } `xml:"VASSAL.build.module.map.Flare"` Zoomer struct { Text string `xml:",chardata"` InButtonText string `xml:"inButtonText,attr"` InIconName string `xml:"inIconName,attr"` InTooltip string `xml:"inTooltip,attr"` OutButtonText string `xml:"outButtonText,attr"` OutIconName string `xml:"outIconName,attr"` OutTooltip string `xml:"outTooltip,attr"` PickButtonText string `xml:"pickButtonText,attr"` PickIconName string `xml:"pickIconName,attr"` PickTooltip string `xml:"pickTooltip,attr"` ZoomInKey string `xml:"zoomInKey,attr"` ZoomLevels string `xml:"zoomLevels,attr"` ZoomOutKey string `xml:"zoomOutKey,attr"` ZoomPickKey string `xml:"zoomPickKey,attr"` ZoomStart string `xml:"zoomStart,attr"` } `xml:"VASSAL.build.module.map.Zoomer"` VASSALBuildModulePropertiesGlobalProperties string `xml:"VASSAL.build.module.properties.GlobalProperties"` VASSALBuildModuleMapSelectionHighlighters string `xml:"VASSAL.build.module.map.SelectionHighlighters"` HighlightLastMoved struct { Text string `xml:",chardata"` Color string `xml:"color,attr"` Enabled string `xml:"enabled,attr"` Thickness string `xml:"thickness,attr"` } `xml:"VASSAL.build.module.map.HighlightLastMoved"` HidePiecesButton struct { Text string `xml:",chardata"` ButtonText string `xml:"buttonText,attr"` HiddenIcon string `xml:"hiddenIcon,attr"` Hotkey string `xml:"hotkey,attr"` ShowingIcon string `xml:"showingIcon,attr"` Tooltip string `xml:"tooltip,attr"` } `xml:"VASSAL.build.module.map.HidePiecesButton"` }
type PanelWidget ¶
type PanelWidget struct { XMLName xml.Name `xml:"VASSAL.build.widget.PanelWidget"` Text string `xml:",chardata"` EntryName string `xml:"entryName,attr"` Fixed string `xml:"fixed,attr"` NColumns string `xml:"nColumns,attr"` Scale string `xml:"scale,attr"` Vert string `xml:"vert,attr"` ListWidget []ListWidget `xml:"VASSAL.build.widget.ListWidget"` }
type PieceSlots ¶
type PieceSlots []PieceSlot
func (PieceSlots) Len ¶
func (p PieceSlots) Len() int
func (PieceSlots) Less ¶
func (p PieceSlots) Less(i, j int) bool
func (PieceSlots) Swap ¶
func (p PieceSlots) Swap(i, j int)
type PieceTemplateData ¶
type PieceWindow ¶
type PieceWindow struct { XMLName xml.Name `xml:"VASSAL.build.module.PieceWindow"` DefaultWidth string `xml:"defaultWidth,attr"` Hidden string `xml:"hidden,attr"` Hotkey string `xml:"hotkey,attr"` Icon string `xml:"icon,attr"` Scale string `xml:"scale,attr"` Text string `xml:"text,attr"` ToolTip string `xml:"tooltip,attr"` TabWidget TabWidget }
type Positioner ¶
type Positioner struct{}
func (*Positioner) GetAnchorPointsAndMaxWidth ¶
func (*Positioner) GetXYPosition ¶
type Settings ¶
type Settings struct { Width int `json:"width,omitempty"` Height int `json:"height,omitempty"` Margins *float64 `json:"margins,omitempty"` FontHeight float64 `json:"font_height,omitempty"` FontPath string `json:"font_path,omitempty"` FontColorS string `json:"font_color,omitempty"` FontColor color.Color `json:"-"` BackgroundImage *string `json:"background_image,omitempty"` BackgroundColor *string `json:"background_color,omitempty"` BgColor color.Color `json:"-"` ShadowDistance *int `json:"shadow,omitempty"` ShadowSigma *int `json:"shadow_sigma,omitempty"` Rotation *float64 `json:"rotation,omitempty"` //CounterTemplate Card specific BorderWidth *float64 `json:"border_width,omitempty"` BorderColorS string `json:"border_color,omitempty"` BorderColor color.Color `json:"-"` XShift *float64 `json:"x_shift,omitempty"` YShift *float64 `json:"y_shift,omitempty"` //Card specific Multiplier *int `json:"multiplier,omitempty" default:"1"` //Text options specific StrokeWidth *float64 `json:"stroke_width,omitempty"` StrokeColorS string `json:"stroke_color,omitempty"` StrokeColor color.Color `json:"-"` Alignment string `json:"alignment,omitempty"` //Image options specific ImageScaling string `json:"image_scaling,omitempty"` AvoidClipping bool `json:"avoid_clipping,omitempty"` Position int `json:"position,omitempty"` Skip bool `json:"skip,omitempty"` BackPersistent bool `json:"back_persistent,omitempty"` PrettyName string `json:"pretty_name,omitempty"` }
Template Settings
Counter / Card Settings Image / Text Settings
func (*Settings) ApplySettingsScaling ¶
type SettingsGetter ¶
type SettingsGetter interface {
GetSettings() *Settings
}
type TabWidget ¶
type TabWidget struct { XMLName xml.Name `xml:"VASSAL.build.widget.TabWidget"` EntryName string `xml:"entryName,attr"` // PanelWidget PanelWidget `xml:"VASSAL.build.widget.PanelWidget"` ListWidget []ListWidget `xml:"VASSAL.build.widget.ListWidget"` }
type Text ¶
type Text struct { Settings Positioner String string `json:"string,omitempty"` Underline bool `json:"underline,omitempty"` TextBackgroundColor string `json:"text_background_color,omitempty"` TextBgColor color.Color `json:"-"` }
func (*Text) GetAlignment ¶
func (Text) GetSettings ¶
type TextPrototype ¶
type VassalFileModuleData ¶
type VassalFileModuleData struct { XMLName xml.Name `xml:"data"` Text string `xml:",chardata"` AttrVersion string `xml:"version,attr"` Version string `xml:"version"` Extra1 string `xml:"extra1"` Extra2 string `xml:"extra2"` VassalVersion string `xml:"VassalVersion"` DateSaved string `xml:"dateSaved"` Description string `xml:"description"` Name string `xml:"name"` }
type VassalGameModule ¶
type VassalGameModule struct { XMLName xml.Name `xml:"VASSAL.build.GameModule"` ModuleOther1 string `xml:"ModuleOther1,attr"` ModuleOther2 string `xml:"ModuleOther2,attr"` VassalVersion string `xml:"VassalVersion,attr"` Description string `xml:"description,attr"` Name string `xml:"name,attr"` NextPieceSlotId string `xml:"nextPieceSlotId,attr"` Version string `xml:"version,attr"` BasicCommandEncoder capture `xml:"VASSAL.build.module.BasicCommandEncoder"` Documentation capture `xml:"VASSAL.build.module.Documentation"` Chatter capture `xml:"VASSAL.build.module.Chatter"` KeyNamer capture `xml:"VASSAL.build.module.KeyNamer"` PieceWindow PieceWindow DiceButton []DiceButton `xml:"VASSAL.build.module.DiceButton"` PlayerRoster capture `xml:"VASSAL.build.module.PlayerRoster"` GlobalOptions capture `xml:"VASSAL.build.module.GlobalOptions"` GamePieceDefinitions capture `xml:"VASSAL.build.module.gamepieceimage.GamePieceImageDefinitions"` GlobalProperties capture `xml:"VASSAL.build.module.properties.GlobalProperties"` GlobalTranslatableMessages capture `xml:"VASSAL.build.module.properties.GlobalTranslatableMessages"` PrototypesContainer capture `xml:"VASSAL.build.module.PrototypesContainer"` Language capture `xml:"VASSAL.i18n.Language"` Map Map `xml:"VASSAL.build.module.Map"` }