Fade out the "Restore default" button if using the default script.
Johnny C. Lam [09-15-12 - 23:48]
Fade out the "Restore default" button if using the default script.
git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@523 d5049fe3-3747-40f7-a4b5-f36d6801af5f
diff --git a/OvaleOptions.lua b/OvaleOptions.lua
index e44d39c..e0eb1be 100644
--- a/OvaleOptions.lua
+++ b/OvaleOptions.lua
@@ -282,6 +282,9 @@ local options =
order = 2,
type = "execute",
name = L["Restaurer le défaut"],
+ disabled = function()
+ return OvaleOptions.db.profile.code == OvaleOptions.db.defaults.profile.code
+ end,
func = function()
OvaleOptions.db.profile.code = OvaleOptions.db.defaults.profile.code
Ovale.needCompile = true