Skip to content

hoan/corona-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

settings.lua stores info in a local file. 

Do this somewhere in main():

settings.load()

Then you can get values easily:

local soundOn = settings.get('sound_on')
if soundOn then
  print("Sound is on")
else
  print("Sound is off")
end

You can also set values easily:

settings.set('sound_on', false)
settings.set('music_on', true)

The info will be saved to a file as soon as settings.set is run.
The info will persist across the application restarts.

Thats all!

About

Store user/game settings in a local file easily

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages