mirror of
https://github.com/Bluewhale1337/HealBotBlue.git
synced 2026-07-27 01:34:44 +00:00
Refactor + Horfixes: replace UIDropDownMenu calls with wrapper functions and redesign chat option UI to support spell-based configuration.
This commit is contained in:
+143
-94
@@ -5,23 +5,50 @@
|
||||
<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">
|
||||
<EditBox name="HealBot_Options_ChatMsg1_Spell" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-30" />
|
||||
<AbsDimension x="25" y="-30" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
</Frame>
|
||||
<EditBox name="HealBot_Options_ChatMsg1_Text" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Scripts>
|
||||
<OnTextChanged>
|
||||
if HealBot_Config.ChatMessages then
|
||||
HealBot_Config.ChatMessages[1].Spell = this:GetText();
|
||||
end
|
||||
</OnTextChanged>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<Button name="HealBot_Options_ChatMsg1_Channel" inherits="UIPanelButtonTemplate" text="None">
|
||||
<Size>
|
||||
<AbsDimension x="200" y="20"/>
|
||||
<AbsDimension x="80" y="22"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg1" relativePoint="RIGHT">
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg1_Spell" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
<AbsDimension x="15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(1, this);
|
||||
</OnClick>
|
||||
</Scripts>
|
||||
</Button>
|
||||
<EditBox name="HealBot_Options_ChatMsg1_Text" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="300" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg1_Spell" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -33,41 +60,51 @@
|
||||
</OnTextChanged>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<Button name="HealBot_Options_ChatMsg1_Channel" inherits="UIPanelButtonTemplate" text="None">
|
||||
<!-- Chat Message 2 -->
|
||||
<EditBox name="HealBot_Options_ChatMsg2_Spell" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="25" y="-90" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnTextChanged>
|
||||
if HealBot_Config.ChatMessages then
|
||||
HealBot_Config.ChatMessages[2].Spell = 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_ChatMsg1_Text" relativePoint="BOTTOMLEFT">
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg2_Spell" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
<AbsDimension x="15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(1, this);
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(2, 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"/>
|
||||
<AbsDimension x="300" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg2" relativePoint="RIGHT">
|
||||
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg2_Spell" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -79,41 +116,51 @@
|
||||
</OnTextChanged>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<Button name="HealBot_Options_ChatMsg2_Channel" inherits="UIPanelButtonTemplate" text="None">
|
||||
<!-- Chat Message 3 -->
|
||||
<EditBox name="HealBot_Options_ChatMsg3_Spell" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="25" y="-150" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnTextChanged>
|
||||
if HealBot_Config.ChatMessages then
|
||||
HealBot_Config.ChatMessages[3].Spell = 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_ChatMsg2_Text" relativePoint="BOTTOMLEFT">
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg3_Spell" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
<AbsDimension x="15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(2, this);
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(3, 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"/>
|
||||
<AbsDimension x="300" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg3" relativePoint="RIGHT">
|
||||
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg3_Spell" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -125,41 +172,51 @@
|
||||
</OnTextChanged>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<Button name="HealBot_Options_ChatMsg3_Channel" inherits="UIPanelButtonTemplate" text="None">
|
||||
<!-- Chat Message 4 -->
|
||||
<EditBox name="HealBot_Options_ChatMsg4_Spell" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="25" y="-210" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnTextChanged>
|
||||
if HealBot_Config.ChatMessages then
|
||||
HealBot_Config.ChatMessages[4].Spell = 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_ChatMsg3_Text" relativePoint="BOTTOMLEFT">
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg4_Spell" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
<AbsDimension x="15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(3, this);
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(4, 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"/>
|
||||
<AbsDimension x="300" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg4" relativePoint="RIGHT">
|
||||
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg4_Spell" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -171,41 +228,51 @@
|
||||
</OnTextChanged>
|
||||
</Scripts>
|
||||
</EditBox>
|
||||
<Button name="HealBot_Options_ChatMsg4_Channel" inherits="UIPanelButtonTemplate" text="None">
|
||||
<!-- Chat Message 5 -->
|
||||
<EditBox name="HealBot_Options_ChatMsg5_Spell" inherits="InputBoxTemplate" autoFocus="false">
|
||||
<Size>
|
||||
<AbsDimension x="130" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="TOPLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="25" y="-270" />
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnTextChanged>
|
||||
if HealBot_Config.ChatMessages then
|
||||
HealBot_Config.ChatMessages[5].Spell = 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_ChatMsg4_Text" relativePoint="BOTTOMLEFT">
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg5_Spell" relativePoint="RIGHT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
<AbsDimension x="15" y="0"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
<Scripts>
|
||||
<OnClick>
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(4, this);
|
||||
HealBot_Options_ChatMsg_Channel_OnClick(5, 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"/>
|
||||
<AbsDimension x="300" y="20"/>
|
||||
</Size>
|
||||
<Anchors>
|
||||
<Anchor point="LEFT" relativeTo="HealBot_Options_ChatMsg5" relativePoint="RIGHT">
|
||||
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ChatMsg5_Spell" relativePoint="BOTTOMLEFT">
|
||||
<Offset>
|
||||
<AbsDimension x="0" y="2"/>
|
||||
<AbsDimension x="0" y="-5"/>
|
||||
</Offset>
|
||||
</Anchor>
|
||||
</Anchors>
|
||||
@@ -217,24 +284,6 @@
|
||||
</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>
|
||||
</Ui>
|
||||
Reference in New Issue
Block a user