load to prefs added
This commit is contained in:
parent
d6f6f013c0
commit
148d3cf631
|
@ -1,12 +1,15 @@
|
|||
prefs = obj {
|
||||
nam = 'preferences',
|
||||
system_type = true,
|
||||
ini = function(s)
|
||||
load = function(s)
|
||||
local name = get_savepath() .. '/prefs';
|
||||
local f, err = loadfile(name);
|
||||
if not f then return nil end
|
||||
f();
|
||||
end,
|
||||
ini = function(s)
|
||||
return s:load()
|
||||
end,
|
||||
store = function(s)
|
||||
local name = get_savepath() .. '/prefs';
|
||||
local h = stead.io.open(name,"w");
|
||||
|
|
Reference in a new issue