View Single Post
12-06-22, 11:36 AM   #18
ngen33r
A Murloc Raider
Join Date: Dec 2022
Posts: 5
I tried to add it in as a frame without success. I also have no clue what I'm doing but I tried LOL.

Lua Code:
  1. <Ui xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.blizzard.com/wow/ui/">
  2.     <Script file="MistrasDiabloOrbs.lua" />
  3.     <Frame name="D32GUI" parent="UIParent" toplevel="true" movable="true">
  4.         <Size>
  5.             <AbsDimension x="400" y="500" />
  6.         </Size>
  7.         <Anchors>
  8.             <Anchor point="TOP">
  9.                 <Offset x="0" y="0" />
  10.             </Anchor>
  11.         </Anchors>
  12.         <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background-Dark" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
  13.             <BackgroundInsets>
  14.                 <AbsInset left="11" right="12" top="12" bottom="11" />
  15.             </BackgroundInsets>
  16.             <TileSize>
  17.                 <AbsValue val="32" />
  18.             </TileSize>
  19.             <EdgeSize>
  20.                 <AbsValue val="32" />
  21.             </EdgeSize>
  22.             <Color r="0" g="0" b="0" />
  23.         </Backdrop>
  24.         <Layers>
  25.             <Layer level="OVERLAY">
  26.                 <FontString name="FontString1" inherits="NumberFontNormalHuge" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Mistra's Diablo Orbs" justifyV="TOP">
  27.                     <Size>
  28.                         <AbsDimension x="262" y="57" />
  29.                     </Size>
  30.                     <Anchors>
  31.                         <Anchor point="TOP">
  32.                             <Offset x="0" y="-15" />
  33.                         </Anchor>
  34.                     </Anchors>
  35.                     <FontHeight>
  36.                         <AbsValue val="42" />
  37.                     </FontHeight>
  38.                     <Color r="1" g="0" b="0" />
  39.                 </FontString>
  40.                 <FontString name="FontString1" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Orb Configuration Utility" justifyV="TOP">
  41.                     <Size>
  42.                         <AbsDimension x="194" y="39" />
  43.                     </Size>
  44.                     <Anchors>
  45.                         <Anchor point="TOP">
  46.                             <Offset x="0" y="-52" />
  47.                         </Anchor>
  48.                     </Anchors>
  49.                     <FontHeight>
  50.                         <AbsValue val="24" />
  51.                     </FontHeight>
  52.                     <Color r="1" g="0.5" b="0.5" />
  53.                 </FontString>
  54.                 <FontString parentKey="text" name="$parentText" inherits="GameFontNormalSmall">
  55.                     <Anchors>
  56.                         <Anchor point="LEFT" relativePoint="RIGHT">
  57.                             <Offset x="-317" y="209" />
  58.                         </Anchor>
  59.                     </Anchors>
  60.                 </FontString>
  61.             </Layer>
  62.         </Layers>
  63.         <Frames>
  64.             <Button name="HealthOrbButton">
  65.                 <Size>
  66.                     <AbsDimension x="85" y="27" />
  67.                 </Size>
  68.                 <Anchors>
  69.                     <Anchor point="CENTER">
  70.                         <Offset x="-85" y="100" />
  71.                     </Anchor>
  72.                 </Anchors>
  73.                 <Layers>
  74.                     <Layer>
  75.                         <FontString parentKey="text" inherits="BossEmoteNormalHuge" setAllPoints="true" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Health Orb" justifyV="TOP">
  76.                             <Anchors>
  77.                                 <Anchor point="CENTER">
  78.                                     <Offset x="0" y="0" />
  79.                                 </Anchor>
  80.                             </Anchors>
  81.                             <FontHeight>
  82.                                 <AbsValue val="26" />
  83.                             </FontHeight>
  84.                             <Color r="1" g="0.5" b="0.5" />
  85.                         </FontString>
  86.                     </Layer>
  87.                 </Layers>
  88.                 <Scripts>
  89.                     <OnLoad>
  90.                         HealthOrbButton:RegisterForClicks("LeftButtonUp")
  91.                         HealthOrbButton.defaultTextColor = {r=1, g=0.5, b=0.5, a = 1}
  92.                     </OnLoad>
  93.                     <OnEnter>
  94.                         local r,g,b,a = HealthOrbButton.text:GetTextColor()
  95.                         HealthOrbButton.text:SetTextColor(1,1,1,a)
  96.                     </OnEnter>
  97.                     <OnLeave>
  98.                         local r,g,b,a = HealthOrbButton.defaultTextColor.r,HealthOrbButton.defaultTextColor.g,HealthOrbButton.defaultTextColor.b,HealthOrbButton.defaultTextColor.a
  99.                         HealthOrbButton.text:SetTextColor(r,g,b,a)
  100.                     </OnLeave>
  101.                     <OnMouseDown>
  102.                         local r,g,b,a = HealthOrbButton.text:GetTextColor()
  103.                         HealthOrbButton.text:SetTextColor(r,g,b,a/2)
  104.                     </OnMouseDown>
  105.                     <OnMouseUp>
  106.                         local r,g,b,a = HealthOrbButton.text:GetTextColor()
  107.                         HealthOrbButton.text:SetTextColor(r,g,b,a*2)
  108.                     </OnMouseUp>
  109.                     <OnClick>
  110.                         if D32ConfigFrame:IsVisible() then
  111.                             if D32ConfigFrame.text:GetText() == HealthOrbButton.text:GetText() then
  112.                                 D32ConfigFrame:Hide()
  113.                                 HealthOrbOptionsDropDown:Hide()
  114.                             else
  115.                                 CommitButton.orb = healthOrb
  116.                                 CommitButton.orbData = D32CharacterData.healthOrb
  117.                                 CommitButton.textureElement = D32CharacterData.healthOrb.textures
  118.                                 resetXMLTextBoxes()
  119.                                 checkXMLOrbFontPlacement()
  120.                                 UpdateXMLTextures(healthOrb)
  121.                                 UpdateXMLColors(D32CharacterData.healthOrb.orbColor,D32CharacterData.healthOrb.galaxy,D32CharacterData.healthOrb.font1,D32CharacterData.healthOrb.font2)
  122.                                 UpdateXMLText(healthOrb)
  123.                                 ManaOrbOptionsDropDown:Hide()
  124.                                 HealthOrbOptionsDropDown:Show()
  125.                                 D32ConfigFrame.text:SetText(HealthOrbButton.text:GetText())
  126.                                 D32ConfigFrame.text:SetTextColor(HealthOrbButton.defaultTextColor.r,HealthOrbButton.defaultTextColor.g,HealthOrbButton.defaultTextColor.b,HealthOrbButton.defaultTextColor.a)
  127.                                 --set the selected value appropriately
  128.                                 local index = 1
  129.                                 if CommitButton.orbData.formatting.truncated then
  130.                                     index = 1
  131.                                 elseif CommitButton.orbData.formatting.commaSeparated then
  132.                                     index = 2
  133.                                 else
  134.                                     index = 3
  135.                                 end
  136.  
  137.                                 UIDropDownMenu_SetSelectedID(TextFormattingDropdown, index)
  138.                             end
  139.                         else
  140.                             CommitButton.orb = healthOrb
  141.                             CommitButton.orbData = D32CharacterData.healthOrb
  142.                             CommitButton.textureElement = D32CharacterData.healthOrb.textures
  143.                             resetXMLTextBoxes()
  144.                             checkXMLOrbFontPlacement()
  145.                             UpdateXMLTextures(healthOrb)
  146.                             UpdateXMLColors(D32CharacterData.healthOrb.orbColor,D32CharacterData.healthOrb.galaxy,D32CharacterData.healthOrb.font1,D32CharacterData.healthOrb.font2)
  147.                             UpdateXMLText(healthOrb)
  148.                             D32ConfigFrame.text:SetText(HealthOrbButton.text:GetText())
  149.                             D32ConfigFrame.text:SetTextColor(HealthOrbButton.defaultTextColor.r,HealthOrbButton.defaultTextColor.g,HealthOrbButton.defaultTextColor.b,HealthOrbButton.defaultTextColor.a)
  150.                             D32ConfigFrame:Show()
  151.                             ManaOrbOptionsDropDown:Hide()
  152.                             HealthOrbOptionsDropDown:Show()
  153.                         end
  154.                     </OnClick>
  155.                 </Scripts>
  156.             </Button>
  157.             <Button name="ManaOrbButton">
  158.                 <Size>
  159.                     <AbsDimension x="93" y="27" />
  160.                 </Size>
  161.                 <Anchors>
  162.                     <Anchor point="CENTER">
  163.                         <Offset x="72" y="100" />
  164.                     </Anchor>
  165.                 </Anchors>
  166.                 <Layers>
  167.                     <Layer>
  168.                         <FontString parentKey="text" inherits="BossEmoteNormalHuge" setAllPoints="true" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Mana Orb" justifyV="TOP">
  169.                             <Anchors>
  170.                                 <Anchor point="CENTER">
  171.                                     <Offset x="0" y="0" />
  172.                                 </Anchor>
  173.                             </Anchors>
  174.                             <FontHeight>
  175.                                 <AbsValue val="26" />
  176.                             </FontHeight>
  177.                             <Color r="0" g="1" b="1" />
  178.                         </FontString>
  179.                     </Layer>
  180.                 </Layers>
  181.                 <Scripts>
  182.                     <OnLoad>
  183.                         ManaOrbButton:RegisterForClicks("LeftButtonUp")
  184.                         ManaOrbButton.defaultTextColor = {r=0, g=1, b=1, a=1}
  185.                     </OnLoad>
  186.                     <OnEnter>
  187.                         local r,g,b,a = ManaOrbButton.text:GetTextColor()
  188.                         ManaOrbButton.text:SetTextColor(1,1,1,a)
  189.                     </OnEnter>
  190.                     <OnLeave>
  191.                         local r,g,b,a = ManaOrbButton.defaultTextColor.r,ManaOrbButton.defaultTextColor.g,ManaOrbButton.defaultTextColor.b,ManaOrbButton.defaultTextColor.a
  192.                         ManaOrbButton.text:SetTextColor(r,g,b,a)
  193.                     </OnLeave>
  194.                     <OnMouseDown>
  195.                         local r,g,b,a = ManaOrbButton.text:GetTextColor()
  196.                         ManaOrbButton.text:SetTextColor(r,g,b,a/2)
  197.                     </OnMouseDown>
  198.                     <OnMouseUp>
  199.                         local r,g,b,a = ManaOrbButton.text:GetTextColor()
  200.                         ManaOrbButton.text:SetTextColor(r,g,b,a*2)
  201.                     </OnMouseUp>
  202.                     <OnClick>
  203.                         if D32ConfigFrame:IsVisible() then
  204.                             if D32ConfigFrame.text:GetText() == ManaOrbButton.text:GetText() then
  205.                                 D32ConfigFrame:Hide()
  206.                                 ManaOrbOptionsDropDown:Hide()
  207.                             else
  208.                                 CommitButton.orb = manaOrb
  209.                                 CommitButton.orbData = D32CharacterData.manaOrb
  210.                                 CommitButton.textureElement = D32CharacterData.manaOrb.textures
  211.                                 resetXMLTextBoxes()
  212.                                 checkXMLOrbFontPlacement()
  213.                                 UpdateXMLTextures(manaOrb)
  214.                                 UpdateXMLColors(D32CharacterData.manaOrb.orbColor,D32CharacterData.manaOrb.galaxy,D32CharacterData.manaOrb.font1,D32CharacterData.manaOrb.font2)
  215.                                 UpdateXMLText(manaOrb)
  216.                                 D32ConfigFrame.text:SetText(ManaOrbButton.text:GetText())
  217.                                 D32ConfigFrame.text:SetTextColor(ManaOrbButton.defaultTextColor.r,ManaOrbButton.defaultTextColor.g,ManaOrbButton.defaultTextColor.b,ManaOrbButton.defaultTextColor.a)
  218.                                 HealthOrbOptionsDropDown:Hide()
  219.                                 ManaOrbOptionsDropDown:Show()
  220.                                 --set the selected value appropriately
  221.                                 local index = 1
  222.                                 if CommitButton.orbData.formatting.truncated then
  223.                                     index = 1
  224.                                 elseif CommitButton.orbData.formatting.commaSeparated then
  225.                                     index = 2
  226.                                 else
  227.                                     index = 3
  228.                                 end
  229.  
  230.                                 UIDropDownMenu_SetSelectedID(TextFormattingDropdown, index)
  231.                             end
  232.                         else
  233.                             CommitButton.orb = manaOrb
  234.                             CommitButton.orbData = D32CharacterData.manaOrb
  235.                             CommitButton.textureElement = D32CharacterData.manaOrb.textures
  236.                             resetXMLTextBoxes()
  237.                             checkXMLOrbFontPlacement()
  238.                             UpdateXMLTextures(manaOrb)
  239.                             UpdateXMLColors(D32CharacterData.manaOrb.orbColor,D32CharacterData.manaOrb.galaxy,D32CharacterData.manaOrb.font1,D32CharacterData.manaOrb.font2)
  240.                             UpdateXMLText(manaOrb)
  241.                             D32ConfigFrame.text:SetText(ManaOrbButton.text:GetText())
  242.                             D32ConfigFrame.text:SetTextColor(ManaOrbButton.defaultTextColor.r,ManaOrbButton.defaultTextColor.g,ManaOrbButton.defaultTextColor.b,ManaOrbButton.defaultTextColor.a)
  243.                             D32ConfigFrame:Show()
  244.                             HealthOrbOptionsDropDown:Hide()
  245.                             ManaOrbOptionsDropDown:Show()
  246.                         end
  247.                     </OnClick>
  248.                 </Scripts>
  249.             </Button>
  250.             <Button name="CloseButton" inherits="UIPanelButtonTemplate" text="Close">
  251.                 <Size>
  252.                     <AbsDimension x="75" y="23" />
  253.                 </Size>
  254.                 <Anchors>
  255.                     <Anchor point="Bottom">
  256.                         <Offset x="-1" y="10" />
  257.                     </Anchor>
  258.                 </Anchors>
  259.                 <Scripts>
  260.                     <OnMouseUp>
  261.                         Handle_D32GUI()
  262.                     </OnMouseUp>
  263.                 </Scripts>
  264.             </Button>
  265.             <CheckButton name="TrackCombatCheckButton" inherits="UICheckButtonTemplate" checked="true">
  266.                 <Anchors>
  267.                     <Anchor point="TOPLEFT">
  268.                         <Offset x="26" y="-357" />
  269.                     </Anchor>
  270.                 </Anchors>
  271.                 <Scripts>
  272.                     <OnClick>
  273.                         if TrackCombatCheckButton:GetChecked() then
  274.                             D32CharacterData.combat.enabled = true
  275.                             D32UpdateOrbColor(healthOrb,D32CharacterData.combat.orbColor,D32CharacterData.combat.galaxy, D32CharacterData.combat.font1,D32CharacterData.combat.font2)
  276.                         else
  277.                             D32CharacterData.combat.enabled = false
  278.                             D32UpdateOrbColor(healthOrb,D32CharacterData.healthOrb.orbColor,D32CharacterData.healthOrb.galaxy, D32CharacterData.healthOrb.font1,D32CharacterData.healthOrb.font2)
  279.                         end
  280.                     </OnClick>
  281.                 </Scripts>
  282.                 <ButtonText text="Track Combat" justifyH="LEFT">
  283.                     <Anchors>
  284.                         <Anchor x="30" y="0" point="LEFT" />
  285.                     </Anchors>
  286.                 </ButtonText>
  287.                 <NormalFont style="FocusFontSmall" />
  288.             </CheckButton>
  289.             <CheckButton name="ShowArtworkCheckButton" inherits="UICheckButtonTemplate" checked="true">
  290.                 <Anchors>
  291.                     <Anchor point="TOPLEFT">
  292.                         <Offset x="26" y="-319" />
  293.                     </Anchor>
  294.                 </Anchors>
  295.                 <Scripts>
  296.                     <OnClick>
  297.                         if ShowArtworkCheckButton:GetChecked() then
  298.                             angelFrame:Show()
  299.                             demonFrame:Show()
  300.                             D32CharacterData.artwork.show = true
  301.                         else
  302.                             angelFrame:Hide()
  303.                             demonFrame:Hide()
  304.                             D32CharacterData.artwork.show = false
  305.                         end
  306.                     </OnClick>
  307.                 </Scripts>
  308.                 <ButtonText text="Show Artwork" justifyH="LEFT">
  309.                     <Anchors>
  310.                         <Anchor x="30" y="0" point="LEFT" />
  311.                     </Anchors>
  312.                 </ButtonText>
  313.                 <NormalFont style="FocusFontSmall" />
  314.             </CheckButton>
  315.             <CheckButton name="ShowBlizzPlayerFrameCheckButton" inherits="UICheckButtonTemplate" checked="false">
  316.                 <Anchors>
  317.                     <Anchor point="TOPLEFT">
  318.                         <Offset x="26" y="-395 "/>
  319.                     </Anchor>
  320.                 </Anchors>
  321.                 <Scripts>
  322.                     <OnClick>
  323.                         if ShowBlizzPlayerFrameCheckButton:GetChecked() then
  324.                             D32CharacterData.defaultPlayerFrame.show = true
  325.                         else
  326.                             D32CharacterData.defaultPlayerFrame.show = false
  327.                         end
  328.                         ReloadUI()
  329.                     </OnClick>
  330.                 </Scripts>
  331.                 <ButtonText text="Use Player Frame" justifyH="LEFT">
  332.                     <Anchors>
  333.                         <Anchor x="30" y="0" point="LEFT" />
  334.                     </Anchors>
  335.                 </ButtonText>
  336.                 <NormalFont style="FocusFontSmall"/>
  337.             </CheckButton>
  338.             <CheckButton name="AnimateOrbValuesCheckButton" inherits="UICheckButtonTemplate" checked="true">
  339.                 <Anchors>
  340.                     <Anchor point="TOPLEFT">
  341.                         <Offset x="26" y="-281" />
  342.                     </Anchor>
  343.                 </Anchors>
  344.                 <Scripts>
  345.                     <OnClick>
  346.                         if AnimateOrbValuesCheckButton:GetChecked() then
  347.                             D32CharacterData.smoothing = true
  348.                         else
  349.                             D32CharacterData.smoothing = false
  350.                         end
  351.                     </OnClick>
  352.                 </Scripts>
  353.                 <ButtonText text="Smooth Animate" justifyH="LEFT">
  354.                     <Anchors>
  355.                         <Anchor x="30" y="0" point="LEFT" />
  356.                     </Anchors>
  357.                 </ButtonText>
  358.                 <NormalFont style="FocusFontSmall" />
  359.             </CheckButton>
  360.             <CheckButton name="UsePetOrbCheckButton" inherits="UICheckButtonTemplate" checked="true">
  361.                 <Anchors>
  362.                     <Anchor point="TOPLEFT">
  363.                         <Offset x="200" y="-281" />
  364.                     </Anchor>
  365.                 </Anchors>
  366.                 <Scripts>
  367.                     <OnClick>
  368.                         if UsePetOrbCheckButton:GetChecked() then
  369.                             RegisterUnitWatch(petOrb)
  370.                             D32CharacterData.petOrb.enabled = true
  371.                         else
  372.                             UnregisterUnitWatch(petOrb)
  373.                             petOrb:Hide()
  374.                             D32CharacterData.petOrb.enabled = false
  375.                         end
  376.                     </OnClick>
  377.                 </Scripts>
  378.                 <ButtonText text="Use Pet Orb" justifyH="LEFT">
  379.                     <Anchors>
  380.                         <Anchor x="30" y="0" point="LEFT" />
  381.                     </Anchors>
  382.                 </ButtonText>
  383.                 <NormalFont style="FocusFontSmall" />
  384.             </CheckButton>
  385.             <CheckButton name="ShowPetOrbValuesCheckButton" inherits="UICheckButtonTemplate" checked="true">
  386.                 <Anchors>
  387.                     <Anchor point="TOPLEFT">
  388.                         <Offset x="200" y="-319" />
  389.                     </Anchor>
  390.                 </Anchors>
  391.                 <Scripts>
  392.                     <OnClick>
  393.                         if ShowPetOrbValuesCheckButton:GetChecked() then
  394.                             petOrb.font3:Show()
  395.                             petOrb.font4:Show()
  396.                             D32CharacterData.petOrb.showValue = true
  397.                             checkPetFontPlacement()
  398.                         else
  399.                             petOrb.font3:Hide()
  400.                             petOrb.font4:Hide()
  401.                             D32CharacterData.petOrb.showValue = False
  402.                             checkPetFontPlacement()
  403.                         end
  404.                     </OnClick>
  405.                 </Scripts>
  406.                 <ButtonText text="Show Pet Values" justifyH="LEFT">
  407.                     <Anchors>
  408.                         <Anchor x="30" y="0" point="LEFT" />
  409.                     </Anchors>
  410.                 </ButtonText>
  411.                 <NormalFont style="FocusFontSmall" />
  412.             </CheckButton>
  413.             <CheckButton name="ShowPetOrbPercentagesCheckButton" inherits="UICheckButtonTemplate" checked="true">
  414.                 <Anchors>
  415.                     <Anchor point="TOPLEFT">
  416.                         <Offset x="200" y="-357" />
  417.                     </Anchor>
  418.                 </Anchors>
  419.                 <Scripts>
  420.                     <OnClick>
  421.                         if ShowPetOrbPercentagesCheckButton:GetChecked() then
  422.                             petOrb.font1:Show()
  423.                             petOrb.font2:Show()
  424.                             D32CharacterData.petOrb.showPercentage = true
  425.                             checkPetFontPlacement()
  426.                         else
  427.                             petOrb.font1:Hide()
  428.                             petOrb.font2:Hide()
  429.                             D32CharacterData.petOrb.showPercentage = False
  430.                             checkPetFontPlacement()
  431.                         end
  432.                     </OnClick>
  433.                 </Scripts>
  434.                 <ButtonText text="Show Pet Percentage" justifyH="LEFT">
  435.                     <Anchors>
  436.                         <Anchor x="30" y="0" point="LEFT" />
  437.                     </Anchors>
  438.                 </ButtonText>
  439.                 <NormalFont style="FocusFontSmall" />
  440.             </CheckButton>
  441.             <CheckButton name="UsePowerTrackerCheckButton" inherits="UICheckButtonTemplate" checked="true">
  442.                 <Anchors>
  443.                     <Anchor point="TOPLEFT">
  444.                         <Offset x="200" y="-395" />
  445.                     </Anchor>
  446.                 </Anchors>
  447.                 <Scripts>
  448.                     <OnLoad>
  449.                         if not powerFrame then
  450.                         self:Hide()
  451.                         end
  452.                     </OnLoad>
  453.                     <OnClick>
  454.                         if UsePowerTrackerCheckButton:GetChecked() then
  455.                             if powerFrame then
  456.                                 powerFrame:Show()
  457.                                 powerFrame:SetScript("OnUpdate",D32MonitorPowers)
  458.                                 D32CharacterData.powerFrame.show = true
  459.                             end
  460.                         else
  461.                             if powerFrame then
  462.                                 powerFrame:SetScript("OnUpdate",nil)
  463.                                 powerFrame:Hide()
  464.                                 D32CharacterData.powerFrame.show = false
  465.                             end
  466.                         end
  467.                     </OnClick>
  468.                 </Scripts>
  469.                 <ButtonText text="Use Power Tracker" justifyH="LEFT">
  470.                     <Anchors>
  471.                         <Anchor x="30" y="0" point="LEFT" />
  472.                     </Anchors>
  473.                 </ButtonText>
  474.                 <NormalFont style="FocusFontSmall" />
  475.             </CheckButton>
  476.             <Slider name="D32HealthScaleSlider" inherits="OptionsSliderTemplate" minValue="0" maxValue="0">
  477.                 <Size>
  478.                     <AbsDimension x="100" y="16" />
  479.                 </Size>
  480.                 <Anchors>
  481.                     <Anchor point="CENTER">
  482.                         <Offset x="-85" y="50" />
  483.                     </Anchor>
  484.                 </Anchors>
  485.                 <Scripts>
  486.                     <OnLoad>
  487.                         getglobal(self:GetName().."Text"):SetText("Health Orb Scale")
  488.                         getglobal(self:GetName().."High"):SetText("175")
  489.                         getglobal(self:GetName().."Low"):SetText("50")
  490.                         self:SetMinMaxValues(50,175)
  491.                         self:SetValueStep(1)
  492.                     </OnLoad>
  493.                     <OnValueChanged>
  494.                         D32SetOrbScale("health", self:GetValue())
  495.                     </OnValueChanged>
  496.                 </Scripts>
  497.             </Slider>
  498.             <Slider name="D32ManaScaleSlider" inherits="OptionsSliderTemplate" minValue="0" maxValue="0">
  499.                 <Size>
  500.                     <AbsDimension x="100" y="16" />
  501.                 </Size>
  502.                 <Anchors>
  503.                     <Anchor point="CENTER">
  504.                         <Offset x="75" y="50" />
  505.                     </Anchor>
  506.                 </Anchors>
  507.                 <Scripts>
  508.                     <OnLoad>
  509.                         getglobal(self:GetName().."Text"):SetText("Mana Orb Scale")
  510.                         getglobal(self:GetName().."High"):SetText("175")
  511.                         getglobal(self:GetName().."Low"):SetText("50")
  512.                         self:SetMinMaxValues(50,175)
  513.                         self:SetValueStep(1)
  514.                     </OnLoad>
  515.                     <OnValueChanged>
  516.                         D32SetOrbScale("mana", self:GetValue())
  517.                     </OnValueChanged>
  518.                 </Scripts>
  519.             </Slider>
  520.         </Frames>
  521.         <Scripts>
  522.             <OnLoad>
  523.                 self:RegisterForDrag("LeftButton");
  524.                 self:SetClampedToScreen(true);
  525.             </OnLoad>
  526.             <OnDragStart>
  527.                 self:StartMoving();
  528.             </OnDragStart>
  529.             <OnDragStop>
  530.                 self:StopMovingOrSizing();
  531.             </OnDragStop>
  532.             <OnHide>
  533.                 D32GUI.configFrame:Hide()
  534.             </OnHide>
  535.         </Scripts>
  536.     </Frame>
  537.     <Frame parentKey="configFrame" name="D32ConfigFrame" parent="D32GUI" frameStrata="HIGH">
  538.         <Size>
  539.             <AbsDimension x="457" y="450" />
  540.         </Size>
  541.         <Anchors>
  542.             <Anchor point="RIGHT">
  543.                 <Offset x="450" y="0" />
  544.             </Anchor>
  545.         </Anchors>
  546.         <Backdrop bgFile="Interface\DialogFrame\UI-DialogBox-Background" edgeFile="Interface\DialogFrame\UI-DialogBox-Border" tile="true">
  547.             <BackgroundInsets>
  548.                 <AbsInset left="11" right="12" top="12" bottom="11" />
  549.             </BackgroundInsets>
  550.             <TileSize>
  551.                 <AbsValue val="32" />
  552.             </TileSize>
  553.             <EdgeSize>
  554.                 <AbsValue val="32" />
  555.             </EdgeSize>
  556.         </Backdrop>
  557.         <Layers>
  558.             <Layer level="OVERLAY">
  559.                 <FontString name="OrbTextureLabel" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Swirl Texture" justifyV="TOP">
  560.                     <Size>
  561.                         <AbsDimension x="181" y="39" />
  562.                     </Size>
  563.                     <Anchors>
  564.                         <Anchor point="CENTER">
  565.                             <Offset x="-26" y="-180" />
  566.                         </Anchor>
  567.                     </Anchors>
  568.                     <FontHeight>
  569.                         <AbsValue val="19" />
  570.                     </FontHeight>
  571.                     <Color r="1" g="0.5" b="0.5" />
  572.                 </FontString>
  573.                 <FontString name="FillTextureLabel" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="Fill Texture" justifyV="TOP">
  574.                     <Size>
  575.                         <AbsDimension x="181" y="39" />
  576.                     </Size>
  577.                     <Anchors>
  578.                         <Anchor point="CENTER">
  579.                             <Offset x="-172" y="-180" />
  580.                         </Anchor>
  581.                     </Anchors>
  582.                     <FontHeight>
  583.                         <AbsValue val="19" />
  584.                     </FontHeight>
  585.                     <Color r="1" g="0.5" b="0.5" />
  586.                 </FontString>
  587.             </Layer>
  588.             <Layer level="OVERLAY">
  589.                 <FontString parentKey="text" inherits="BossEmoteNormalHuge" font="Interface\addons\MistrasDiabloOrbs\fonts\Of Wildflowers and Wings.ttf" text="" justifyV="TOP">
  590.                     <Size>
  591.                         <AbsDimension x="181" y="39" />
  592.                     </Size>
  593.                     <Anchors>
  594.                         <Anchor point="TOP">
  595.                             <Offset x="0" y="-18" />
  596.                         </Anchor>
  597.                     </Anchors>
  598.                     <FontHeight>
  599.                         <AbsValue val="26" />
  600.                     </FontHeight>
  601.                     <Color r="1" g="0" b="0" />
  602.                 </FontString>
  603.             </Layer>
  604.         </Layers>
  605.         <Frames>
  606.             <CheckButton name="D32OrbPercentageCheckBox" inherits="UICheckButtonTemplate" checked="true">
  607.                 <Anchors>
  608.                     <Anchor point="CENTER">
  609.                         <Offset x="75" y="-145" />
  610.                     </Anchor>
  611.                 </Anchors>
  612.                 <Scripts>
  613.                     <OnLoad>
  614.                     </OnLoad>
  615.                     <OnClick>
  616.                         checkXMLOrbFontPlacement()
  617.                     </OnClick>
  618.                 </Scripts>
  619.                 <ButtonText text="Show Percentage" justifyH="RIGHT">
  620.                     <Anchors>
  621.                         <Anchor x="121" y="0" point="RIGHT" />
  622.                     </Anchors>
  623.                 </ButtonText>
  624.                 <NormalFont style="FocusFontSmall" />
  625.             </CheckButton>
  626.             <CheckButton name="D32OrbValueCheckBox" inherits="UICheckButtonTemplate" checked="true">
  627.                 <Anchors>
  628.                     <Anchor point="CENTER">
  629.                         <Offset x="-65" y="-145" />
  630.                     </Anchor>
  631.                 </Anchors>
  632.                 <Scripts>
  633.                     <OnShow>
  634.  
  635.                     </OnShow>
  636.                     <OnLoad>
  637.                     </OnLoad>
  638.                     <OnClick>
  639.                         checkXMLOrbFontPlacement()
  640.                     </OnClick>
  641.                 </Scripts>
  642.                 <ButtonText text="Show Value" justifyH="RIGHT">
  643.                     <Anchors>
  644.                         <Anchor x="81" y="0" point="RIGHT" />
  645.                     </Anchors>
  646.                 </ButtonText>
  647.                 <NormalFont style="FocusFontSmall" />
  648.             </CheckButton>
  649.             <CheckButton name="D32OrbEnabledCheckbox" inherits="UICheckButtonTemplate" checked="true">
  650.                 <Anchors>
  651.                     <Anchor point="CENTER">
  652.                         <Offset x="-195" y="-145" />
  653.                     </Anchor>
  654.                 </Anchors>
  655.                 <Scripts>
  656.                     <OnShow>
  657.                         shouldEnabledCheckboxBeChecked();
  658.                     </OnShow>
  659.                     <OnLoad>
  660.                     </OnLoad>
  661.                     <OnClick>
  662.                     </OnClick>
  663.                 </Scripts>
  664.                 <ButtonText text="Enabled" justifyH="RIGHT">
  665.                     <Anchors>
  666.                         <Anchor x="50" y="0" point="RIGHT" />
  667.                     </Anchors>
  668.                 </ButtonText>
  669.                 <NormalFont style="FocusFontSmall" />
  670.             </CheckButton>
  671.             <Frame name="xmlOrbDisplayFrame2" toplevel="true">
  672.                 <Size x="150" y="150" />
  673.                 <Anchors>
  674.                     <Anchor point="CENTER">
  675.                         <Offset x="0" y="10" />
  676.                     </Anchor>
  677.                 </Anchors>
  678.                 <Scripts>
  679.                     <OnLoad>
  680.                         FillXMLTemplate(self)
  681.                     </OnLoad>
  682.                 </Scripts>
  683.             </Frame>
  684.         </Frames>
  685.         <Scripts>
  686.             <OnLoad>
  687.                 D32ConfigFrame:Hide()
  688.                 D32ConfigFrame:SetClampedToScreen(true)
  689.             </OnLoad>
  690.         </Scripts>
  691.     </Frame>
  692.     <Frame parentKey="OptionsButtonPanel" parent="D32ConfigFrame">
  693.         <Size>
  694.             <AbsDimension x="457" y="268" />
  695.         </Size>
  696.         <Anchors>
  697.             <Anchor point="CENTER">
  698.                 <Offset x="-435" y="101" />
  699.             </Anchor>
  700.         </Anchors>
  701.         <Frames>
  702.             <Frame name="ButtonListFrame" parent="D32ConfigFrame">
  703.                 <Size>
  704.                     <AbsDimension x="451" y="56" />
  705.                 </Size>
  706.                 <Anchors>
  707.                     <Anchor point="CENTER">
  708.                         <Offset x="0" y="165" />
  709.                     </Anchor>
  710.                 </Anchors>
  711.                 <Frames>
  712.                     <Button name="FillButton" inherits="UIPanelButtonTemplate" text="Fill">
  713.                         <Size>
  714.                             <AbsDimension x="75" y="23" />
  715.                         </Size>
  716.                         <Anchors>
  717.                             <Anchor point="TOPLEFT">
  718.                                 <Offset x="50" y="-17" />
  719.                             </Anchor>
  720.                         </Anchors>
  721.                         <Scripts>
  722.                             <OnClick>
  723.                                 ColorPickerFrame:Hide()
  724.                                 D32ColorPicker("Filling")
  725.                             </OnClick>
  726.                         </Scripts>
  727.                     </Button>
  728.                     <Button name="SwirlButton" inherits="UIPanelButtonTemplate" text="Swirl">
  729.                         <Size>
  730.                             <AbsDimension x="75" y="23" />
  731.                         </Size>
  732.                         <Anchors>
  733.                             <Anchor point="TOPLEFT">
  734.                                 <Offset x="144" y="-17" />
  735.                             </Anchor>
  736.                         </Anchors>
  737.                         <Scripts>
  738.                             <OnClick>
  739.                                 ColorPickerFrame:Hide()
  740.                                 D32ColorPicker("Swirl")
  741.                             </OnClick>
  742.                         </Scripts>
  743.                     </Button>
  744.                     <Button name="PercentageButton" inherits="UIPanelButtonTemplate" text="Percentage">
  745.                         <Size>
  746.                             <AbsDimension x="85" y="23" />
  747.                         </Size>
  748.                         <Anchors>
  749.                             <Anchor point="TOPLEFT">
  750.                                 <Offset x="229" y="-17" />
  751.                             </Anchor>
  752.                         </Anchors>
  753.                         <Scripts>
  754.                             <OnClick>
  755.                                 ColorPickerFrame:Hide()
  756.                                 D32ColorPicker("Font1")
  757.                             </OnClick>
  758.                         </Scripts>
  759.                     </Button>
  760.                     <Button name="ValueButton" inherits="UIPanelButtonTemplate" text="Value">
  761.                         <Size>
  762.                             <AbsDimension x="75" y="23" />
  763.                         </Size>
  764.                         <Anchors>
  765.                             <Anchor point="TOPLEFT">
  766.                                 <Offset x="329" y="-17" />
  767.                             </Anchor>
  768.                         </Anchors>
  769.                         <Scripts>
  770.                             <OnClick>
  771.                                 ColorPickerFrame:Hide()
  772.                                 D32ColorPicker("Font2")
  773.                             </OnClick>
  774.                         </Scripts>
  775.                     </Button>
  776.                 </Frames>
  777.             </Frame>
  778.             <Button name="D32ConfigFrameCloseButton" inherits="UIPanelCloseButton" parent="D32ConfigFrame" text="">
  779.                 <Size>
  780.                     <AbsDimension x="35" y="35" />
  781.                 </Size>
  782.                 <Anchors>
  783.                     <Anchor point="TOPLEFT">
  784.                         <Offset x="422" y="0" />
  785.                     </Anchor>
  786.                 </Anchors>
  787.                 <Scripts>
  788.                     <OnClick>
  789.                         D32ConfigFrame:Hide()
  790.                         ManaOrbOptionsDropDown:Hide()
  791.                         HealthOrbOptionsDropDown:Hide()
  792.                     </OnClick>
  793.                 </Scripts>
  794.             </Button>
  795.         </Frames>
  796.     </Frame>
  797.     <Frame name = "XMP_BackdropTemplate" inherits = "BackdropTemplate" virtual = "true">
  798.  
  799. vvvvvvvvvv New Backdrop XML Code ( as of 9.0 ) vvvvvvvv
  800.  
  801.     <KeyValues>
  802.         <KeyValue key="backdropInfo" value="XRYSTAL_BACKDROP_TOOLTIP_16_16_5555" type="global"/>
  803.         <KeyValue key="backdropColor" value="BLACK" type="global"/>
  804.         <KeyValue key="backdropBorderColor" value="WHITE" type="global"/>
  805.     </KeyValues>  
  806.  
  807. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  808.  
  809.   vvvvvvv Old Backdrop XML Code vvvvvvvv    
  810.         <!--Backdrop
  811.             bgFile="Interface\Tooltips\UI-Tooltip-Background.png"
  812.             edgeFile="Interface\Tooltips\UI-Tooltip-Border.png"
  813.             tile="true" >
  814.             <EdgeSize val="12"/>
  815.             <TileSize val="16"/>
  816.             <BackgroundInsets left="5" right="5" top="5" bottom="5"/>
  817.             <Color r = "1" g = "1" b = "0" a = "1" />
  818.             <BorderColor r = "0" g = "1" b = "1" a = "1" />
  819.         </Backdrop-->>              
  820. ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  821.     </Frame>
  822.     <Button name="CommitButton" inherits="GameMenuButtonTemplate" parent="D32ConfigFrame" text="Save Changes">
  823.         <Size>
  824.             <AbsDimension x="133" y="23" />
  825.         </Size>
  826.         <Anchors>
  827.             <Anchor point="BOTTOM">
  828.                 <Offset x="138" y="20" />
  829.             </Anchor>
  830.         </Anchors>
  831.         <Scripts>
  832.             <OnClick>
  833.                 D32ApplyChanges()
  834.             </OnClick>
  835.         </Scripts>
  836.     </Button>
  837.     <Button name="HealthOrbOptionsDropDown" inherits="UIDropDownMenuTemplate" hidden="true" parent="D32ConfigFrame">
  838.         <Size x="200" y="45" />
  839.         <Anchors>
  840.             <Anchor point="TOPLEFT">
  841.                 <Offset x="0" y="-15" />
  842.             </Anchor>
  843.         </Anchors>
  844.         <Scripts>
  845.             <OnLoad>
  846.                 InitializeHealthOrbOptionsDropDown();
  847.             </OnLoad>
  848.             <OnShow>
  849.                 CheckHealthOrbOptionValuesAgainstUIState();
  850.             </OnShow>
  851.         </Scripts>
  852.     </Button>
  853.     <Button name="ManaOrbOptionsDropDown" inherits="UIDropDownMenuTemplate" hidden="true" parent="D32ConfigFrame">
  854.         <Size x="200" y="45" />
  855.         <Anchors>
  856.             <Anchor point="TOPLEFT">
  857.                 <Offset x="0" y="-15" />
  858.             </Anchor>
  859.         </Anchors>
  860.         <Scripts>
  861.             <OnLoad>
  862.                 InitializeManaOrbOptionsDropDown();
  863.             </OnLoad>
  864.             <OnShow>
  865.                 CheckManaOrbOptionValuesAgainstUIState();
  866.             </OnShow>
  867.         </Scripts>
  868.     </Button>
  869.     <Button name="TextFormattingDropdown" inherits="UIDropDownMenuTemplate" hidden="false" parent="D32ConfigFrame">
  870.         <Size x="200" y="45" />
  871.         <Anchors>
  872.             <Anchor point="TOPRIGHT">
  873.                 <Offset x="22" y="-15" />
  874.             </Anchor>
  875.         </Anchors>
  876.         <Scripts>
  877.             <OnShow>
  878.                 local fillOptions = {
  879.                     "Truncate Value",
  880.                     "Comma Separate Value",
  881.                     "Raw Value"
  882.                 }
  883.  
  884.                 function TextFormattingDropdown:OnClick(value)
  885.                     UIDropDownMenu_SetSelectedID(TextFormattingDropdown,self:GetID())
  886.                     local selectedId = UIDropDownMenu_GetSelectedID(TextFormattingDropdown)
  887.                     if selectedId == 1 then
  888.                         CommitButton.orbData.formatting.truncated = true;
  889.                         CommitButton.orbData.formatting.commaSeparated = false;
  890.                     elseif selectedId == 2 then
  891.                         CommitButton.orbData.formatting.truncated = false;
  892.                         CommitButton.orbData.formatting.commaSeparated = true;
  893.                     elseif selectedId == 3 then
  894.                         CommitButton.orbData.formatting.truncated = false;
  895.                         CommitButton.orbData.formatting.commaSeparated = false;
  896.                     end
  897.  
  898.                     UpdateXMLText(CommitButton.orb, CommitButton.orbData.formatting);
  899.                 end
  900.  
  901.                 local function initMen(self, level)
  902.                     local stuff = UIDropDownMenu_CreateInfo()
  903.                     for k,v in pairs(fillOptions) do
  904.                         stuff = {}
  905.                         stuff.text = v
  906.                         stuff.value = v
  907.                         stuff.func = TextFormattingDropdown.OnClick
  908.                         UIDropDownMenu_AddButton(stuff, level)
  909.                     end
  910.                 end
  911.                 UIDropDownMenu_Initialize(TextFormattingDropdown, initMen)
  912.                 UIDropDownMenu_JustifyText(TextFormattingDropdown, "LEFT")
  913.  
  914.                 --set the selected value appropriately
  915.                 local index = 1
  916.                 if CommitButton.orbData.formatting.truncated then
  917.                     index = 1
  918.                 elseif CommitButton.orbData.formatting.commaSeparated then
  919.                     index = 2
  920.                 else
  921.                     index = 3
  922.                 end
  923.  
  924.                 UIDropDownMenu_SetSelectedID(TextFormattingDropdown, index)
  925.             </OnShow>
  926.         </Scripts>
  927.     </Button>
  928.     <Button name="FillTexturesDropDown" inherits="UIDropDownMenuTemplate" parent="D32ConfigFrame">
  929.         <Size x="200" y="45" />
  930.         <Anchors>
  931.             <Anchor point="BOTTOM">
  932.                 <Offset x="-125" y="15" />
  933.             </Anchor>
  934.         </Anchors>
  935.         <Scripts>
  936.             <OnLoad>
  937.                 function FillTexturesDropDown:OnClick(value)
  938.                     UIDropDownMenu_SetSelectedID(FillTexturesDropDown,self:GetID())
  939.                     TryNewTextures(D32FillTextureChoices[self:GetID() - 1],nil)
  940.                 end
  941.  
  942.                 local textureNameTable = {
  943.                     [0] = "Moon",
  944.                     [1] = "Mist",
  945.                     [2] = "Liquid Metal",
  946.                     [3] = "Dragon Skin",
  947.                     [4] = "Iris",
  948.                     [5] = "Fractals",
  949.                     [6] = "Warped"
  950.                 }
  951.  
  952.                 local function fillMenu(self, level)
  953.                     local num = table.getn(textureNameTable)
  954.                     for i=0,num,1 do
  955.                         local val = textureNameTable[i]
  956.                         stuff = {}
  957.                         stuff.text = val
  958.                         stuff.value = val
  959.                         stuff.func = FillTexturesDropDown.OnClick
  960.                         UIDropDownMenu_AddButton(stuff, level)
  961.                     end
  962.                 end
  963.                 UIDropDownMenu_Initialize(FillTexturesDropDown, fillMenu)
  964.                 UIDropDownMenu_SetSelectedID(FillTexturesDropDown, 1)
  965.                 UIDropDownMenu_JustifyText(FillTexturesDropDown, "LEFT")
  966.             </OnLoad>
  967.             <OnShow>
  968.  
  969.             </OnShow>
  970.         </Scripts>
  971.     </Button>
  972.     <Button name="RotationTexturesDropDown" inherits="UIDropDownMenuTemplate" parent="D32ConfigFrame">
  973.         <Size x="200" y="45" />
  974.         <Anchors>
  975.             <Anchor point="BOTTOM">
  976.                 <Offset x="12" y="15" />
  977.             </Anchor>
  978.         </Anchors>
  979.         <Scripts>
  980.             <OnLoad>
  981.                 function RotationTexturesDropDown:OnClick(value)
  982.                     UIDropDownMenu_SetSelectedID(RotationTexturesDropDown,self:GetID())
  983.                     TryNewTextures(xmlOrbDisplayFrame2.orb.filling:GetTexture(),D32RotationTextureChoices[self:GetID() - 1])
  984.                 end
  985.  
  986.                 local textureNameTable2 = {
  987.                 [0] = "Galaxy",
  988.                 [1] = "Bubbles",
  989.                 [2] = "Eye Glow",
  990.                 }
  991.  
  992.                 local function rotationMenu(self, level)
  993.                     local num = table.getn(textureNameTable2)
  994.                     for i=0,num,1 do
  995.                         local val = textureNameTable2[i]
  996.                         stuff = {}
  997.                         stuff.text = val
  998.                         stuff.value = val
  999.                         stuff.func = RotationTexturesDropDown.OnClick
  1000.                         UIDropDownMenu_AddButton(stuff, level)
  1001.                     end
  1002.                 end
  1003.                 UIDropDownMenu_Initialize(RotationTexturesDropDown, rotationMenu)
  1004.                 UIDropDownMenu_SetSelectedID(RotationTexturesDropDown, 1)
  1005.                 UIDropDownMenu_JustifyText(RotationTexturesDropDown, "LEFT")
  1006.             </OnLoad>
  1007.             <OnShow>
  1008.  
  1009.             </OnShow>
  1010.         </Scripts>
  1011.     </Button>
  1012. </Ui>
  Reply With Quote