#Saving & Loading settings w/ ConfigFile

6 messages · Page 1 of 1 (latest)

granite sigil
#

Also if you can please ping me if responding, I'm in too many servers and my short term memory capacity is slightly better than lettuce.

summer python
#

Why is this a for loop?
for setting in config.get_sections():
Can't you just call
config.get_value("Video", "Window Mode")?

I'd add a print to output the value of that last line so you know what is being loaded

summer python
granite sigil
#

ill check

#
## ConfigFile Start    
func loadConfig():
    var err = config.load(settings)
    if err != OK:
        return
    else:
        %FullscreenDropdown.selected = (config.get_value("Video", "Window Mode"))
        %ResolutionDropdown.selected = (config.get_value("Video", "Resolution"))
        print(config.get_value("Video", "Window Mode"))
        print(config.get_value("Video", "Resolution"))
## ConfigFile End

i've set it to this and ill check if it works