Documentation ¶
Index ¶
- Variables
- func AvailableCalendarRefs(libraries library.Libraries) []*library.NamedFileSet
- type CalendarRef
- type General
- type Page
- type PageOverrides
- func (p *PageOverrides) Apply(page *Page)
- func (p *PageOverrides) ParseBottomMargin(in string)
- func (p *PageOverrides) ParseLeftMargin(in string)
- func (p *PageOverrides) ParseOrientation(in string)
- func (p *PageOverrides) ParseRightMargin(in string)
- func (p *PageOverrides) ParseSize(in string)
- func (p *PageOverrides) ParseTopMargin(in string)
Constants ¶
This section is empty.
Variables ¶
var ( InitialPointsDef = fxp.From(150) InitialPointsMin fxp.Int InitialPointsMax = fxp.From(9999999) TooltipDelayDef = fxp.FromStringForced("0.75") TooltipDelayMin fxp.Int TooltipDelayMax = fxp.Thirty TooltipDismissalDef = fxp.From(60) TooltipDismissalMin = fxp.One TooltipDismissalMax = fxp.From(3600) ScrollWheelMultiplierDef = fxp.From(unison.MouseWheelMultiplier) ScrollWheelMultiplierMin = fxp.Int(1) ScrollWheelMultiplierMax = fxp.From(9999) ImageResolutionDef = 200 ImageResolutionMin = 50 ImageResolutionMax = 400 InitialUIScaleMin = 50 InitialUIScaleMax = 400 InitialListUIScaleDef = 100 InitialEditorUIScaleDef = 100 InitialSheetUIScaleDef = 133 AutoColWidthMin = 50 AutoColWidthMax = 9999 MaximumAutoColWidthDef = 800 )
Default, min & max values for the general numeric settings
Functions ¶
func AvailableCalendarRefs ¶
func AvailableCalendarRefs(libraries library.Libraries) []*library.NamedFileSet
AvailableCalendarRefs scans the libraries and returns the available calendars.
Types ¶
type CalendarRef ¶
CalendarRef holds a named reference to a calendar.
func LookupCalendarRef ¶
func LookupCalendarRef(name string, libraries library.Libraries) *CalendarRef
LookupCalendarRef a CalendarRef by name.
func NewCalendarRefFromFS ¶
func NewCalendarRefFromFS(fileSystem fs.FS, filePath string) (*CalendarRef, error)
NewCalendarRefFromFS creates a new CalendarRef from a file.
func (*CalendarRef) RandomBirthday ¶
func (c *CalendarRef) RandomBirthday(not string) string
RandomBirthday generates a random birthday month and day.
type General ¶
type General struct { DefaultPlayerName string `json:"default_player_name,omitempty"` DefaultTechLevel string `json:"default_tech_level,omitempty"` CalendarName string `json:"calendar_ref,omitempty"` ExternalPDFCmdLine string `json:"external_pdf_cmd_line,omitempty"` InitialPoints fxp.Int `json:"initial_points"` TooltipDelay fxp.Int `json:"tooltip_delay"` TooltipDismissal fxp.Int `json:"tooltip_dismissal"` ScrollWheelMultiplier fxp.Int `json:"scroll_wheel_multiplier"` InitialListUIScale int `json:"initial_list_scale"` InitialEditorUIScale int `json:"initial_editor_scale"` InitialSheetUIScale int `json:"initial_sheet_scale"` MaximumAutoColWidth int `json:"maximum_auto_col_width"` ImageResolution int `json:"image_resolution"` AutoFillProfile bool `json:"auto_fill_profile"` AutoAddNaturalAttacks bool `json:"add_natural_attacks"` }
General holds settings for a sheet.
func NewGeneralFromFile ¶
NewGeneralFromFile loads new settings from a file.
func (*General) CalendarRef ¶
func (s *General) CalendarRef(libraries library.Libraries) *CalendarRef
CalendarRef returns the CalendarRef these settings refer to.
func (*General) EnsureValidity ¶
func (s *General) EnsureValidity()
EnsureValidity checks the current settings for validity and if they aren't valid, makes them so.
func (*General) UpdateToolTipTiming ¶
func (s *General) UpdateToolTipTiming()
UpdateToolTipTiming updates the default tooltip theme to use the timing values from this object.
type Page ¶
type Page struct { Size paper.Size `json:"paper_size"` Orientation paper.Orientation `json:"orientation"` TopMargin paper.Length `json:"top_margin"` LeftMargin paper.Length `json:"left_margin"` BottomMargin paper.Length `json:"bottom_margin"` RightMargin paper.Length `json:"right_margin"` }
Page holds page settings.
func (*Page) EnsureValidity ¶
func (p *Page) EnsureValidity()
EnsureValidity checks the current settings for validity and if they aren't valid, makes them so.
type PageOverrides ¶
type PageOverrides struct { Size *paper.Size Orientation *paper.Orientation TopMargin *paper.Length LeftMargin *paper.Length BottomMargin *paper.Length RightMargin *paper.Length }
PageOverrides holds page setting overrides.
func (*PageOverrides) Apply ¶
func (p *PageOverrides) Apply(page *Page)
Apply the overrides to a Page.
func (*PageOverrides) ParseBottomMargin ¶
func (p *PageOverrides) ParseBottomMargin(in string)
ParseBottomMargin and set the override, if applicable.
func (*PageOverrides) ParseLeftMargin ¶
func (p *PageOverrides) ParseLeftMargin(in string)
ParseLeftMargin and set the override, if applicable.
func (*PageOverrides) ParseOrientation ¶
func (p *PageOverrides) ParseOrientation(in string)
ParseOrientation and set the override, if applicable.
func (*PageOverrides) ParseRightMargin ¶
func (p *PageOverrides) ParseRightMargin(in string)
ParseRightMargin and set the override, if applicable.
func (*PageOverrides) ParseSize ¶
func (p *PageOverrides) ParseSize(in string)
ParseSize and set the override, if applicable.
func (*PageOverrides) ParseTopMargin ¶
func (p *PageOverrides) ParseTopMargin(in string)
ParseTopMargin and set the override, if applicable.