Added config file for bgcolor.

Added config file for bgcolor.
This commit is contained in:
Rinnegatamante 2016-10-19 19:29:17 +02:00
parent ec1b28bf67
commit c27ff9ea8c

View File

@ -62,7 +62,10 @@ while Timer.getTime(tmr) < 3000 do
-- Getting region, playtime, icon and title name for any game
for i, file in pairs(tbl) do
System.wait(5000)
if file.name == "config.lua" then
dofile("ux0:/data/TrackPlug/"..file.name)
cfg_idx = i
else
local titleid = string.sub(file.name,1,-5)
local regioncode = string.sub(file.name,1,4)
if regioncode == "PCSA" or regioncode == "PCSE" then
@ -96,6 +99,10 @@ while Timer.getTime(tmr) < 3000 do
file.ptime = FormatTime(file.rtime)
io.close(fd)
end
end
if cfg_idx ~= nil then
table.remove(tbl, cfg_ifx)
end
end
end
@ -111,7 +118,9 @@ local colors = {
{Color.new(255,72,255), Color.new(255,185,255), Color.new(255,72,255)}, -- Magenta
{Color.new(72,72,72), Color.new(0,0,0), Color.new(0,255,0)} -- Black'N'Green
}
col_idx = 1
if col_idx == nil then
col_idx = 6
end
local function LoadWave(height,dim,f,style,x_dim)
if style == 1 then
f=f or 0.1
@ -359,6 +368,9 @@ while #tbl > 0 do
col_idx = 1
end
wav:color(Color.getR(colors[col_idx][3]),Color.getG(colors[col_idx][3]),Color.getB(colors[col_idx][3]))
fd = io.open("ux0:/data/TrackPlug/config.lua", FCREATE)
io.write(fd, "col_idx="..col_idx, 9)
io.close(fd)
end
oldpad = pad
end