Updated IniFile to match source's function calls, added initial version

of new ThemePrefs and ThemePrefsRows implementations and added a quick
example into the default theme code. Not fully functional yet, fyi.
This commit is contained in:
Mark Cannon
2010-12-15 04:50:00 -05:00
parent 9479df65f3
commit 4aa3110e25
4 changed files with 277 additions and 2 deletions
+3 -1
View File
@@ -50,12 +50,13 @@ IniFile =
end,
ReadFile = function( file_path )
Trace( "IniFile.ReadFile( " .. file_path .. " )" )
local file = RageFileUtil.CreateRageFile()
if not file:Open(file_path, RageFile.READ) then
Warn( string.format("ReadFile(%s): %s",file_path,file:GetError()) )
file:destroy()
return nil
return { } -- return a blank table
end
local tbl = { }
@@ -87,6 +88,7 @@ IniFile =
end,
WriteFile = function( file_path, tbl )
Trace( "IniFile.WriteFile( " .. file_path .. " )" )
local file = RageFileUtil.CreateRageFile()
if not file:Open(file_path, RageFile.WRITE) then