Turn on AutoKick for UI

Sasky [06-13-14 - 06:45]
Turn on AutoKick for UI
Filename
AutoInviteUI.lua
diff --git a/AutoInviteUI.lua b/AutoInviteUI.lua
index 608a8f8..4bc45ef 100644
--- a/AutoInviteUI.lua
+++ b/AutoInviteUI.lua
@@ -102,39 +102,38 @@ function AutoInviteUI.create()
     ui.cyr:SetDimensions(250, 26)
     ui.cyr:SetAnchor(TOPLEFT, ui.restart, BOTTOMLEFT, 0, 5)

---    ui.kick = LAMCreateControl.checkbox(ui, {
---        type = "checkbox",
---        name = "Auto kick",
---        tooltip = "Kick players that go offline",
---        getFunc = function() return AutoInvite.cfg.autoKick end,
---        setFunc = function(val) AutoInvite.cfg.autoKick = val  end,
---        width = "half",
---        warning = "Coming soon"
---    })
---    ui.kick:SetDimensions(250, 26)
---    ui.kick:SetAnchor(TOPLEFT, ui.cyr, BOTTOMLEFT, 0, 5)
---
---    ui.kickTime = LAMCreateControl.slider(ui, {
---        type = "slider",
---        name = "Time before kick",
---        tooltip = "Number of seconds to wait before kicking an offline player",
---        min = 5,
---        max = 600,
---        getFunc = function() return AutoInvite.cfg.kickDelay end,
---        setFunc = function(val) AutoInvite.cfg.kickDelay = 300 end,
---        default = 300,
---        width = "half"
---    })
---    ui.kickTime:SetAnchor(TOPLEFT, ui.kick, BOTTOMLEFT, 0, 5)
+    ui.kick = LAMCreateControl.checkbox(ui, {
+        type = "checkbox",
+        name = "Auto kick",
+        tooltip = "Kick players that go offline",
+        getFunc = function() return AutoInvite.cfg.autoKick end,
+        setFunc = function(val) AutoInvite.cfg.autoKick = val  end,
+        width = "half"
+    })
+    ui.kick:SetDimensions(250, 26)
+    ui.kick:SetAnchor(TOPLEFT, ui.cyr, BOTTOMLEFT, 0, 5)

-    ui.note = LAMCreateControl.description(ui, {
-        type = "description",
-        title = "Coming Soon",
-        text = "Automatically kick players offline after certain time",
+    ui.kickTime = LAMCreateControl.slider(ui, {
+        type = "slider",
+        name = "Time before kick",
+        tooltip = "Number of seconds to wait before kicking an offline player",
+        min = 5,
+        max = 600,
+        getFunc = function() return AutoInvite.cfg.kickDelay end,
+        setFunc = function(val) AutoInvite.cfg.kickDelay = val end,
+        default = 300,
         width = "half"
     })
-    ui.note:SetAnchor(TOPLEFT, ui.cyr, BOTTOMLEFT, 0, 25)
-    ui.note.desc:SetColor(.7,.7,.7,1)
+    ui.kickTime:SetAnchor(TOPLEFT, ui.kick, BOTTOMLEFT, 0, 5)
+
+--    ui.note = LAMCreateControl.description(ui, {
+--        type = "description",
+--        title = "Coming Soon",
+--        text = "Automatically kick players offline after certain time",
+--        width = "half"
+--    })
+--    ui.note:SetAnchor(TOPLEFT, ui.cyr, BOTTOMLEFT, 0, 25)
+--    ui.note.desc:SetColor(.7,.7,.7,1)
 end

 function AutoInviteUI.menuShow()