0.3.2 Saving pallette choices to config. /JL

This commit is contained in:
2022-12-20 08:00:29 +01:00
parent f7e0c48bdb
commit 17104c20d6
3 changed files with 50 additions and 1 deletions
+21
View File
@@ -12,6 +12,27 @@ var (
ConfigFile string = "BeadImager.conf"
)
func SetConfigBrand(s string) {
log.Printf("Setting brand to: %s\n", s)
Config, _ := configparser.Parse(UserPath + Sep + ConfigFile)
Config.Set("pallette", "brand", s)
Config.SaveWithDelimiter(UserPath+Sep+ConfigFile, "=")
}
func SetConfigSerie(s string) {
log.Printf("Setting serie to: %s\n", s)
Config, _ := configparser.Parse(UserPath + Sep + ConfigFile)
Config.Set("pallette", "serie", s)
Config.SaveWithDelimiter(UserPath+Sep+ConfigFile, "=")
}
func SetConfigPegboard(s string) {
log.Printf("Setting pegboard to: %s\n", s)
Config, _ := configparser.Parse(UserPath + Sep + ConfigFile)
Config.Set("pallette", "pegboard", s)
Config.SaveWithDelimiter(UserPath+Sep+ConfigFile, "=")
}
func SetConfigShowBeads(s string) {
log.Printf("Setting showbeads to: %s\n", s)
Config, _ := configparser.Parse(UserPath + Sep + ConfigFile)