From 3e523961b7d6d33954f39a680651206fbbf40b09 Mon Sep 17 00:00:00 2001 From: Scott King Date: Sun, 19 Jul 2015 17:11:53 -0600 Subject: [PATCH] Config panel skeleton --- CHANGELOG.txt | 3 +++ PortraitHealth.lua | 2 +- PortraitHealth.toc | 2 +- PortraitHealthConfig.lua | 17 +++++++++++++++++ PortraitHealthConfig.xml | 13 +++++++++++++ 5 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 PortraitHealthConfig.lua create mode 100644 PortraitHealthConfig.xml diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a3318db..1416489 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,6 @@ +v4.0 + - GUI config + v3.0.2 - simplified execute phase code diff --git a/PortraitHealth.lua b/PortraitHealth.lua index a5c3340..2df90c3 100755 --- a/PortraitHealth.lua +++ b/PortraitHealth.lua @@ -4,7 +4,7 @@ local classDisplayName, class, classID = UnitClass("player"); local PlayerClass = classID; local PlayerClassName = classDisplayName; local PlayerClassNameIndex = class; -local PH_v = '3.0.2'; -- version number +local PH_v = '4.0'; -- version number local limit1 = 0; -- limiter for sounds local executeSound = "Sound\\interface\\AuctionWindowClose.ogg"; local total = 0 -- timer start diff --git a/PortraitHealth.toc b/PortraitHealth.toc index c19094d..79ee7ed 100755 --- a/PortraitHealth.toc +++ b/PortraitHealth.toc @@ -2,7 +2,7 @@ ## Title: Portrait Health ## Notes: See your target's health percentage in bold text over their portrait. ## Author: Cilcraft -## Version: 3.0.2 +## Version: 4.0 ##SavedVariablesPerCharacter: PH_sound, PH_on PortraitHealth.lua PortraitHealth.xml diff --git a/PortraitHealthConfig.lua b/PortraitHealthConfig.lua new file mode 100644 index 0000000..f8ea149 --- /dev/null +++ b/PortraitHealthConfig.lua @@ -0,0 +1,17 @@ +function PH_ConfigFrame_OnLoad(panel) + -- Set the name for the Category for the Panel + -- + panel.name = "PH_ConfigFrame " .. GetAddOnMetadata("Portrait Health", "Version"); + + -- When the player clicks okay, run this function. + -- + panel.okay = function (self) PH_ConfigFrame_Close(); end; + + -- When the player clicks cancel, run this function. + -- + panel.cancel = function (self) PH_ConfigFrame_CancelOrLoad(); end; + + -- Add the panel to the Interface Options + -- + InterfaceOptions_AddCategory(panel); +end diff --git a/PortraitHealthConfig.xml b/PortraitHealthConfig.xml new file mode 100644 index 0000000..db922e1 --- /dev/null +++ b/PortraitHealthConfig.xml @@ -0,0 +1,13 @@ + +