config

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnixPath    string = "/.config/GZGoLauncher"
	WindowsPath string = `\Documents\GZGoLauncher`
)

Variables

View Source
var (
	FilePath = Path + "/config.json"
	Path     = func() string {
		if v.IsWindows {
			return v.HomeDir + WindowsPath
		}
		return v.HomeDir + UnixPath
	}()
	Settings = Read()
)

Functions

This section is empty.

Types

type Config

type Config struct {
	ThemeMode      bool   `json:"theme-mode"` // 1 = light, 0 = dark
	ShowOutOnClose bool   `json:"show-out-on-close"`
	CloseOnStart   bool   `json:"close-on-start"`
	CustomArgs     string `json:"custom-args"`
	Lang           string `json:"lang"`
	GZDoomDir      string `json:"gzdoom-dir"`
	ZDoomDir       string `json:"zdoom-dir"`
	ExecDir        string `json:"runner-dir"`
	Mods           []Mod  `json:"mods"`
	Wads           []Wad  `json:"wads"`
}

func Read

func Read() Config

func (*Config) Write

func (c *Config) Write() error

type Mod

type Mod struct {
	Path    string
	Enabled bool
}

type Wad

type Wad string

func (Wad) IsValid

func (w Wad) IsValid() bool

Jump to

Keyboard shortcuts

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