config

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 25, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WindowWidth  = 1200
	WindowHeight = 850
)
View Source
const GameCount = 9

Variables

View Source
var (
	PWD string
)

Functions

func GameNameString

func GameNameString(game Game) string

func String

func String(game Game) string

Types

type Configs

type Configs struct {
	FirstTime   bool       `json:"firstTime"`
	WindowX     int        `json:"width"`
	WindowY     int        `json:"height"`
	DirI        string     `json:"dir1"`
	DirII       string     `json:"dir2"`
	DirIII      string     `json:"dir3"`
	DirIV       string     `json:"dir4"`
	DirV        string     `json:"dir5"`
	DirVI       string     `json:"dir6"`
	DirChrCrs   string     `json:"chrCrs"`
	DirBofIII   string     `json:"bof3"`
	DirBofIV    string     `json:"bof4"`
	ModsDir     string     `json:"modDir"`
	ImgCacheDir string     `json:"imgCacheDir"`
	DownloadDir string     `json:"downloadDir"`
	BackupDir   string     `json:"backupDir"`
	Theme       ThemeColor `json:"theme"`
	DefaultGame string     `json:"openTo"`
}

func Get

func Get() *Configs

func (*Configs) AddDir added in v0.5.2

func (c *Configs) AddDir(game Game, dirKind DirKind, from string) (string, error)

func (*Configs) GetBackupFullPath

func (c *Configs) GetBackupFullPath(game Game) string

func (*Configs) GetDir added in v0.5.2

func (c *Configs) GetDir(game Game, dirKind DirKind) (dir string, err error)

func (*Configs) GetDownloadFullPathForGame

func (c *Configs) GetDownloadFullPathForGame(game Game) string

func (*Configs) GetDownloadFullPathForUtility

func (c *Configs) GetDownloadFullPathForUtility() string

func (*Configs) GetGameDir

func (c *Configs) GetGameDir(game Game) (s string)

func (*Configs) GetGameDirSuffix

func (c *Configs) GetGameDirSuffix(game Game) (s string)

func (*Configs) GetModsFullPath

func (c *Configs) GetModsFullPath(game Game) string

func (*Configs) Initialize

func (c *Configs) Initialize() (err error)

func (*Configs) RemoveGameDir added in v0.5.0

func (c *Configs) RemoveGameDir(game Game, to string) string

func (*Configs) Save

func (c *Configs) Save() (err error)

func (*Configs) Size

func (c *Configs) Size() fyne.Size

type DirKind added in v0.5.2

type DirKind byte
const (
	ModsDirKind DirKind = iota
	DownloadDirKind
	BackupDirKind
)

type Game

type Game int
const (
	I Game = iota
	II
	III
	IV
	V
	VI
	Utility
	ChronoCross
	BofIII
	BofIV
)

func FromString

func FromString(s string) (game Game)

func NameToGame

func NameToGame(n GameName) Game

type GameName

type GameName string
const (
	FfPrI           GameName = "FF PR I"
	FfPrII          GameName = "FF PR II"
	FfPrIII         GameName = "FF PR III"
	FfPrIV          GameName = "FF PR IV"
	FfPrV           GameName = "FF PR V"
	FfPrVI          GameName = "FF PR VI"
	ChronoCrossName          = "Chrono Cross"
	BofIIIName      GameName = "BoF III"
	BofIVName       GameName = "BoF IV"
)

func GameToName

func GameToName(game Game) GameName

type Secret

type Secret struct {
	NexusApiKey string `json:"nexusApiKey"`
}

func GetSecrets

func GetSecrets() *Secret

func (*Secret) Initialize

func (s *Secret) Initialize()

func (*Secret) Save

func (s *Secret) Save() error

type ThemeColor

type ThemeColor byte
const (
	DarkThemeColor ThemeColor = iota
	LightThemeColor
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL