Quantcast

Slow down that timer widget

Scott Sibley [09-03-10 - 04:34]
Slow down that timer widget
Filename
Display.lua
config.lua
diff --git a/Display.lua b/Display.lua
index 5c3cb3b..fea50b7 100644
--- a/Display.lua
+++ b/Display.lua
@@ -52,6 +52,13 @@ local blankOptions = {
 		end,
 		order = 2
 	},
+	scriptProfile = {
+		name = "Turn on CPU profiling",
+		type = "execute",
+		func = function()
+
+		end
+	},
 	displays = {
 		name = "Displays",
 		type = "group",
@@ -228,7 +235,7 @@ function mod:RebuildOpts()
 						order = 100
 					}
 				}
-			}
+			}
 			local driverOptions = {}
 			if v.driver == "qtip" then
 				driverOptions = LibDriverQTip:RebuildOpts(LCD4WoW, v, k)
@@ -239,6 +246,17 @@ function mod:RebuildOpts()
 			for kk, vv in pairs(driverOptions) do
 				options.displays.args[k:gsub(" ", "_")].args[kk] = vv
 			end
+			if v.widgets then
+				for i, widget in ipairs(v.widgets) do
+					options.displays.args[k:gsub(" ", "_")].args.widgets[widget] = {
+						name = widget,
+						type = "input",
+						get = function() return widget end,
+						set = function() v.widgets[i] = val end,
+						order = 50 + i
+					}
+				end
+			end
 		end
 		if k:match("^layout_") then
 			options.layouts.args[k:gsub(" ", "_")] = {
diff --git a/config.lua b/config.lua
index d2a5e5f..7fdd6f7 100644
--- a/config.lua
+++ b/config.lua
@@ -40,7 +40,7 @@ LCD4WoW.config = {
     },
 	["widget_resources_timer"] = {
         type = "timer",
-		update = 100,
+		update = 3000,
 		repeating = true,
 		expression = [[
 if ResourceServer then self.timer:Stop() return end