Start on Account Select
His Dad [04-22-15 - 20:56]
diff --git a/HistOffline.lua b/HistOffline.lua
index 2aaa1dd..04a701a 100644
--- a/HistOffline.lua
+++ b/HistOffline.lua
@@ -67,11 +67,13 @@ function write_saved(o)
end
accounts = {}
+naccounts = 0
for i,_ in pairs(History_SV["Default"]) do
accounts[i] = {}
accounts[i].names = {} -- intermediate table for sorting. WIP. Array formatted.
accounts[i].name = {}
myaccount = i
+ naccounts = naccounts +1
end
function write_data()
@@ -94,7 +96,7 @@ end
end
end
--- accounts[acc].name[char].display = {} -- Hold all the IUP tabs and boxes for that char
+
function print_old()
for i,j in pairs (History_SV["Default"][myaccount]["$AccountWide"]["old"]) do
print (i .. " .. " .. dump(j))
@@ -423,6 +425,21 @@ function btn_eraselog:action()
end
+function select_account()
+ dlg_select = dialog {
+ title = "Select Account",
+ iup.vbox{
+ iup.fill{},
+ },
+ },
+ dlg_select:showxy(iup.CENTER, iup.CENTER)
+end
+
+
+if naccounts > 1 then -- Create dialog to choose account
+
+
+end
-- Create dialog
dlg = iup.dialog{iup.vbox{accounts[myaccount].tabs,