refactor: modularize configuration UI by splitting options into dedicated component files using coding agent

This commit is contained in:
Bluewhale1337
2026-06-25 08:44:56 +02:00
parent 03634b37e4
commit 63fc88b006
18 changed files with 4196 additions and 4141 deletions
+9 -1
View File
@@ -1,6 +1,6 @@
## Interface: 11200 ## Interface: 11200
## Title: HealBotBlue ## Title: HealBotBlue
## Version: 1.2 ## Version: 1.3
## Author: Bluewhale ## Author: Bluewhale
## Notes: Adds panel with skinable bars for healing and decursive ## Notes: Adds panel with skinable bars for healing and decursive
## SavedVariables: HealBot_Config ## SavedVariables: HealBot_Config
@@ -13,3 +13,11 @@ HealBot_Model.lua
HealBot.xml HealBot.xml
HealBot_Action.xml HealBot_Action.xml
HealBot_Options.xml HealBot_Options.xml
HealBot_Options_General.xml
HealBot_Options_Spells.xml
HealBot_Options_Healing.xml
HealBot_Options_CDC.xml
HealBot_Options_Skins.xml
HealBot_Options_Buffs.xml
HealBot_Options_Chat.xml
+1 -1
View File
@@ -1,4 +1,4 @@
HEALBOT_VERSION = "1.2"; HEALBOT_VERSION = "1.3";
------------- -------------
-- ENGLISH -- -- ENGLISH --
+67 -1509
View File
File diff suppressed because it is too large Load Diff
+32 -2630
View File
File diff suppressed because it is too large Load Diff
+112
View File
@@ -0,0 +1,112 @@
-- HealBot Options panel file: HealBot_Options_Buffs.lua
-- Split from original HealBot_Options.lua
function HealBot_Options_BuffWatch_OnClick(self)
local frame = self or this
HealBot_Config.BuffWatch = frame:GetChecked() or 0;
if HealBot_Config.BuffWatch == 0 then
HealBot_Options_BuffWatchInCombat:Disable()
else
HealBot_Options_BuffWatchInCombat:Enable()
end
end
function HealBot_Options_BuffWatchInCombat_OnClick(self)
local frame = self or this
HealBot_Config.BuffWatchInCombat = frame:GetChecked() or 0;
end
function HealBot_Options_BuffSelf_OnLoad(self)
local frame = self or this
getglobal(this:GetName().."Text"):SetText("Self Only")
local id = this:GetID()
if HealBot_Config.BuffWatchSelf and HealBot_Config.BuffWatchSelf[id] then
this:SetChecked(HealBot_Config.BuffWatchSelf[id])
else
this:SetChecked(0)
end
end
function HealBot_Options_BuffSelf_OnClick(self)
local frame = self or this
local id = this:GetID()
if not HealBot_Config.BuffWatchSelf then
HealBot_Config.BuffWatchSelf = {0,0,0,0,0,0,0,0}
end
if frame:GetChecked() then
HealBot_Config.BuffWatchSelf[id] = 1
else
HealBot_Config.BuffWatchSelf[id] = 0
end
end
function HealBot_Options_Buff_OnLoad(self)
local frame = self or this
UIDropDownMenu_Initialize(frame, HealBot_Options_Buff_Initialize)
UIDropDownMenu_SetWidth(110, frame)
end
function HealBot_Options_Buff_Initialize()
local myClass = UnitClass("player")
local info
info = { text = "None", func = HealBot_Options_Buff_OnClick, value = 0 }
UIDropDownMenu_AddButton(info)
if HealBot_Buff_Spells[myClass] then
for i, spellName in ipairs(HealBot_Buff_Spells[myClass]) do
info = {
text = spellName,
func = HealBot_Options_Buff_OnClick,
value = i
}
UIDropDownMenu_AddButton(info)
end
end
end
function HealBot_Options_Buff_OnClick()
local frameName = UIDROPDOWNMENU_OPEN_MENU
local frame = getglobal(frameName)
local myClass = UnitClass("player")
local id = frame:GetID()
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
HealBot_Config.BuffDropDowns[myClass][id] = this.value
local text = "None"
if this.value > 0 then
text = HealBot_Buff_Spells[myClass][this.value]
end
UIDropDownMenu_SetSelectedID(frame, this.value + 1)
UIDropDownMenu_SetText(text, frame)
end
function HealBot_Options_SetBuffs()
local myClass = UnitClass("player")
if HealBot_Options_BuffWatch then
HealBot_Options_BuffWatch:SetChecked(HealBot_Config.BuffWatch)
HealBot_Options_BuffWatchInCombat:SetChecked(HealBot_Config.BuffWatchInCombat)
if HealBot_Config.BuffWatch == 0 then
HealBot_Options_BuffWatchInCombat:Disable()
else
HealBot_Options_BuffWatchInCombat:Enable()
end
end
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
for i = 1, 8 do
local dropDown = getglobal("HealBot_Options_Buff" .. i)
if dropDown then
local val = HealBot_Config.BuffDropDowns[myClass][i] or 0
UIDropDownMenu_Initialize(dropDown, HealBot_Options_Buff_Initialize)
UIDropDownMenu_SetSelectedID(dropDown, val + 1)
end
local selfCheck = getglobal("HealBot_Options_BuffSelf" .. i)
if selfCheck then
if HealBot_Config.BuffWatchSelf and HealBot_Config.BuffWatchSelf[i] then
selfCheck:SetChecked(HealBot_Config.BuffWatchSelf[i])
else
selfCheck:SetChecked(0)
end
end
end
end
+372
View File
@@ -0,0 +1,372 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_Buffs.lua" />
<Frame name="HealBot_Options_Panel6" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_BuffFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="330"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-35"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_BuffPanel_Text" text="Buff Settings" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="15" y="10" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="HealBot_Options_BuffWatch" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BuffFrame" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="15" y="-15"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_WarningSound_OnLoad(this,HEALBOT_OPTIONS_BUFFWATCH)</OnLoad>
<OnClick>HealBot_Options_BuffWatch_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_BuffWatchInCombat" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BuffWatch" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="20" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_WarningSound_OnLoad(this,HEALBOT_OPTIONS_BUFFWATCHINCOMBAT)</OnLoad>
<OnClick>HealBot_Options_BuffWatchInCombat_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff1" inherits="UIDropDownMenuTemplate" id="1">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff1Text" text="HEALBOT_OPTIONS_BUFF1" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BuffWatchInCombat" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-15" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff1Self" inherits="OptionsCheckButtonTemplate" id="1">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff1" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff2" inherits="UIDropDownMenuTemplate" id="2">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff2Text" text="HEALBOT_OPTIONS_BUFF2" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff1" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff2Self" inherits="OptionsCheckButtonTemplate" id="2">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff2" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff3" inherits="UIDropDownMenuTemplate" id="3">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff3Text" text="HEALBOT_OPTIONS_BUFF3" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff2" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff3Self" inherits="OptionsCheckButtonTemplate" id="3">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff3" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff4" inherits="UIDropDownMenuTemplate" id="4">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff4Text" text="HEALBOT_OPTIONS_BUFF4" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff3" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff4Self" inherits="OptionsCheckButtonTemplate" id="4">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff4" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff5" inherits="UIDropDownMenuTemplate" id="5">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff5Text" text="HEALBOT_OPTIONS_BUFF5" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BuffWatchInCombat" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="160" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff5Self" inherits="OptionsCheckButtonTemplate" id="5">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff5" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff6" inherits="UIDropDownMenuTemplate" id="6">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff6Text" text="HEALBOT_OPTIONS_BUFF6" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff5" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff6Self" inherits="OptionsCheckButtonTemplate" id="6">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff6" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff7" inherits="UIDropDownMenuTemplate" id="7">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff7Text" text="HEALBOT_OPTIONS_BUFF7" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff6" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff7Self" inherits="OptionsCheckButtonTemplate" id="7">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff7" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_Buff8" inherits="UIDropDownMenuTemplate" id="8">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_Buff8Text" text="HEALBOT_OPTIONS_BUFF8" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-10" y="15" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff7" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Buff_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_Buff8Self" inherits="OptionsCheckButtonTemplate" id="8">
<Size><AbsDimension x="20" y="20"/></Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Buff8" relativePoint="TOPLEFT">
<Offset><AbsDimension x="40" y="18"/></Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_BuffSelf_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_BuffSelf_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
</Ui>
+289
View File
@@ -0,0 +1,289 @@
-- HealBot Options panel file: HealBot_Options_CDC.lua
-- Split from original HealBot_Options.lua
function HealBot_Options_ShowDebuffWarning_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ShowDebuffWarning_OnClick(this)
HealBot_Config.ShowDebuffWarning = this:GetChecked() or 0;
end
function HealBot_Options_SoundDebuffWarning_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_SoundDebuffWarning_OnClick(this)
HealBot_Config.SoundDebuffWarning = this:GetChecked() or 0;
if HealBot_Config.SoundDebuffWarning==0 then
HealBot_WarningSound1:Disable();
HealBot_WarningSound2:Disable();
HealBot_WarningSound3:Disable();
else
HealBot_WarningSound1:Enable();
HealBot_WarningSound2:Enable();
HealBot_WarningSound3:Enable();
end
end
function HealBot_WarningSound_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_WarningSound_OnClick(this,id)
if HealBot_Config.SoundDebuffPlay>0 then
getglobal("HealBot_WarningSound"..HealBot_Config.SoundDebuffPlay):SetChecked(nil);
end
HealBot_Config.SoundDebuffPlay = id;
if HealBot_Config.SoundDebuffPlay>0 then
getglobal("HealBot_WarningSound"..HealBot_Config.SoundDebuffPlay):SetChecked(1);
if this then
HealBot_PlaySound(HealBot_Config.SoundDebuffPlay)
end
end
end
function HealBot_Options_CDCMonitor_DropDown()
for i=1, getn(HealBot_Options_EmergencyFilter_List), 1 do
local info = {};
info.text = HealBot_Options_EmergencyFilter_List[i];
info.func = HealBot_Options_CDCMonitor_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_CDCMonitor_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_CDCMonitor,HealBot_Options_CDCMonitor_DropDown)
end
function HealBot_Options_CDCMonitor_Refresh(onselect)
if not HealBot_Config.CDCMonitor then return end
if not onselect then HealBot_Options_CDCMonitor_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_CDCMonitor,HealBot_Config.CDCMonitor)
end
function HealBot_Options_CDCMonitor_OnLoad(this)
HealBot_Options_CDCMonitor_Initialize()
UIDropDownMenu_SetWidth(100)
end
function HealBot_Options_CDCMonitor_OnSelect()
HealBot_Config.CDCMonitor = this:GetID()
HealBot_Options_CDCMonitor_Refresh(true)
HealBot_Options_CDCMonitor_Reset()
end
function HealBot_Options_CDCMonitor_Reset()
HealBot_CDCInc[HEALBOT_DRUID] = 0;
HealBot_CDCInc[HEALBOT_HUNTER] = 0;
HealBot_CDCInc[HEALBOT_MAGE] = 0;
HealBot_CDCInc[HEALBOT_PALADIN] = 0;
HealBot_CDCInc[HEALBOT_PRIEST] = 0;
HealBot_CDCInc[HEALBOT_ROGUE] = 0;
HealBot_CDCInc[HEALBOT_SHAMAN] = 0;
HealBot_CDCInc[HEALBOT_WARLOCK] = 0;
HealBot_CDCInc[HEALBOT_WARRIOR] = 0;
if HealBot_Config.CDCMonitor==1 then
HealBot_CDCInc[HEALBOT_DRUID] = 1;
HealBot_CDCInc[HEALBOT_HUNTER] = 1;
HealBot_CDCInc[HEALBOT_MAGE] = 1;
HealBot_CDCInc[HEALBOT_PALADIN] = 1;
HealBot_CDCInc[HEALBOT_PRIEST] = 1;
HealBot_CDCInc[HEALBOT_ROGUE] = 1;
HealBot_CDCInc[HEALBOT_SHAMAN] = 1;
HealBot_CDCInc[HEALBOT_WARLOCK] = 1;
HealBot_CDCInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.CDCMonitor==2 then
HealBot_CDCInc[HEALBOT_DRUID] = 1;
elseif HealBot_Config.CDCMonitor==3 then
HealBot_CDCInc[HEALBOT_HUNTER] = 1;
elseif HealBot_Config.CDCMonitor==4 then
HealBot_CDCInc[HEALBOT_MAGE] = 1;
elseif HealBot_Config.CDCMonitor==5 then
HealBot_CDCInc[HEALBOT_PALADIN] = 1;
elseif HealBot_Config.CDCMonitor==6 then
HealBot_CDCInc[HEALBOT_PRIEST] = 1;
elseif HealBot_Config.CDCMonitor==7 then
HealBot_CDCInc[HEALBOT_ROGUE] = 1;
elseif HealBot_Config.CDCMonitor==8 then
HealBot_CDCInc[HEALBOT_SHAMAN] = 1;
elseif HealBot_Config.CDCMonitor==9 then
HealBot_CDCInc[HEALBOT_WARLOCK] = 1;
elseif HealBot_Config.CDCMonitor==10 then
HealBot_CDCInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.CDCMonitor==11 then
HealBot_CDCInc[HEALBOT_DRUID] = HealBot_Config.EmergIncMelee[HEALBOT_DRUID];
HealBot_CDCInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncMelee[HEALBOT_HUNTER];
HealBot_CDCInc[HEALBOT_MAGE] = HealBot_Config.EmergIncMelee[HEALBOT_MAGE];
HealBot_CDCInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncMelee[HEALBOT_PALADIN];
HealBot_CDCInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncMelee[HEALBOT_PRIEST];
HealBot_CDCInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncMelee[HEALBOT_ROGUE];
HealBot_CDCInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN];
HealBot_CDCInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK];
HealBot_CDCInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR];
elseif HealBot_Config.CDCMonitor==12 then
HealBot_CDCInc[HEALBOT_DRUID] = HealBot_Config.EmergIncRange[HEALBOT_DRUID];
HealBot_CDCInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncRange[HEALBOT_HUNTER];
HealBot_CDCInc[HEALBOT_MAGE] = HealBot_Config.EmergIncRange[HEALBOT_MAGE];
HealBot_CDCInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncRange[HEALBOT_PALADIN];
HealBot_CDCInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncRange[HEALBOT_PRIEST];
HealBot_CDCInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncRange[HEALBOT_ROGUE];
HealBot_CDCInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncRange[HEALBOT_SHAMAN];
HealBot_CDCInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncRange[HEALBOT_WARLOCK];
HealBot_CDCInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncRange[HEALBOT_WARRIOR];
elseif HealBot_Config.CDCMonitor==13 then
HealBot_CDCInc[HEALBOT_DRUID] = HealBot_Config.EmergIncHealers[HEALBOT_DRUID];
HealBot_CDCInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncHealers[HEALBOT_HUNTER];
HealBot_CDCInc[HEALBOT_MAGE] = HealBot_Config.EmergIncHealers[HEALBOT_MAGE];
HealBot_CDCInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncHealers[HEALBOT_PALADIN];
HealBot_CDCInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncHealers[HEALBOT_PRIEST];
HealBot_CDCInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncHealers[HEALBOT_ROGUE];
HealBot_CDCInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN];
HealBot_CDCInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK];
HealBot_CDCInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR];
elseif HealBot_Config.CDCMonitor==14 then
HealBot_CDCInc[HEALBOT_DRUID] = HealBot_Config.EmergIncCustom[HEALBOT_DRUID];
HealBot_CDCInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncCustom[HEALBOT_HUNTER];
HealBot_CDCInc[HEALBOT_MAGE] = HealBot_Config.EmergIncCustom[HEALBOT_MAGE];
HealBot_CDCInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncCustom[HEALBOT_PALADIN];
HealBot_CDCInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncCustom[HEALBOT_PRIEST];
HealBot_CDCInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncCustom[HEALBOT_ROGUE];
HealBot_CDCInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncCustom[HEALBOT_SHAMAN];
HealBot_CDCInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncCustom[HEALBOT_WARLOCK];
HealBot_CDCInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncCustom[HEALBOT_WARRIOR];
end
HealBot_Action_PartyChanged()
end
function HealBot_Options_GetDebuffSpells_List(class)
local DebuffSpells = HealBot_Debuff_Spells[class];
return DebuffSpells;
end
function HealBot_Options_CDCButLeft_DropDown()
local classEN=HealBot_UnitClass("player")
if classEN=="PRIEST" or classEN=="DRUID" or classEN=="PALADIN" or classEN=="SHAMAN" then
local class=UnitClass("Player");
local DebuffSpells_List = HealBot_Options_GetDebuffSpells_List(class)
local info = {};
info.text = "None";
info.func = HealBot_Options_CDCButLeft_OnSelect;
UIDropDownMenu_AddButton(info);
for i=1, getn(DebuffSpells_List), 1 do
local spell=HealBot_GetSpellName(HealBot_GetSpellId(DebuffSpells_List[i]));
if spell then
local info = {};
info.text = spell;
info.func = HealBot_Options_CDCButLeft_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
end
end
function HealBot_Options_CDCButRight_DropDown()
local classEN=HealBot_UnitClass("player")
if classEN=="PRIEST" or classEN=="DRUID" or classEN=="PALADIN" or classEN=="SHAMAN" then
local class=UnitClass("Player");
local DebuffSpells_List = HealBot_Options_GetDebuffSpells_List(class)
local info = {};
info.text = "None";
info.func = HealBot_Options_CDCButRight_OnSelect;
UIDropDownMenu_AddButton(info);
for i=1, getn(DebuffSpells_List), 1 do
local spell=HealBot_GetSpellName(HealBot_GetSpellId(DebuffSpells_List[i]));
if spell then
local info = {};
info.text = spell;
info.func = HealBot_Options_CDCButRight_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
end
end
function HealBot_Options_CDCButLeft_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_CDCButLeft,HealBot_Options_CDCButLeft_DropDown)
end
function HealBot_Options_CDCButRight_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_CDCButRight,HealBot_Options_CDCButRight_DropDown)
end
function HealBot_Options_CDCButLeft_Refresh(onselect)
local set_id=1;
local class=UnitClass("Player");
if not onselect then HealBot_Options_CDCButLeft_Initialize() end
set_id = HealBot_Config.Debuff_Left[class];
UIDropDownMenu_SetSelectedID(HealBot_Options_CDCButLeft,set_id)
end
function HealBot_Options_CDCButRight_Refresh(onselect)
local set_id;
local class=UnitClass("Player");
if not onselect then HealBot_Options_CDCButRight_Initialize() end
set_id = HealBot_Config.Debuff_Right[class];
UIDropDownMenu_SetSelectedID(HealBot_Options_CDCButRight,set_id)
end
function HealBot_Options_CDCButLeft_OnLoad(this)
HealBot_Options_CDCButLeft_Initialize()
UIDropDownMenu_SetWidth(140)
end
function HealBot_Options_CDCButRight_OnLoad(this)
HealBot_Options_CDCButRight_Initialize()
UIDropDownMenu_SetWidth(140)
end
function HealBot_Options_CDCButLeft_OnSelect()
local class=UnitClass("Player");
HealBot_Config.Debuff_Left[class] = this:GetID();
HealBot_Options_CDCButLeft_Refresh(true)
HealBot_Config.CDCLeftText[class]=HealBot_Options_CDCButLeftText:GetText();
if this:GetID()>1 then
HealBot_Options_CDC_SetCombo(HealBot_Options_CDCButLeftText:GetText(), "Left", class)
end
HealBot_DebuffPriority = HealBot_Debuff_Types[HealBot_Options_CDCButLeftText:GetText()];
HealBot_Options_Debuff_Reset()
end
function HealBot_Options_CDCButRight_OnSelect()
local class=UnitClass("Player");
HealBot_Config.Debuff_Right[class] = this:GetID();
HealBot_Options_CDCButRight_Refresh(true)
HealBot_Config.CDCRightText[class]=HealBot_Options_CDCButRightText:GetText();
if this:GetID()>1 then
HealBot_Options_CDC_SetCombo(HealBot_Options_CDCButRightText:GetText(), "Right", class)
end
HealBot_Options_Debuff_Reset()
end
function HealBot_Options_CDC_SetCombo(spell, button, class)
local combo = HealBot_Config.KeyCombo[class]
combo["Alt"..button] = spell
HealBot_Options_KeyCombo_Change()
end
function HealBot_Options_Debuff_Reset()
local classEN=HealBot_UnitClass("player")
if classEN=="PRIEST" or classEN=="DRUID" or classEN=="PALADIN" or classEN=="SHAMAN" then
local spell = HealBot_Config.CDCLeftText[UnitClass("player")];
HealBot_DebuffWatch = {[HEALBOT_DISEASE_en]="NO", [HEALBOT_MAGIC_en]="NO", [HEALBOT_POISON_en]="NO", [HEALBOT_CURSE_en]="NO" }
if spell ~= "None" then
table.foreach(HealBot_Debuff_Types[spell], function (index,debuff)
HealBot_DebuffWatch[debuff]="YES";
end)
end
spell = HealBot_Config.CDCRightText[UnitClass("player")];
if spell ~= "None" then
table.foreach(HealBot_Debuff_Types[spell], function (index,debuff)
HealBot_DebuffWatch[debuff]="YES";
end)
end
end
end
function HealBot_Colorpick_OnClick(CDCType)
HealBot_ColourObjWaiting=CDCType;
HealBot_UseColourPick(HealBot_Config.CDCBarColour[CDCType].R,HealBot_Config.CDCBarColour[CDCType].G,HealBot_Config.CDCBarColour[CDCType].B, nil)
end
function HealBot_SetCDCBarColours()
HealBot_DiseaseColorpick:SetStatusBarColor(HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].R,
HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].G,
HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].B,
HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
HealBot_MagicColorpick:SetStatusBarColor(HealBot_Config.CDCBarColour[HEALBOT_MAGIC_en].R,
HealBot_Config.CDCBarColour[HEALBOT_MAGIC_en].G,
HealBot_Config.CDCBarColour[HEALBOT_MAGIC_en].B,
HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
HealBot_PoisonColorpick:SetStatusBarColor(HealBot_Config.CDCBarColour[HEALBOT_POISON_en].R,
HealBot_Config.CDCBarColour[HEALBOT_POISON_en].G,
HealBot_Config.CDCBarColour[HEALBOT_POISON_en].B,
HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
HealBot_CurseColorpick:SetStatusBarColor(HealBot_Config.CDCBarColour[HEALBOT_CURSE_en].R,
HealBot_Config.CDCBarColour[HEALBOT_CURSE_en].G,
HealBot_Config.CDCBarColour[HEALBOT_CURSE_en].B,
HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
HealBot_DebTextColorpick:SetStatusBarColor(HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].R,
HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].G,
HealBot_Config.CDCBarColour[HEALBOT_DISEASE_en].B,
HealBot_Config.Barcola[HealBot_Config.Current_Skin])
end
+450
View File
@@ -0,0 +1,450 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_CDC.lua" />
<Frame name="HealBot_Options_Panel4" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_CDCMonitor" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="170" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_CDCCLASS">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-105" y="-7"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> HealBot_Options_CDCMonitor_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<Frame name="HealBot_Options_CureDispelCleanse" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="110"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-75"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="-75"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCBut_Text" text="HEALBOT_OPTIONS_CDCBUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="105" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Frame name="HealBot_Options_CDCButLeft" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="100" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_CDCLEFT">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="40" y="-42"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
HealBot_Options_CDCButLeft_OnLoad(this)
</OnLoad>
</Scripts>
</Frame>
<Frame name="HealBot_Options_CDCButRight" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="100" y="-67" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_CDCRIGHT">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="40" y="-74"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
HealBot_Options_CDCButRight_OnLoad(this)
</OnLoad>
</Scripts>
</Frame>
<Frame name="HealBot_Options_CureDispelCleanseCol" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="95"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-185"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="-190"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCCol_Text" text="HEALBOT_OPTIONS_CDCBARS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="98" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<Button name="HealBot_DiseaseColorpickb">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="81" y="-55"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Colorpick_OnClick(HEALBOT_DISEASE_en)</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_DiseaseColorpick" inherits="TextStatusBar">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="81" y="-55"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_DISEASE">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_DiseaseColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_MagicColorpickb">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Colorpick_OnClick(HEALBOT_MAGIC_en)</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_MagicColorpick" inherits="TextStatusBar">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_MAGIC">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_MagicColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_PoisonColorpickb">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-45"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Colorpick_OnClick(HEALBOT_POISON_en)</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_PoisonColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="BOTTOM" relativeTo="HealBot_DiseaseColorpick" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="65" y="-45"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_POISON">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_PoisonColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_CurseColorpickb">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_PoisonColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Colorpick_OnClick(HEALBOT_CURSE_en)</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_CurseColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_PoisonColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_CURSE">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_CurseColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Frame name="HealBot_Options_CureDispelCleanseWarn" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="120"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-285"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="-290"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_CDCWarn_Text" text="HEALBOT_OPTIONS_CDCWARNINGS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="98" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="HealBot_Options_ShowDebuffWarning" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseWarn" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="25" y="90" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowDebuffWarning_OnLoad(this,HEALBOT_OPTIONS_SHOWDEBUFFWARNING)</OnLoad>
<OnClick>HealBot_Options_ShowDebuffWarning_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_SoundDebuffWarning" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowDebuffWarning" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_SoundDebuffWarning_OnLoad(this,HEALBOT_OPTIONS_SOUNDDEBUFFWARNING)</OnLoad>
<OnClick>HealBot_Options_SoundDebuffWarning_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_WarningSound1" inherits="SendMailRadioButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_SoundDebuffWarning" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="25" y="-30"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_WarningSound_OnLoad(this,HEALBOT_OPTIONS_SOUND1)</OnLoad>
<OnClick>HealBot_WarningSound_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_WarningSound2" inherits="SendMailRadioButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_WarningSound1" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="55" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_WarningSound_OnLoad(this,HEALBOT_OPTIONS_SOUND2)</OnLoad>
<OnClick>HealBot_WarningSound_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_WarningSound3" inherits="SendMailRadioButtonTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_WarningSound2" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="65" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_WarningSound_OnLoad(this,HEALBOT_OPTIONS_SOUND3)</OnLoad>
<OnClick>HealBot_WarningSound_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
</Ui>
+136
View File
@@ -0,0 +1,136 @@
-- HealBot Options panel file: HealBot_Options_Chat.lua
-- Split from original HealBot_Options.lua
local HealBot_PlayerSpells = nil
function HealBot_GetPlayerSpells()
if HealBot_PlayerSpells then return HealBot_PlayerSpells end
local spellSet = {}
local i = 1
while true do
local spellName, spellRank = GetSpellName(i, BOOKTYPE_SPELL)
if not spellName then
break
end
spellSet[spellName] = true
i = i + 1
end
local sortedSpells = {}
for k, _ in pairs(spellSet) do
table.insert(sortedSpells, k)
end
table.sort(sortedSpells)
HealBot_PlayerSpells = sortedSpells
return sortedSpells
end
function HealBot_Options_ChatMsg_Spell_Initialize()
local info
info = { text = "None", func = HealBot_Options_ChatMsg_Spell_OnClick, value = "None" }
UIDropDownMenu_AddButton(info)
local spells = HealBot_GetPlayerSpells()
for _, spellName in ipairs(spells) do
info = {
text = spellName,
func = HealBot_Options_ChatMsg_Spell_OnClick,
value = spellName
}
UIDropDownMenu_AddButton(info)
end
end
function HealBot_Options_ChatMsg_Spell_OnClick()
local frameName = UIDROPDOWNMENU_OPEN_MENU
local frame = getglobal(frameName)
local id = frame:GetID()
if not HealBot_Config.ChatMessages then HealBot_Config.ChatMessages = {} end
if not HealBot_Config.ChatMessages[id] then
HealBot_Config.ChatMessages[id] = { Spell = "None", Message = "Casting #Spell# on #Target#", Channel = "None" }
end
HealBot_Config.ChatMessages[id].Spell = this.value
local text = this.value
if text == "None" then text = "None" end
UIDropDownMenu_SetSelectedValue(frame, this.value)
UIDropDownMenu_SetText(text, frame)
end
function HealBot_Options_ChatMsg_Channel_OnClick(id, buttonFrame)
if not HealBot_Config.ChatMessages then HealBot_Config.ChatMessages = {} end
if not HealBot_Config.ChatMessages[id] then
HealBot_Config.ChatMessages[id] = { Spell = "None", Message = "Casting #Spell# on #Target#", Channel = "None" }
end
local current = HealBot_Config.ChatMessages[id].Channel
local nextChan = "None"
if current == "None" then
nextChan = "Say"
elseif current == "Say" then
nextChan = "Party"
elseif current == "Party" then
nextChan = "Raid"
elseif current == "Raid" then
nextChan = "Whisper"
elseif current == "Whisper" then
nextChan = "None"
end
HealBot_Config.ChatMessages[id].Channel = nextChan
buttonFrame:SetText(nextChan)
end
function HealBot_Options_SetChatMessages()
if not HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages = {}
end
for i = 1, 5 do
if not HealBot_Config.ChatMessages[i] then
HealBot_Config.ChatMessages[i] = { Spell = "None", Message = "Casting #Spell# on #Target#", Channel = "None" }
end
end
for i = 1, 5 do
local msgConfig = HealBot_Config.ChatMessages[i]
if msgConfig then
local dropDown = getglobal("HealBot_Options_ChatMsg"..i)
local editBox = getglobal("HealBot_Options_ChatMsg"..i.."_Text")
local chanButton = getglobal("HealBot_Options_ChatMsg"..i.."_Channel")
if dropDown then
UIDropDownMenu_Initialize(dropDown, HealBot_Options_ChatMsg_Spell_Initialize)
UIDropDownMenu_SetSelectedValue(dropDown, msgConfig.Spell)
UIDropDownMenu_SetWidth(110, dropDown)
UIDropDownMenu_SetText(msgConfig.Spell, dropDown)
end
if editBox then
editBox:SetText(msgConfig.Message or "")
end
if chanButton then
chanButton:SetText(msgConfig.Channel or "None")
end
end
end
end
+240
View File
@@ -0,0 +1,240 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_Chat.lua" />
<Frame name="HealBot_Options_Panel7" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<!-- Chat Message 1 -->
<Frame name="HealBot_Options_ChatMsg1" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-30" />
</Offset>
</Anchor>
</Anchors>
</Frame>
<EditBox name="HealBot_Options_ChatMsg1_Text" inherits="InputBoxTemplate" autoFocus="false">
<Size>
<AbsDimension x="200" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg1" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
if HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages[1].Message = this:GetText();
end
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_ChatMsg1_Channel" inherits="UIPanelButtonTemplate" text="None">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg1_Text" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HealBot_Options_ChatMsg_Channel_OnClick(1, this);
</OnClick>
</Scripts>
</Button>
<!-- Chat Message 2 -->
<Frame name="HealBot_Options_ChatMsg2" inherits="UIDropDownMenuTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-90" />
</Offset>
</Anchor>
</Anchors>
</Frame>
<EditBox name="HealBot_Options_ChatMsg2_Text" inherits="InputBoxTemplate" autoFocus="false">
<Size>
<AbsDimension x="200" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg2" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
if HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages[2].Message = this:GetText();
end
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_ChatMsg2_Channel" inherits="UIPanelButtonTemplate" text="None">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg2_Text" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HealBot_Options_ChatMsg_Channel_OnClick(2, this);
</OnClick>
</Scripts>
</Button>
<!-- Chat Message 3 -->
<Frame name="HealBot_Options_ChatMsg3" inherits="UIDropDownMenuTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-150" />
</Offset>
</Anchor>
</Anchors>
</Frame>
<EditBox name="HealBot_Options_ChatMsg3_Text" inherits="InputBoxTemplate" autoFocus="false">
<Size>
<AbsDimension x="200" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg3" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
if HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages[3].Message = this:GetText();
end
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_ChatMsg3_Channel" inherits="UIPanelButtonTemplate" text="None">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg3_Text" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HealBot_Options_ChatMsg_Channel_OnClick(3, this);
</OnClick>
</Scripts>
</Button>
<!-- Chat Message 4 -->
<Frame name="HealBot_Options_ChatMsg4" inherits="UIDropDownMenuTemplate" id="4">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-210" />
</Offset>
</Anchor>
</Anchors>
</Frame>
<EditBox name="HealBot_Options_ChatMsg4_Text" inherits="InputBoxTemplate" autoFocus="false">
<Size>
<AbsDimension x="200" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg4" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
if HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages[4].Message = this:GetText();
end
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_ChatMsg4_Channel" inherits="UIPanelButtonTemplate" text="None">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg4_Text" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HealBot_Options_ChatMsg_Channel_OnClick(4, this);
</OnClick>
</Scripts>
</Button>
<!-- Chat Message 5 -->
<Frame name="HealBot_Options_ChatMsg5" inherits="UIDropDownMenuTemplate" id="5">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-270" />
</Offset>
</Anchor>
</Anchors>
</Frame>
<EditBox name="HealBot_Options_ChatMsg5_Text" inherits="InputBoxTemplate" autoFocus="false">
<Size>
<AbsDimension x="200" y="20"/>
</Size>
<Anchors>
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg5" relativePoint="RIGHT">
<Offset>
<AbsDimension x="0" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
if HealBot_Config.ChatMessages then
HealBot_Config.ChatMessages[5].Message = this:GetText();
end
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_ChatMsg5_Channel" inherits="UIPanelButtonTemplate" text="None">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg5_Text" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-5"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>
HealBot_Options_ChatMsg_Channel_OnClick(5, this);
</OnClick>
</Scripts>
</Button>
</Frames>
</Frame>
</Ui>
+270
View File
@@ -0,0 +1,270 @@
-- HealBot Options panel file: HealBot_Options_General.lua
-- Split from original HealBot_Options.lua
function HealBot_Options_ShowHeaders_OnLoad(this)
getglobal(this:GetName().."Text"):SetText(HEALBOT_OPTIONS_SHOWHEADERS);
end
function HealBot_Options_ShowHeaders_OnClick(this)
HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] = this:GetChecked();
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarTextureS_OnValueChanged(this)
HealBot_Config.btexture[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarHeightS_OnValueChanged(this)
HealBot_Config.bheight[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarWidthS_OnValueChanged(this)
HealBot_Config.bwidth[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarNumColsS_OnValueChanged(this)
HealBot_Config.numcols[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarBRSpaceS_OnValueChanged(this)
HealBot_Config.brspace[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarBCSpaceS_OnValueChanged(this)
HealBot_Config.bcspace[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_FontHeight_OnValueChanged(this)
HealBot_Config.btextheight[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_AbortBarSize_OnValueChanged(this)
HealBot_Config.abortsize[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_ActionAlpha_OnValueChanged(this)
HealBot_Config.backcola[HealBot_Config.Current_Skin] = HealBot_Options_Pct_OnValueChanged(this);
end
function HealBot_Options_BarAlpha_OnValueChanged(this)
HealBot_Config.Barcola[HealBot_Config.Current_Skin] = HealBot_Options_Pct_OnValueChanged(this);
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarAlphaInHeal_OnValueChanged(this)
HealBot_Config.BarcolaInHeal[HealBot_Config.Current_Skin] = HealBot_Options_Pct_OnValueChanged(this);
HealBot_Action_ResetSkin()
end
function HealBot_Options_BarAlphaDis_OnValueChanged(this)
HealBot_Config.bardisa[HealBot_Config.Current_Skin] = HealBot_Options_Pct_OnValueChanged(this);
HealBot_Action_ResetSkin()
end
function HealBot_SkinColorpick_OnClick(SkinType)
HealBot_ColourObjWaiting=SkinType;
if SkinType=="En" then
HealBot_UseColourPick(HealBot_Config.btextenabledcolr[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcolg[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcolb[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcola[HealBot_Config.Current_Skin]);
elseif SkinType=="Dis" then
HealBot_UseColourPick(HealBot_Config.btextdisbledcolr[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcolg[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcolb[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcola[HealBot_Config.Current_Skin])
elseif SkinType=="Debuff" then
HealBot_UseColourPick(HealBot_Config.btextcursecolr[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecolg[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecolb[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecola[HealBot_Config.Current_Skin])
elseif SkinType=="Back" then
HealBot_UseColourPick(HealBot_Config.backcolr[HealBot_Config.Current_Skin],
HealBot_Config.backcolg[HealBot_Config.Current_Skin],
HealBot_Config.backcolb[HealBot_Config.Current_Skin],
HealBot_Config.backcola[HealBot_Config.Current_Skin])
elseif SkinType=="Bor" then
HealBot_UseColourPick(HealBot_Config.borcolr[HealBot_Config.Current_Skin],
HealBot_Config.borcolg[HealBot_Config.Current_Skin],
HealBot_Config.borcolb[HealBot_Config.Current_Skin],
HealBot_Config.borcola[HealBot_Config.Current_Skin])
elseif SkinType=="Abort" then
HealBot_UseColourPick(HealBot_Config.babortcolr[HealBot_Config.Current_Skin],
HealBot_Config.babortcolg[HealBot_Config.Current_Skin],
HealBot_Config.babortcolb[HealBot_Config.Current_Skin],
HealBot_Config.babortcola[HealBot_Config.Current_Skin])
end
end
function HealBot_SetSkinColours()
local btextheight=HealBot_Config.btextheight[HealBot_Config.Current_Skin] or 10;
HealBot_EnTextColorpick:SetStatusBarColor(0,1,0,HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
HealBot_EnTextColorpickin:SetStatusBarColor(0,1,0,HealBot_Config.Barcola[HealBot_Config.Current_Skin]*HealBot_Config.BarcolaInHeal[HealBot_Config.Current_Skin]);
HealBot_DisTextColorpick:SetStatusBarColor(0,1,0,HealBot_Config.bardisa[HealBot_Config.Current_Skin]);
HealBot_EnTextColorpickt:SetTextColor(
HealBot_Config.btextenabledcolr[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcolg[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcolb[HealBot_Config.Current_Skin],
HealBot_Config.btextenabledcola[HealBot_Config.Current_Skin]);
HealBot_DisTextColorpickt:SetTextColor(
HealBot_Config.btextdisbledcolr[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcolg[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcolb[HealBot_Config.Current_Skin],
HealBot_Config.btextdisbledcola[HealBot_Config.Current_Skin]);
HealBot_DebTextColorpickt:SetTextColor(
HealBot_Config.btextcursecolr[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecolg[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecolb[HealBot_Config.Current_Skin],
HealBot_Config.btextcursecola[HealBot_Config.Current_Skin]);
HealBot_BackgroundColorpick:SetStatusBarColor(
HealBot_Config.backcolr[HealBot_Config.Current_Skin],
HealBot_Config.backcolg[HealBot_Config.Current_Skin],
HealBot_Config.backcolb[HealBot_Config.Current_Skin],
HealBot_Config.backcola[HealBot_Config.Current_Skin]);
HealBot_BorderColorpick:SetStatusBarColor(
HealBot_Config.borcolr[HealBot_Config.Current_Skin],
HealBot_Config.borcolg[HealBot_Config.Current_Skin],
HealBot_Config.borcolb[HealBot_Config.Current_Skin],
HealBot_Config.borcola[HealBot_Config.Current_Skin]);
HealBot_AbortColorpick:SetStatusBarColor(
HealBot_Config.babortcolr[HealBot_Config.Current_Skin],
HealBot_Config.babortcolg[HealBot_Config.Current_Skin],
HealBot_Config.babortcolb[HealBot_Config.Current_Skin],
HealBot_Config.babortcola[HealBot_Config.Current_Skin]);
local borderStyle = HealBot_Config.bborder[HealBot_Config.Current_Skin] or 2
if borderStyle == 0 then
HealBot_Action:SetBackdropBorderColor(0,0,0,0);
elseif borderStyle == 1 then
local bboffset = (HealBot_Config.bboffset and HealBot_Config.bboffset[HealBot_Config.Current_Skin]) or 1
local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10
HealBot_Action:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Buttons\\WHITE8X8",
tile = true, tileSize = 8, edgeSize = bboffset,
insets = { left = bpadding, right = bpadding, top = bpadding, bottom = bpadding }
})
HealBot_Action:SetBackdropColor(
HealBot_Config.backcolr[HealBot_Config.Current_Skin],
HealBot_Config.backcolg[HealBot_Config.Current_Skin],
HealBot_Config.backcolb[HealBot_Config.Current_Skin],
HealBot_Config.backcola[HealBot_Config.Current_Skin]);
HealBot_Action:SetBackdropBorderColor(
HealBot_Config.borcolr[HealBot_Config.Current_Skin],
HealBot_Config.borcolg[HealBot_Config.Current_Skin],
HealBot_Config.borcolb[HealBot_Config.Current_Skin],
HealBot_Config.borcola[HealBot_Config.Current_Skin]);
else
HealBot_Action:SetBackdrop({
bgFile = "Interface\\Tooltips\\UI-Tooltip-Background",
edgeFile = "Interface\\Tooltips\\UI-Tooltip-Border",
tile = true, tileSize = 8, edgeSize = 16,
insets = { left = 4, right = 4, top = 4, bottom = 4 }
})
HealBot_Action:SetBackdropColor(
HealBot_Config.backcolr[HealBot_Config.Current_Skin],
HealBot_Config.backcolg[HealBot_Config.Current_Skin],
HealBot_Config.backcolb[HealBot_Config.Current_Skin],
HealBot_Config.backcola[HealBot_Config.Current_Skin]);
HealBot_Action:SetBackdropBorderColor(
HealBot_Config.borcolr[HealBot_Config.Current_Skin],
HealBot_Config.borcolg[HealBot_Config.Current_Skin],
HealBot_Config.borcolb[HealBot_Config.Current_Skin],
HealBot_Config.borcola[HealBot_Config.Current_Skin]);
end
HealBot_EnTextColorpickt:SetTextHeight(btextheight);
HealBot_DisTextColorpickt:SetTextHeight(btextheight);
HealBot_DebTextColorpickt:SetTextHeight(btextheight);
HealBot_EnTextColorpickt:SetText(HEALBOT_SKIN_ENTEXT);
HealBot_DisTextColorpickt:SetText(HEALBOT_SKIN_DISTEXT);
HealBot_DebTextColorpickt:SetText(HEALBOT_SKIN_DEBTEXT);
local barScale = HealBot_EnTextColorpick:GetScale();
HealBot_EnTextColorpick:SetScale(barScale + 0.01);
HealBot_EnTextColorpick:SetScale(barScale);
HealBot_DisTextColorpick:SetScale(barScale + 0.01);
HealBot_DisTextColorpick:SetScale(barScale);
HealBot_DebTextColorpick:SetScale(barScale + 0.01);
HealBot_DebTextColorpick:SetScale(barScale);
HealBot_Action_PartyChanged()
end
function HealBot_Options_AlertLevel_OnValueChanged(this)
HealBot_Config.AlertLevel = HealBot_Options_Pct_OnValueChanged(this);
HealBot_Action_Refresh();
end
function HealBot_Options_AutoShow_OnLoad(this)
getglobal(this:GetName().."Text"):SetText(HEALBOT_OPTIONS_AUTOSHOW);
end
function HealBot_Options_AutoShow_OnClick(this)
HealBot_Config.AutoClose = this:GetChecked() or 0;
HealBot_Action_Refresh();
end
function HealBot_Options_PanelSounds_OnLoad(this)
getglobal(this:GetName().."Text"):SetText(HEALBOT_OPTIONS_PANELSOUNDS);
end
function HealBot_Options_PanelSounds_OnClick(this)
HealBot_Config.PanelSounds = this:GetChecked() or 0;
end
function HealBot_Options_ActionMouseover_OnLoad(this, text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ActionMouseover_OnClick(this)
HealBot_Config.ActionMouseover = this:GetChecked() or 0;
end
function HealBot_Options_ActionLocked_OnLoad(this)
getglobal(this:GetName().."Text"):SetText(HEALBOT_OPTIONS_ACTIONLOCKED);
end
function HealBot_Options_ActionLocked_OnClick(this)
HealBot_Config.ActionLocked = this:GetChecked() or 0;
end
function HealBot_Options_HideOptions_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_HideOptions_OnClick(this)
HealBot_Config.HideOptions = this:GetChecked() or 0;
HealBot_Action_PartyChanged();
end
function HealBot_Options_HideAbort_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_HideAbort_OnClick(this)
HealBot_Config.HideAbort = this:GetChecked() or 0;
HealBot_Action_PartyChanged();
end
function HealBot_Options_GrowUpwards_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_GrowUpwards_OnClick(this)
HealBot_Config.GrowUpwards = this:GetChecked() or 0;
HealBot_Action_PartyChanged();
end
function HealBot_Options_QualityRange_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_QualityRange_OnClick(this)
HealBot_Config.QualityRange = this:GetChecked() or 0;
HealBot_Action_PartyChanged();
end
function HealBot_Options_ProtectPvP_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ProtectPvP_OnClick(this)
HealBot_Config.ProtectPvP = this:GetChecked() or 0;
HealBot_Action_Refresh();
end
function HealBot_Options_FramePaddingS_OnValueChanged(this)
if not HealBot_Config.bpadding then HealBot_Config.bpadding = {} end
HealBot_Config.bpadding[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
function HealBot_Options_BorderThicknessS_OnValueChanged(this)
if not HealBot_Config.bboffset then HealBot_Config.bboffset = {} end
HealBot_Config.bboffset[HealBot_Config.Current_Skin] = this:GetValue();
getglobal(this:GetName().."Text"):SetText(this.text .. ": " .. this:GetValue());
HealBot_Action_ResetSkin()
end
+224
View File
@@ -0,0 +1,224 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_General.lua" />
<Frame name="HealBot_Options_Panel1" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_GenFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="115"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-35"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_GeneralPanel_Text" text="HEALBOT_OPTIONS_PANEL_TEXT" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="75" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="HealBot_Options_ActionLocked" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="10" y="-25" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ActionLocked_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_ActionLocked_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_GrowUpwards" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ActionLocked" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_GrowUpwards_OnLoad(this,HEALBOT_OPTIONS_GROWUPWARDS)</OnLoad>
<OnClick>HealBot_Options_GrowUpwards_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ShowManaBars" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GrowUpwards" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("Show Mana Bars");
this:SetChecked(HealBot_Config.ShowManaBars);
</OnLoad>
<OnClick>
if (this:GetChecked()) then
HealBot_Config.ShowManaBars = 1;
else
HealBot_Config.ShowManaBars = 0;
end
HealBot_Action_Refresh();
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ManaBarsHealersOnly" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowManaBars" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="20" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("For Healers Only");
this:SetChecked(HealBot_Config.ManaBarsHealersOnly);
</OnLoad>
<OnClick>
if (this:GetChecked()) then
HealBot_Config.ManaBarsHealersOnly = 1;
else
HealBot_Config.ManaBarsHealersOnly = 0;
end
HealBot_Action_Refresh();
</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_AutoShow" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ActionLocked" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="125" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_AutoShow_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_AutoShow_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_PanelSounds" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GrowUpwards" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="125" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_PanelSounds_OnLoad(this)</OnLoad>
<OnClick>HealBot_Options_PanelSounds_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ActionMouseover" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_PanelSounds" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ActionMouseover_OnLoad(this,"Enable Action Bar Mouseover")</OnLoad>
<OnClick>HealBot_Options_ActionMouseover_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
<CheckButton name="HealBot_Options_HideOptions" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ManaBarsHealersOnly" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-20" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_HideOptions_OnLoad(this,HEALBOT_OPTIONS_HIDEOPTIONS)</OnLoad>
<OnClick>HealBot_Options_HideOptions_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_HideAbort" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_HideOptions" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_HideAbort_OnLoad(this,HEALBOT_OPTIONS_HIDEABORT)</OnLoad>
<OnClick>HealBot_Options_HideAbort_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_QualityRange" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_HideAbort" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_QualityRange_OnLoad(this,HEALBOT_OPTIONS_QUALITYRANGE)</OnLoad>
<OnClick>HealBot_Options_QualityRange_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ProtectPvP" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_QualityRange" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ProtectPvP_OnLoad(this,HEALBOT_OPTIONS_PROTECTPVP)</OnLoad>
<OnClick>HealBot_Options_ProtectPvP_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
</Ui>
+338
View File
@@ -0,0 +1,338 @@
-- HealBot Options panel file: HealBot_Options_Healing.lua
-- Split from original HealBot_Options.lua
function HealBot_Options_GroupHeals_OnLoad(this,text)
this.text = text
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_GroupHeals_OnClick(this)
HealBot_Config.GroupHeals = this:GetChecked() or 0;
HealBot_RecalcParty();
end
function HealBot_Options_TankHeals_OnLoad(this,text)
this.text = text
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_TankHeals_OnClick(this)
HealBot_Config.TankHeals = this:GetChecked() or 0;
HealBot_RecalcParty();
end
function HealBot_Options_TargetHeals_OnLoad(this,text)
this.text = text
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_TargetHeals_OnClick(this)
HealBot_Config.TargetHeals = this:GetChecked() or 0;
HealBot_RecalcParty();
end
function HealBot_Options_EmergencyHeals_OnLoad(this,text)
this.text = text
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_EmergencyHeals_OnClick(this)
HealBot_Config.EmergencyHeals = this:GetChecked() or 0;
HealBot_RecalcParty();
end
function HealBot_Options_OverHeal_OnValueChanged(this)
HealBot_Config.OverHeal = HealBot_Options_Pct_OnValueChanged(this);
end
function HealBot_Options_EFClass_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_EFClass_OnClick(this)
if HealBot_Config.EmergencyFClass==1 then
HealBot_Config.EmergIncMelee[HEALBOT_DRUID] = HealBot_Options_EFClassDruid:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_HUNTER] = HealBot_Options_EFClassHunter:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_MAGE] = HealBot_Options_EFClassMage:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_PALADIN] = HealBot_Options_EFClassPaladin:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_PRIEST] = HealBot_Options_EFClassPriest:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_ROGUE] = HealBot_Options_EFClassRogue:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN] = HealBot_Options_EFClassShaman:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK] = HealBot_Options_EFClassWarlock:GetChecked() or 0;
HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR] = HealBot_Options_EFClassWarrior:GetChecked() or 0;
elseif HealBot_Config.EmergencyFClass==2 then
HealBot_Config.EmergIncRange[HEALBOT_DRUID] = HealBot_Options_EFClassDruid:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_HUNTER] = HealBot_Options_EFClassHunter:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_MAGE] = HealBot_Options_EFClassMage:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_PALADIN] = HealBot_Options_EFClassPaladin:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_PRIEST] = HealBot_Options_EFClassPriest:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_ROGUE] = HealBot_Options_EFClassRogue:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_SHAMAN] = HealBot_Options_EFClassShaman:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_WARLOCK] = HealBot_Options_EFClassWarlock:GetChecked() or 0;
HealBot_Config.EmergIncRange[HEALBOT_WARRIOR] = HealBot_Options_EFClassWarrior:GetChecked() or 0;
elseif HealBot_Config.EmergencyFClass==3 then
HealBot_Config.EmergIncHealers[HEALBOT_DRUID] = HealBot_Options_EFClassDruid:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_HUNTER] = HealBot_Options_EFClassHunter:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_MAGE] = HealBot_Options_EFClassMage:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_PALADIN] = HealBot_Options_EFClassPaladin:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_PRIEST] = HealBot_Options_EFClassPriest:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_ROGUE] = HealBot_Options_EFClassRogue:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN] = HealBot_Options_EFClassShaman:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK] = HealBot_Options_EFClassWarlock:GetChecked() or 0;
HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR] = HealBot_Options_EFClassWarrior:GetChecked() or 0;
elseif HealBot_Config.EmergencyFClass==4 then
HealBot_Config.EmergIncCustom[HEALBOT_DRUID] = HealBot_Options_EFClassDruid:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_HUNTER] = HealBot_Options_EFClassHunter:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_MAGE] = HealBot_Options_EFClassMage:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_PALADIN] = HealBot_Options_EFClassPaladin:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_PRIEST] = HealBot_Options_EFClassPriest:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_ROGUE] = HealBot_Options_EFClassRogue:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_SHAMAN] = HealBot_Options_EFClassShaman:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_WARLOCK] = HealBot_Options_EFClassWarlock:GetChecked() or 0;
HealBot_Config.EmergIncCustom[HEALBOT_WARRIOR] = HealBot_Options_EFClassWarrior:GetChecked() or 0;
end
if HealBot_Config.EmergIncMonitor>10 then
HealBot_Action_PartyChanged();
end
end
local HealBot_Options_EmergencyFClass_List = {
HEALBOT_CLASSES_MELEE,
HEALBOT_CLASSES_RANGES,
HEALBOT_CLASSES_HEALERS,
HEALBOT_CLASSES_CUSTOM,
}
function HealBot_Options_EmergencyFClass_DropDown()
for i=1, getn(HealBot_Options_EmergencyFClass_List), 1 do
local info = {};
info.text = HealBot_Options_EmergencyFClass_List[i];
info.func = HealBot_Options_EmergencyFClass_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_EmergencyFClass_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_EmergencyFClass,HealBot_Options_EmergencyFClass_DropDown)
end
function HealBot_Options_EmergencyFClass_Refresh(onselect)
if not HealBot_Config.EmergencyFClass then return end
if not onselect then HealBot_Options_EmergencyFClass_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_EmergencyFClass,HealBot_Config.EmergencyFClass)
end
function HealBot_Options_EmergencyFClass_OnLoad(this)
HealBot_Options_EmergencyFClass_Initialize()
UIDropDownMenu_SetWidth(100)
end
function HealBot_Options_EmergencyFClass_OnSelect()
HealBot_Config.EmergencyFClass = this:GetID()
HealBot_Options_EmergencyFClass_Refresh(true)
HealBot_Options_EFClass_Reset()
end
function HealBot_Options_EFClass_Reset()
if HealBot_Config.EmergencyFClass==1 then
HealBot_Options_EFClassDruid:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_DRUID]);
HealBot_Options_EFClassHunter:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_HUNTER]);
HealBot_Options_EFClassMage:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_MAGE]);
HealBot_Options_EFClassPaladin:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_PALADIN]);
HealBot_Options_EFClassPriest:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_PRIEST]);
HealBot_Options_EFClassRogue:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_ROGUE]);
HealBot_Options_EFClassShaman:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN]);
HealBot_Options_EFClassWarlock:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK]);
HealBot_Options_EFClassWarrior:SetChecked(HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR]);
elseif HealBot_Config.EmergencyFClass==2 then
HealBot_Options_EFClassDruid:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_DRUID]);
HealBot_Options_EFClassHunter:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_HUNTER]);
HealBot_Options_EFClassMage:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_MAGE]);
HealBot_Options_EFClassPaladin:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_PALADIN]);
HealBot_Options_EFClassPriest:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_PRIEST]);
HealBot_Options_EFClassRogue:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_ROGUE]);
HealBot_Options_EFClassShaman:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_SHAMAN]);
HealBot_Options_EFClassWarlock:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_WARLOCK]);
HealBot_Options_EFClassWarrior:SetChecked(HealBot_Config.EmergIncRange[HEALBOT_WARRIOR]);
elseif HealBot_Config.EmergencyFClass==3 then
HealBot_Options_EFClassDruid:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_DRUID]);
HealBot_Options_EFClassHunter:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_HUNTER]);
HealBot_Options_EFClassMage:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_MAGE]);
HealBot_Options_EFClassPaladin:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_PALADIN]);
HealBot_Options_EFClassPriest:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_PRIEST]);
HealBot_Options_EFClassRogue:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_ROGUE]);
HealBot_Options_EFClassShaman:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN]);
HealBot_Options_EFClassWarlock:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK]);
HealBot_Options_EFClassWarrior:SetChecked(HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR]);
elseif HealBot_Config.EmergencyFClass==4 then
HealBot_Options_EFClassDruid:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_DRUID]);
HealBot_Options_EFClassHunter:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_HUNTER]);
HealBot_Options_EFClassMage:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_MAGE]);
HealBot_Options_EFClassPaladin:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_PALADIN]);
HealBot_Options_EFClassPriest:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_PRIEST]);
HealBot_Options_EFClassRogue:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_ROGUE]);
HealBot_Options_EFClassShaman:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_SHAMAN]);
HealBot_Options_EFClassWarlock:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_WARLOCK]);
HealBot_Options_EFClassWarrior:SetChecked(HealBot_Config.EmergIncCustom[HEALBOT_WARRIOR]);
end
end
--------------------------------------------------------------------------------
local HealBot_Options_ExtraSort_List = {
HEALBOT_SORTBY_NAME,
HEALBOT_SORTBY_CLASS,
HEALBOT_SORTBY_GROUP,
HEALBOT_SORTBY_MAXHEALTH,
}
function HealBot_Options_ExtraSort_DropDown()
for i=1, getn(HealBot_Options_ExtraSort_List), 1 do
local info = {};
info.text = HealBot_Options_ExtraSort_List[i];
info.func = HealBot_Options_ExtraSort_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_ExtraSort_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_ExtraSort,HealBot_Options_ExtraSort_DropDown)
end
function HealBot_Options_ExtraSort_Refresh(onselect)
if not HealBot_Config.ExtraOrder then return end
if not onselect then HealBot_Options_ExtraSort_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_ExtraSort,HealBot_Config.ExtraOrder)
end
function HealBot_Options_ExtraSort_OnLoad(this)
HealBot_Options_ExtraSort_Initialize()
UIDropDownMenu_SetWidth(100)
end
function HealBot_Options_ExtraSort_OnSelect()
HealBot_Config.ExtraOrder = this:GetID()
HealBot_Options_ExtraSort_Refresh(true)
HealBot_Action_PartyChanged()
end
--------------------------------------------------------------------------------
function HealBot_Options_EmergencyFilter_DropDown()
for i=1, getn(HealBot_Options_EmergencyFilter_List), 1 do
local info = {};
info.text = HealBot_Options_EmergencyFilter_List[i];
info.func = HealBot_Options_EmergencyFilter_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_EmergencyFilter_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_EmergencyFilter,HealBot_Options_EmergencyFilter_DropDown)
end
function HealBot_Options_EmergencyFilter_Refresh(onselect)
if not HealBot_Config.EmergIncMonitor then return end
if not onselect then HealBot_Options_EmergencyFilter_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_EmergencyFilter,HealBot_Config.EmergIncMonitor)
end
function HealBot_Options_EmergencyFilter_OnLoad(this)
HealBot_Options_EmergencyFilter_Initialize()
UIDropDownMenu_SetWidth(100)
end
function HealBot_Options_EmergencyFilter_OnSelect()
HealBot_Config.EmergIncMonitor = this:GetID()
HealBot_Options_EmergencyFilter_Refresh(true)
HealBot_Options_EmergencyFilter_Reset()
end
function HealBot_Options_EmergencyFilter_Reset()
HealBot_EmergInc[HEALBOT_DRUID] = 0;
HealBot_EmergInc[HEALBOT_HUNTER] = 0;
HealBot_EmergInc[HEALBOT_MAGE] = 0;
HealBot_EmergInc[HEALBOT_PALADIN] = 0;
HealBot_EmergInc[HEALBOT_PRIEST] = 0;
HealBot_EmergInc[HEALBOT_ROGUE] = 0;
HealBot_EmergInc[HEALBOT_SHAMAN] = 0;
HealBot_EmergInc[HEALBOT_WARLOCK] = 0;
HealBot_EmergInc[HEALBOT_WARRIOR] = 0;
if HealBot_Config.EmergIncMonitor==1 then
HealBot_EmergInc[HEALBOT_DRUID] = 1;
HealBot_EmergInc[HEALBOT_HUNTER] = 1;
HealBot_EmergInc[HEALBOT_MAGE] = 1;
HealBot_EmergInc[HEALBOT_PALADIN] = 1;
HealBot_EmergInc[HEALBOT_PRIEST] = 1;
HealBot_EmergInc[HEALBOT_ROGUE] = 1;
HealBot_EmergInc[HEALBOT_SHAMAN] = 1;
HealBot_EmergInc[HEALBOT_WARLOCK] = 1;
HealBot_EmergInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.EmergIncMonitor==2 then
HealBot_EmergInc[HEALBOT_DRUID] = 1;
elseif HealBot_Config.EmergIncMonitor==3 then
HealBot_EmergInc[HEALBOT_HUNTER] = 1;
elseif HealBot_Config.EmergIncMonitor==4 then
HealBot_EmergInc[HEALBOT_MAGE] = 1;
elseif HealBot_Config.EmergIncMonitor==5 then
HealBot_EmergInc[HEALBOT_PALADIN] = 1;
elseif HealBot_Config.EmergIncMonitor==6 then
HealBot_EmergInc[HEALBOT_PRIEST] = 1;
elseif HealBot_Config.EmergIncMonitor==7 then
HealBot_EmergInc[HEALBOT_ROGUE] = 1;
elseif HealBot_Config.EmergIncMonitor==8 then
HealBot_EmergInc[HEALBOT_SHAMAN] = 1;
elseif HealBot_Config.EmergIncMonitor==9 then
HealBot_EmergInc[HEALBOT_WARLOCK] = 1;
elseif HealBot_Config.EmergIncMonitor==10 then
HealBot_EmergInc[HEALBOT_WARRIOR] = 1;
elseif HealBot_Config.EmergIncMonitor==11 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncMelee[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncMelee[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncMelee[HEALBOT_MAGE];
HealBot_EmergInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncMelee[HEALBOT_PALADIN];
HealBot_EmergInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncMelee[HEALBOT_PRIEST];
HealBot_EmergInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncMelee[HEALBOT_ROGUE];
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncMelee[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncMelee[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncMelee[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==12 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncRange[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncRange[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncRange[HEALBOT_MAGE];
HealBot_EmergInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncRange[HEALBOT_PALADIN];
HealBot_EmergInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncRange[HEALBOT_PRIEST];
HealBot_EmergInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncRange[HEALBOT_ROGUE];
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncRange[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncRange[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncRange[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==13 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncHealers[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncHealers[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncHealers[HEALBOT_MAGE];
HealBot_EmergInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncHealers[HEALBOT_PALADIN];
HealBot_EmergInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncHealers[HEALBOT_PRIEST];
HealBot_EmergInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncHealers[HEALBOT_ROGUE];
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncHealers[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncHealers[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncHealers[HEALBOT_WARRIOR];
elseif HealBot_Config.EmergIncMonitor==14 then
HealBot_EmergInc[HEALBOT_DRUID] = HealBot_Config.EmergIncCustom[HEALBOT_DRUID];
HealBot_EmergInc[HEALBOT_HUNTER] = HealBot_Config.EmergIncCustom[HEALBOT_HUNTER];
HealBot_EmergInc[HEALBOT_MAGE] = HealBot_Config.EmergIncCustom[HEALBOT_MAGE];
HealBot_EmergInc[HEALBOT_PALADIN] = HealBot_Config.EmergIncCustom[HEALBOT_PALADIN];
HealBot_EmergInc[HEALBOT_PRIEST] = HealBot_Config.EmergIncCustom[HEALBOT_PRIEST];
HealBot_EmergInc[HEALBOT_ROGUE] = HealBot_Config.EmergIncCustom[HEALBOT_ROGUE];
HealBot_EmergInc[HEALBOT_SHAMAN] = HealBot_Config.EmergIncCustom[HEALBOT_SHAMAN];
HealBot_EmergInc[HEALBOT_WARLOCK] = HealBot_Config.EmergIncCustom[HEALBOT_WARLOCK];
HealBot_EmergInc[HEALBOT_WARRIOR] = HealBot_Config.EmergIncCustom[HEALBOT_WARRIOR];
end
HealBot_Action_PartyChanged()
end
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
+359
View File
@@ -0,0 +1,359 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_Healing.lua" />
<Frame name="HealBot_Options_Panel3" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_HealTargetFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="88"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-30"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_HealButtons_Text" text="HEALBOT_OPTIONS_HEAL_BUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="100" y="-8" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="HealBot_Options_GroupHeals" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="25" y="-21" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_GroupHeals_OnLoad(this,HEALBOT_OPTIONS_GROUPHEALS)</OnLoad>
<OnClick>HealBot_Options_GroupHeals_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_TankHeals" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_TankHeals_OnLoad(this,HEALBOT_OPTIONS_TANKHEALS)</OnLoad>
<OnClick>HealBot_Options_TankHeals_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_TargetHeals" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="122" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_TargetHeals_OnLoad(this,HEALBOT_OPTIONS_TARGETHEALS)</OnLoad>
<OnClick>HealBot_Options_TargetHeals_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EmergencyHeals" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="122" y="5" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EmergencyHeals_OnLoad(this,HEALBOT_OPTIONS_EMERGENCYHEALS)</OnLoad>
<OnClick>HealBot_Options_EmergencyHeals_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
<Slider name="HealBot_Options_AlertLevel" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="45" y="-132" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_ALERTLEVEL)</OnLoad>
<OnValueChanged>HealBot_Options_AlertLevel_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_OverHeal" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_AlertLevel" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-27" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_OVERHEAL)</OnLoad>
<OnValueChanged>HealBot_Options_OverHeal_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Frame name="HealBot_Options_EmergencyFilter" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="155" y="-205" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_EMERGFILTER">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-110" y="-7"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
HealBot_Options_EmergencyFilter_OnLoad(this)
</OnLoad>
</Scripts>
</Frame>
<Frame name="HealBot_Options_ExtraSort" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="155" y="-238" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_EXTRASORT">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-110" y="-7"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>
HealBot_Options_ExtraSort_OnLoad(this)
</OnLoad>
</Scripts>
</Frame>
<Frame name="HealBot_Options_EmergLFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="125"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-275"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Frames>
<Frame name="HealBot_Options_EmergencyFClass" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="128" y="-10" />
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_EMERGFCLASS">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-105" y="-7"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> HealBot_Options_EmergencyFClass_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_EFClassDruid" inherits="SendMailRadioButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EmergencyFClass" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-90" y="-8"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_DRUID)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassHunter" inherits="SendMailRadioButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassDruid" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_HUNTER)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassMage" inherits="SendMailRadioButtonTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassHunter" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_MAGE)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassPaladin" inherits="SendMailRadioButtonTemplate" id="4">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassDruid" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-8"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_PALADIN)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassPriest" inherits="SendMailRadioButtonTemplate" id="5">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassPaladin" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_PRIEST)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassRogue" inherits="SendMailRadioButtonTemplate" id="6">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassPriest" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_ROGUE)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassShaman" inherits="SendMailRadioButtonTemplate" id="7">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassPaladin" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-8"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_SHAMAN)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassWarlock" inherits="SendMailRadioButtonTemplate" id="8">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassShaman" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_WARLOCK)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_EFClassWarrior" inherits="SendMailRadioButtonTemplate" id="9">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_EFClassWarlock" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="62" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EFClass_OnLoad(this,HEALBOT_WARRIOR)</OnLoad>
<OnClick>HealBot_Options_EFClass_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
</Frames>
</Frame>
</Ui>
+128
View File
@@ -0,0 +1,128 @@
-- HealBot Options panel file: HealBot_Options_Skins.lua
-- Split from original HealBot_Options.lua
function HealBot_Options_NewSkin_OnTextChanged(this)
local text= this:GetText()
if string.len(text)>0 then
HealBot_Options_NewSkinb:Enable();
else
HealBot_Options_NewSkinb:Disable();
end
end
function HealBot_Options_NewSkinb_OnClick(this)
HealBot_Config.numcols[HealBot_Options_NewSkin:GetText()] = HealBot_Config.numcols[HealBot_Config.Current_Skin]
HealBot_Config.btexture[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btexture[HealBot_Config.Current_Skin]
HealBot_Config.bcspace[HealBot_Options_NewSkin:GetText()] = HealBot_Config.bcspace[HealBot_Config.Current_Skin]
HealBot_Config.brspace[HealBot_Options_NewSkin:GetText()] = HealBot_Config.brspace[HealBot_Config.Current_Skin]
HealBot_Config.bwidth[HealBot_Options_NewSkin:GetText()] = HealBot_Config.bwidth[HealBot_Config.Current_Skin]
HealBot_Config.bheight[HealBot_Options_NewSkin:GetText()] = HealBot_Config.bheight[HealBot_Config.Current_Skin]
HealBot_Config.btextenabledcolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextenabledcolr[HealBot_Config.Current_Skin]
HealBot_Config.btextenabledcolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextenabledcolg[HealBot_Config.Current_Skin]
HealBot_Config.btextenabledcolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextenabledcolb[HealBot_Config.Current_Skin]
HealBot_Config.btextenabledcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextenabledcola[HealBot_Config.Current_Skin]
HealBot_Config.btextdisbledcolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextdisbledcolr[HealBot_Config.Current_Skin]
HealBot_Config.btextdisbledcolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextdisbledcolg[HealBot_Config.Current_Skin]
HealBot_Config.btextdisbledcolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextdisbledcolb[HealBot_Config.Current_Skin]
HealBot_Config.btextdisbledcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextdisbledcola[HealBot_Config.Current_Skin]
HealBot_Config.btextcursecolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextcursecolr[HealBot_Config.Current_Skin]
HealBot_Config.btextcursecolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextcursecolg[HealBot_Config.Current_Skin]
HealBot_Config.btextcursecolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextcursecolb[HealBot_Config.Current_Skin]
HealBot_Config.btextcursecola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextcursecola[HealBot_Config.Current_Skin]
HealBot_Config.backcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.backcola[HealBot_Config.Current_Skin]
HealBot_Config.Barcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.Barcola[HealBot_Config.Current_Skin]
HealBot_Config.BarcolaInHeal[HealBot_Options_NewSkin:GetText()] = HealBot_Config.BarcolaInHeal[HealBot_Config.Current_Skin]
HealBot_Config.backcolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.backcolr[HealBot_Config.Current_Skin]
HealBot_Config.backcolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.backcolg[HealBot_Config.Current_Skin]
HealBot_Config.backcolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.backcolb[HealBot_Config.Current_Skin]
HealBot_Config.borcolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.borcolr[HealBot_Config.Current_Skin]
HealBot_Config.borcolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.borcolg[HealBot_Config.Current_Skin]
HealBot_Config.borcolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.borcolb[HealBot_Config.Current_Skin]
HealBot_Config.borcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.borcola[HealBot_Config.Current_Skin]
HealBot_Config.btextheight[HealBot_Options_NewSkin:GetText()] = HealBot_Config.btextheight[HealBot_Config.Current_Skin]
HealBot_Config.bardisa[HealBot_Options_NewSkin:GetText()] = HealBot_Config.bardisa[HealBot_Config.Current_Skin]
HealBot_Config.abortsize[HealBot_Options_NewSkin:GetText()] = HealBot_Config.abortsize[HealBot_Config.Current_Skin]
HealBot_Config.babortcolr[HealBot_Options_NewSkin:GetText()] = HealBot_Config.babortcolr[HealBot_Config.Current_Skin]
HealBot_Config.babortcolg[HealBot_Options_NewSkin:GetText()] = HealBot_Config.babortcolg[HealBot_Config.Current_Skin]
HealBot_Config.babortcolb[HealBot_Options_NewSkin:GetText()] = HealBot_Config.babortcolb[HealBot_Config.Current_Skin]
HealBot_Config.babortcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.babortcola[HealBot_Config.Current_Skin]
HealBot_Config.ShowHeader[HealBot_Options_NewSkin:GetText()] = HealBot_Config.ShowHeader[HealBot_Config.Current_Skin]
table.insert(HealBot_Skins,2,HealBot_Options_NewSkin:GetText())
HealBot_Config.Skin_ID = 2;
HealBot_Config.Skins = HealBot_Skins; HealBot_Config.Current_Skin = HealBot_Options_NewSkin:GetText();
HealBot_Options_SetSkins()
HealBot_Options_NewSkin:SetText("")
end
function HealBot_Options_DeleteSkin_OnClick(this)
if HealBot_Config.Current_Skin~=HEALBOT_SKINS_STD then
HealBot_Config.numcols[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btexture[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.bcspace[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.brspace[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.bwidth[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.bheight[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextenabledcolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextenabledcolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextenabledcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextenabledcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextdisbledcolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextdisbledcolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextdisbledcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextdisbledcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextcursecolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextcursecolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextcursecolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextcursecola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.backcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.Barcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.BarcolaInHeal[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.backcolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.backcolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.backcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.borcolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.borcolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.borcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.borcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.btextheight[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.bardisa[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.abortsize[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.babortcolr[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.babortcolg[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.babortcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.babortcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.ShowHeader[HealBot_Options_SkinsText:GetText()] = nil
table.remove(HealBot_Skins,HealBot_Config.Skin_ID)
HealBot_Config.Skin_ID = 1;
HealBot_Config.Skins = HealBot_Skins;
HealBot_Config.Current_Skin = HEALBOT_SKINS_STD;
HealBot_Options_SetSkins()
end
end
function HealBot_Options_Skins_DropDown()
for i=1, getn(HealBot_Skins), 1 do
local info = {};
info.text = HealBot_Skins[i];
info.func = HealBot_Options_Skins_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_Skins_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_Skins,HealBot_Options_Skins_DropDown)
end
function HealBot_Options_Skins_Refresh(onselect)
if not HealBot_Config.Skin_ID then return end
if not onselect then HealBot_Options_Skins_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_Skins,HealBot_Config.Skin_ID)
end
function HealBot_Options_Skins_OnLoad(this)
HealBot_Options_Skins_Initialize()
UIDropDownMenu_SetWidth(100)
end
function HealBot_Options_Skins_OnSelect()
HealBot_Config.Skin_ID = this:GetID()
HealBot_Options_Skins_Refresh(true)
if this:GetID()>=1 then
HealBot_Config.Current_Skin = this:GetText()
HealBot_Options_SetSkins()
end
end
+666
View File
@@ -0,0 +1,666 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_Skins.lua" />
<Frame name="HealBot_Options_Panel5" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_Skins" inherits="UIDropDownMenuTemplate" id="1">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_ScaleFrameText" text="HEALBOT_OPTIONS_SKINTEXT" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-45" y="-5" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="70" y="-28" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> HealBot_Options_Skins_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<Button name="HealBot_Options_DeleteSkin" inherits="UIPanelButtonTemplate" text="HEALBOT_OPTIONS_DELSKIN">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Skins" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="7" y="-1"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Options_DeleteSkin_OnClick(this)</OnClick>
</Scripts>
</Button>
<EditBox name="HealBot_Options_NewSkin" inherits="HealBot_Options_EditBoxTemplate">
<Size>
<AbsDimension x="100" y="20"/>
</Size>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_ScaleFrameText2" text="HEALBOT_OPTIONS_NEWSKINTEXT" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="-70" y="-2" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Skins" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="25" y="-2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnTextChanged>
HealBot_Options_NewSkin_OnTextChanged(this)
</OnTextChanged>
</Scripts>
</EditBox>
<Button name="HealBot_Options_NewSkinb" inherits="UIPanelButtonTemplate" text="HEALBOT_OPTIONS_SAVESKIN">
<Size>
<AbsDimension x="80" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_NewSkin" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="32" y="2"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_Options_NewSkinb_OnClick(this)</OnClick>
</Scripts>
</Button>
<Frame name="HealBot_Options_Scale" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="325"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-88"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-20" y="-180"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_ScaleFrameText3" text="HEALBOT_OPTIONS_SKINBARS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="50" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="HealBot_Options_ShowHeaders" inherits="SendMailRadioButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="155" y="-8" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)</OnLoad>
<OnClick>HealBot_Options_ShowHeaders_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_BarColorMode" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-8" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Class Colors")</OnLoad>
<OnClick>HealBot_Config.bcolormode[HealBot_Config.Current_Skin] = (this:GetChecked() and 2 or 1); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_FontOutline" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-33" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Font Outline")</OnLoad>
<OnClick>HealBot_Config.bfontoutline[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_1pxBorders" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-58" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("1px Borders")</OnLoad>
<OnClick>HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<Slider name="HealBot_Options_BarTextureS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-40" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14)</OnLoad>
<OnValueChanged>HealBot_Options_BarTextureS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarNumColsS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="18" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarTextureS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINNUMCOLS,1,8)</OnLoad>
<OnValueChanged>HealBot_Options_BarNumColsS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarHeightS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="18" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarTextureS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-32" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINHEIGHT,10,100)</OnLoad>
<OnValueChanged>HealBot_Options_BarHeightS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarWidthS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarHeightS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINWIDTH,50,225)</OnLoad>
<OnValueChanged>HealBot_Options_BarWidthS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarBRSpaceS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarHeightS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-32" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBRSPACE,0,10)</OnLoad>
<OnValueChanged>HealBot_Options_BarBRSpaceS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarBCSpaceS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBCSPACE,0,25)</OnLoad>
<OnValueChanged>HealBot_Options_BarBCSpaceS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_FramePaddingS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Frame Padding",0,50)</OnLoad>
<OnValueChanged>HealBot_Options_FramePaddingS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BorderThicknessS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FramePaddingS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Solid Border",1,10)</OnLoad>
<OnValueChanged>HealBot_Options_BorderThicknessS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlpha" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="10" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHA,0.25,1)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlpha_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaInHeal" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlpha" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHAINHEAL,0.05,0.75)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaInHeal_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaDis" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaInHeal" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_BARALPHADIS)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaDis_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_FontHeight" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size> <Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-132" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINFHEIGHT,7,18)</OnLoad>
<OnValueChanged>HealBot_Options_FontHeight_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_AbortBarSize" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_ABORTSIZE,0,15)</OnLoad>
<OnValueChanged>HealBot_Options_AbortBarSize_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Button name="HealBot_EnTextColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("En")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_EnTextColorpick" inherits="TextStatusBar">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="HealBot_EnTextColorpickt" inherits="GameFontNormalSmall" text="HEALBOT_SKIN_ENTEXT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_EnTextColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(70); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<StatusBar name="HealBot_EnTextColorpickin" inherits="TextStatusBar">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_DisTextColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_EnTextColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("Dis")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_DisTextColorpick" inherits="TextStatusBar">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_EnTextColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="HealBot_DisTextColorpickt" inherits="GameFontNormalSmall" text="HEALBOT_SKIN_DISTEXT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_DisTextColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_DebTextColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_DisTextColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("Debuff")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_DebTextColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_DisTextColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString name="HealBot_DebTextColorpickt" inherits="GameFontNormalSmall" text="HEALBOT_SKIN_DEBTEXT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_DebTextColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_BackgroundColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_EnTextColorpick" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-25"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("Back")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_BackgroundColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_EnTextColorpick" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-25"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_SKIN_BACKTEXT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_BackgroundColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_BorderColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_BackgroundColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("Bor")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_BorderColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_BackgroundColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_SKIN_BORDERTEXT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_BorderColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Button name="HealBot_AbortColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_BorderColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnClick>HealBot_SkinColorpick_OnClick("Abort")</OnClick>
</Scripts>
</Button>
<StatusBar name="HealBot_AbortColorpick" inherits="HealBot_ColourButtonTemplate">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_BorderColorpick" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="5" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_ACTION_ABORT">
<Anchors>
<Anchor point="CENTER" relativeTo="HealBot_AbortColorpick" relativePoint="CENTER">
<Offset>
<AbsDimension x="0" y="1"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad> this:SetMinMaxValues(0,100); this:SetValue(100); </OnLoad>
</Scripts>
<BarTexture file="Interface\TargetingFrame\UI-StatusBar"/>
<BarColor r="0" g="1" b="0"/>
</StatusBar>
</Frames>
</Frame>
</Frames>
</Frame>
</Ui>
+195
View File
@@ -0,0 +1,195 @@
-- HealBot Options panel file: HealBot_Options_Spells.lua
-- Split from original HealBot_Options.lua
function HealBot_ComboButtons_Button_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_ComboButtons_Button_OnClick(this,id)
if HealBot_Options_ComboButtons_Button>0 then
getglobal("HealBot_ComboButtons_Button"..HealBot_Options_ComboButtons_Button):SetChecked(nil);
end
HealBot_Options_ComboButtons_Button = id;
if HealBot_Options_ComboButtons_Button>0 then
getglobal("HealBot_ComboButtons_Button"..HealBot_Options_ComboButtons_Button):SetChecked(1);
end
HealBot_Options_ComboClass_Text()
end
function HealBot_Options_ShowTooltip_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ShowTooltip_OnClick(this)
HealBot_Config.ShowTooltip = this:GetChecked() or 0;
end
function HealBot_Options_ShowTooltipTarget_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ShowTooltipTarget_OnClick(this)
HealBot_Config.Tooltip_ShowTarget = this:GetChecked() or 0;
end
function HealBot_Options_ShowTooltipSpellDetail_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ShowTooltipSpellDetail_OnClick(this)
HealBot_Config.Tooltip_ShowSpellDetail = this:GetChecked() or 0;
end
function HealBot_Options_ShowTooltipInstant_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_ShowTooltipInstant_OnClick(this)
HealBot_Config.Tooltip_Recommend = this:GetChecked() or 0;
end
local HealBot_Options_TooltipPos_List = {
HEALBOT_TOOLTIP_POSDEFAULT,
HEALBOT_TOOLTIP_POSLEFT,
HEALBOT_TOOLTIP_POSRIGHT,
HEALBOT_TOOLTIP_POSABOVE,
HEALBOT_TOOLTIP_POSBELOW,
}
function HealBot_Options_TooltipPos_DropDown()
for i=1, getn(HealBot_Options_TooltipPos_List), 1 do
local info = {};
info.text = HealBot_Options_TooltipPos_List[i];
info.func = HealBot_Options_TooltipPos_OnSelect;
UIDropDownMenu_AddButton(info);
end
end
function HealBot_Options_TooltipPos_Initialize()
UIDropDownMenu_Initialize(HealBot_Options_TooltipPos,HealBot_Options_TooltipPos_DropDown)
end
function HealBot_Options_TooltipPos_Refresh(onselect)
if not HealBot_Config.TooltipPos then return end
if not onselect then HealBot_Options_TooltipPos_Initialize() end -- or wrong menu may be used !
UIDropDownMenu_SetSelectedID(HealBot_Options_TooltipPos,HealBot_Config.TooltipPos)
end
function HealBot_Options_TooltipPos_OnLoad(this)
HealBot_Options_TooltipPos_Initialize()
UIDropDownMenu_SetWidth(128)
end
function HealBot_Options_TooltipPos_OnSelect()
HealBot_Config.TooltipPos = this:GetID()
HealBot_Options_TooltipPos_Refresh(true)
end
--------------------------------------------------------------------------------
local HealBot_Options_ComboClass_List = {
HEALBOT_DRUID,
HEALBOT_PALADIN,
HEALBOT_PRIEST,
HEALBOT_SHAMAN,
}
function HealBot_Options_ComboClass_Text()
local class=UnitClass("Player");
local combo = HealBot_Config.KeyCombo[class]
local button = HealBot_Options_ComboClass_Button()
if combo then
HealBot_Options_Click:SetText(combo[button] or "")
HealBot_Options_Shift:SetText(combo["Shift"..button] or "")
HealBot_Options_Ctrl:SetText(combo["Ctrl"..button] or "")
HealBot_Options_ShiftCtrl:SetText(combo["ShiftCtrl"..button] or "")
end
end
function HealBot_Options_ComboClass_Button()
local button = "Left"
if HealBot_Options_ComboButtons_Button==2 then button = "Middle"; end
if HealBot_Options_ComboButtons_Button==3 then button = "Right"; end
if HealBot_Options_ComboButtons_Button==4 then button = "Button4"; end
if HealBot_Options_ComboButtons_Button==5 then button = "Button5"; end
return button;
end
ColorPickerFrame.func = HealBot_Returned_Colours
--------------------------------------------------------------------------------
function HealBot_Options_EditBox_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_Click_OnTextChanged(this)
local class=UnitClass("Player");
local combo = HealBot_Config.KeyCombo[class]
local button = HealBot_Options_ComboClass_Button()
combo[button] = this:GetText()
HealBot_Options_KeyCombo_Change()
end
function HealBot_Options_Shift_OnTextChanged(this)
local class=UnitClass("Player");
local combo = HealBot_Config.KeyCombo[class]
local button = HealBot_Options_ComboClass_Button()
combo["Shift"..button] = this:GetText()
HealBot_Options_KeyCombo_Change()
end
function HealBot_Options_Ctrl_OnTextChanged(this)
local class=UnitClass("Player");
local combo = HealBot_Config.KeyCombo[class]
local button = HealBot_Options_ComboClass_Button()
combo["Ctrl"..button] = this:GetText()
HealBot_Options_KeyCombo_Change()
end
function HealBot_Options_ShiftCtrl_OnTextChanged(this)
local class=UnitClass("Player");
local combo = HealBot_Config.KeyCombo[class]
local button = HealBot_Options_ComboClass_Button()
combo["ShiftCtrl"..button] = this:GetText()
HealBot_Options_KeyCombo_Change()
end
function HealBot_Options_KeyCombo_Change()
local class=UnitClass("Player");
HealBot_Config.KeyCombo[class]=HealBot_Config.KeyCombo[class];
end
function HealBot_Options_EnableHealthy_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
function HealBot_Options_EnableHealthy_OnClick(this)
HealBot_Config.EnableHealthy = this:GetChecked() or 0;
HealBot_Action_EnableButtons();
end
--------------------------------------------------------------------------------
HealBot_Options_CurrentPanel = 0;
--------------------------------------------------------------------------------
-- Chat Custom Messages UI Logic
--------------------------------------------------------------------------------
+308
View File
@@ -0,0 +1,308 @@
<Ui xmlns="http://www.blizzard.com/wow/ui/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.blizzard.com/wow/ui/ ..\FrameXML\UI.xsd">
<Script file="HealBot_Options_Spells.lua" />
<Frame name="HealBot_Options_Panel2" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_KeysFrame" inherits="OptionFrameBoxTemplate">
<Size>
<AbsDimension y="268"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="21" y="-30"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-21" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_ComboButtons_ButtonText1" text="HEALBOT_OPTIONS_USEBUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="110" y="-10" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<Slider name="HealBot_Options_Dummy" hidden="true" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="0" y="0" />
</Offset>
</Anchor>
</Anchors>
</Slider>
<Frame name="HealBot_Options_ComboClassButton">
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_ComboButtons_ButtonText" text="HEALBOT_OPTIONS_COMBOBUTTON" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Dummy" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-5" y="-25" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
</Frame>
<CheckButton name="HealBot_ComboButtons_Button1" inherits="SendMailRadioButtonTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Dummy" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="40" y="-30"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_ComboButtons_Button_OnLoad(this,HEALBOT_OPTIONS_BUTTONLEFT)</OnLoad>
<OnClick>HealBot_ComboButtons_Button_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_ComboButtons_Button2" inherits="SendMailRadioButtonTemplate" id="2">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_ComboButtons_Button1" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="40" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_ComboButtons_Button_OnLoad(this,HEALBOT_OPTIONS_BUTTONMIDDLE)</OnLoad>
<OnClick>HealBot_ComboButtons_Button_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_ComboButtons_Button3" inherits="SendMailRadioButtonTemplate" id="3">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_ComboButtons_Button2" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="50" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_ComboButtons_Button_OnLoad(this,HEALBOT_OPTIONS_BUTTONRIGHT)</OnLoad>
<OnClick>HealBot_ComboButtons_Button_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_ComboButtons_Button4" inherits="SendMailRadioButtonTemplate" id="4">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_ComboButtons_Button1" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="0" y="-18"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_ComboButtons_Button_OnLoad(this,HEALBOT_OPTIONS_BUTTON4)</OnLoad>
<OnClick>HealBot_ComboButtons_Button_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_ComboButtons_Button5" inherits="SendMailRadioButtonTemplate" id="5">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_ComboButtons_Button4" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="55" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_ComboButtons_Button_OnLoad(this,HEALBOT_OPTIONS_BUTTON5)</OnLoad>
<OnClick>HealBot_ComboButtons_Button_OnClick(this,this:GetID())</OnClick>
</Scripts>
</CheckButton>
<EditBox name="HealBot_Options_Click" inherits="HealBot_Options_EditBoxTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Dummy" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-5" y="-68"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
HealBot_Options_EditBox_OnLoad(this,HEALBOT_OPTIONS_CLICK)
</OnLoad>
<OnTextChanged>
HealBot_Options_Click_OnTextChanged(this)
</OnTextChanged>
</Scripts>
</EditBox>
<EditBox name="HealBot_Options_Shift" inherits="HealBot_Options_EditBoxTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Click" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
HealBot_Options_EditBox_OnLoad(this,HEALBOT_OPTIONS_SHIFT)
</OnLoad>
<OnTextChanged>
HealBot_Options_Shift_OnTextChanged(this)
</OnTextChanged>
</Scripts>
</EditBox>
<EditBox name="HealBot_Options_Ctrl" inherits="HealBot_Options_EditBoxTemplate">
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_Shift" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="-20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
HealBot_Options_EditBox_OnLoad(this,HEALBOT_OPTIONS_CTRL)
</OnLoad>
<OnTextChanged>
HealBot_Options_Ctrl_OnTextChanged(this)
</OnTextChanged>
</Scripts>
</EditBox>
<EditBox name="HealBot_Options_ShiftCtrl" inherits="HealBot_Options_EditBoxTemplate">
<Anchors>
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_Ctrl" relativePoint="BOTTOMRIGHT">
<Offset>
<AbsDimension x="0" y="-20"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
HealBot_Options_EditBox_OnLoad(this,HEALBOT_OPTIONS_SHIFTCTRL)
</OnLoad>
<OnTextChanged>
HealBot_Options_ShiftCtrl_OnTextChanged(this)
</OnTextChanged>
</Scripts>
</EditBox>
<CheckButton name="HealBot_Options_EnableHealthy" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShiftCtrl" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="25" y="-4" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_EnableHealthy_OnLoad(this,HEALBOT_OPTIONS_ENABLEHEALTHY)</OnLoad>
<OnClick>HealBot_Options_EnableHealthy_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
<Frame name="HealBot_Options_TooltipsPanel" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Size>
<AbsDimension y="118"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-300"/>
</Offset>
</Anchor>
<Anchor point="TOPRIGHT">
<Offset>
<AbsDimension x="-20" y="-180"/>
</Offset>
</Anchor>
</Anchors>
<Frames>
<CheckButton name="HealBot_Options_ShowTooltip" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_TooltipsPanel" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-4" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowTooltip_OnLoad(this,HEALBOT_OPTIONS_SHOWTOOLTIP)</OnLoad>
<OnClick>HealBot_Options_ShowTooltip_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_TooltipPos" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowTooltip" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="68" y="-2" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_TooltipPos_OnLoad(this) </OnLoad>
</Scripts>
</Frame>
<CheckButton name="HealBot_Options_ShowTooltipTarget" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_TooltipsPanel" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-30" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowTooltipTarget_OnLoad(this,HEALBOT_OPTIONS_SHOWUNITTOOLTIP)</OnLoad>
<OnClick>HealBot_Options_ShowTooltipTarget_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ShowTooltipSpellDetail" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_TooltipsPanel" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-55" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowTooltipSpellDetail_OnLoad(this,HEALBOT_OPTIONS_SHOWDETTOOLTIP)</OnLoad>
<OnClick>HealBot_Options_ShowTooltipSpellDetail_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_ShowTooltipInstant" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_TooltipsPanel" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-80" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowTooltipInstant_OnLoad(this,HEALBOT_OPTIONS_SHOWRECTOOLTIP)</OnLoad>
<OnClick>HealBot_Options_ShowTooltipInstant_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
</Frames>
</Frame>
</Frames>
</Frame>
</Ui>