hsconfig

package
v0.0.0-...-667d129 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Overview

Package hsconfig provides the Hellspawner application config file implementation.

Index

Constants

View Source
const (
	// DefaultBGColor is the default background color of the main window
	DefaultBGColor = 0x0a0a0aff
)

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() string

GetConfigPath returns default config path

Types

type Config

type Config struct {
	Path                    string                      `json:"-"`
	RecentProjects          []string                    `json:"recentProjects"`
	AbyssEnginePath         string                      `json:"abyssEnginePath"`
	AuxiliaryMpqPath        string                      `json:"auxiliaryMpqPath"`
	ExternalListFile        string                      `json:"externalListFile"`
	OpenMostRecentOnStartup bool                        `json:"openMostRecentOnStartup"`
	ProjectStates           map[string]hsstate.AppState `json:"projectStates"`
	LoggingToFile           bool                        `json:"loggingToFile"`
	LogFilePath             string                      `json:"logFile"`
	Locale                  hsenum.Locale               `json:"locale"`
	BGColor                 color.RGBA                  `json:"bgColor"`
}

Config represents HellSpawner's config

func Load

func Load(optionalPath string) *Config

Load loads config

func (*Config) AddToRecentProjects

func (c *Config) AddToRecentProjects(filePath string)

AddToRecentProjects adds a path to recent opened projects

func (*Config) GetAuxMPQs

func (c *Config) GetAuxMPQs() []string

GetAuxMPQs returns paths to auxiliary mpq's

func (*Config) Save

func (c *Config) Save() error

Save saves a new config

Jump to

Keyboard shortcuts

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