View Single Post
10-12-16, 01:32 AM   #6
Lazare
An Aku'mai Servant
 
Lazare's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 36
The full xml code is below. I only did the section of Lua code that has anything to do with trying to change the button text. Pasting over 500 lines of Lua code that has nothing to do with it doesn't make sense to me. So the XML code fully is:
Code:
<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">

    <CheckButton name="QuestGuruCheckButtonTemplate" inherits="UICheckButtonTemplate" virtual="true">
        <Size x="24" y="24"/>
        <Scripts>
            <OnEnter>
                QuestGuru.OptionOnEnter(self)
            </OnEnter>
            <OnLeave function="GameTooltip_Hide"/>
            <OnClick>
                QuestGuru.OptionOnClick(self)
            </OnClick>
        </Scripts>
    </CheckButton>

    <Button name="QuestGuruListTemplate" virtual="true" text="Quest Title Example">
        <Size x="299" y="16"/>
        <Layers>
            <Layer level="BACKGROUND">
                <Texture parentKey="selected" file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD"/>
            </Layer>
            <Layer level="ARTWORK">
                <!-- number to left of quest indicating how many in group are on same quest -->
                <FontString parentKey="groupMates" inherits="GameFontNormalSmall" justifyH="RIGHT">
                    <Size x="0" y="16"/>
                    <Anchors>
                        <Anchor point="LEFT" x="8" y="0"/>
                    </Anchors>
                </FontString>
                <!-- icon for the "tag" (Daily) (Account) (Raid) (Complete) etc -->
                <Texture parentKey="tag" file="Interface\QuestFrame\QuestTypeIcons">
                    <Size x="18" y="18"/>
                    <Anchors>
                        <Anchor point="RIGHT" x="-2" y="0"/>
                    </Anchors>
                </Texture>
                <!-- checkmark to note tracked quests appears to right of normalText (anchored in the UpdateLogList) -->
                <Texture parentKey="check" file="Interface\Buttons\UI-CheckBox-Check">
                    <Size x="16" y="16"/>
                    <Anchors>
                        <Anchor point="LEFT"/>
                    </Anchors> 
                </Texture>
            </Layer>
        </Layers>
        <!-- quest title/header normalText is shifted to right 20 -->
        <ButtonText parentKey="normalText" nonspacewrap="true">
            <Size x="0" y="10"/>
            <Anchors>
                <Anchor point="LEFT" x="20" y="0"/>
            </Anchors> 
        </ButtonText>
        <NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </NormalTexture>
        <HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
            <Size x="16" y="16"/>
            <Anchors>
                <Anchor point="LEFT" x="3" y="0"/>
            </Anchors>
        </HighlightTexture>
        <NormalFont style="GameFontNormalLeft"/>
        <HighlightFont style="GameFontHighlightLeft"/>
        <DisabledFont style="GameFontHighlightLeft"/>
        <Scripts>
            <OnLoad>
                self.check:SetPoint("LEFT",self.normalText,"RIGHT")
            </OnLoad>
            <OnClick>
                QuestGuru.ListEntryOnClick(self)
            </OnClick>
            <OnEnter>
                QuestGuru.ListEntryOnEnter(self)
            </OnEnter>
            <OnLeave>
                GameTooltip:Hide()
            </OnLeave>
        </Scripts>
    </Button>

    <Frame name="QuestGuru" parent="UIParent" toplevel="true" clampedToScreen="true" enableMouse="true" movable="true" resizable="true" inherits="ButtonFrameTemplate" hidden="true">
        <Size x="667" y="496"/>
        <Anchors>
            <Anchor point="LEFT"/>
        </Anchors>
        <Layers>
            <Layer level="OVERLAY" textureSubLevel="-1">
                <Texture name="QGC_FramePortrait" file="Interface\QuestFrame\UI-QuestLog-BookIcon">
                    <Size x="64" y="64"/>
                    <Anchors>
                        <Anchor point="TOPLEFT" x="-9" y="9"/>
                    </Anchors>
                </Texture>
            </Layer>
            <Layer level="BACKGROUND">
                <!-- temporary fix for lua error in QuestInfo.lua:45 (questFrame.SealMaterialBG is nil) -->
                <Texture parentKey="SealMaterialBG" hidden="true"/>
                <FontString name="QGC_FrameTitleText" inherits="GameFontNormal" text="QUESTGURU_VERSION">
                    <Anchors>
                        <Anchor point="TOP" x="0" y="-5"/>
                    </Anchors>
                </FontString>
            </Layer>
        </Layers>
        <Frames>
            <!-- this is for a one-frame OnUpdate to run UpdateLog (so the function doesn't run multiple times in a frame -->
            <Frame parentKey="update" hidden="true">
                <Scripts>
                    <OnUpdate>
                        self:GetParent():UpdateLog()
                    </OnUpdate>
                </Scripts>
            </Frame>
            <!-- close button in bottomright -->
            <Button inherits="MagicButtonTemplate" text="CLOSE">
                <Size x="80" y="22"/>
                <Anchors>
                    <Anchor point="BOTTOMRIGHT" x="-6" y="4"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        self:GetParent():Hide()
                    </OnClick>
                </Scripts>
            </Button>
            <!-- abandon button in bottomleft -->
            <Button parentKey="abandon" inherits="MagicButtonTemplate" text="ABANDON_QUEST_ABBREV">
                <Size x="80" y="22"/>
                <Anchors>
                    <Anchor point="BOTTOMLEFT" x="4" y="4"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        SetAbandonQuest();
                        local items = GetAbandonQuestItems();
                        if ( items ) then
                            StaticPopup_Hide("ABANDON_QUEST");
                            StaticPopup_Show("ABANDON_QUEST_WITH_ITEMS", GetAbandonQuestName(), items);
                        else
                            StaticPopup_Hide("ABANDON_QUEST_WITH_ITEMS");
                            StaticPopup_Show("ABANDON_QUEST", GetAbandonQuestName());
                        end
                    </OnClick>
                    <OnEnter>
                        GameTooltip_AddNewbieTip(self, ABANDON_QUEST, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_ABANDONQUEST, 1);
                    </OnEnter>
                    <OnLeave function="GameTooltip_Hide"/>
                </Scripts>
            </Button>
            <Button parentKey="push" inherits="MagicButtonTemplate" text="SHARE_QUEST_ABBREV">
                <Size x="80" y="22"/>
                <Anchors>
                    <Anchor point="LEFT" relativeKey="$parent.abandon" relativePoint="RIGHT"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        QuestLogPushQuest()
                        PlaySound("igQuestLogOpen")
                    </OnClick>
                    <OnEnter>
                        GameTooltip_AddNewbieTip(self, SHARE_QUEST, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_SHAREQUEST, 1)
                    </OnEnter>
                    <OnLeave function="GameTooltip_Hide"/>
                </Scripts>
            </Button>
            <Button parentKey="TrackButton" inherits="MagicButtonTemplate" text="TRACK_QUEST_ABBREV">
                <Size x="80" y="22"/>
                <Anchors>
                    <Anchor point="LEFT" relativeKey="$parent.push" relativePoint="RIGHT"/>
                </Anchors>
                <Scripts>
                    <OnClick>
                        QuestGuru:ToggleWatch()
                    </OnClick>
                    <OnEnter>
                        GameTooltip_AddNewbieTip(self, TRACK_QUEST, 1.0, 1.0, 1.0, NEWBIE_TOOLTIP_TRACKQUEST, 1)
                    </OnEnter>
                    <OnLeave function="GameTooltip_Hide"/>
                </Scripts>
            </Button>


            <!-- frame with spiderwebs over left page, to show when quest log is empty -->
            <Frame parentKey="emptyLog" hidden="true">
                <Size x="305" y="340"/>
                <Anchors>
                    <Anchor point="LEFT" x="32" y="-16"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture file="Interface\QuestFrame\UI-QuestLog-Empty-TopLeft">
                            <Size x="256" y="256"/>
                            <Anchors>
                                <Anchor point="TOPLEFT"/>
                            </Anchors>
                        </Texture>
                        <Texture file="Interface\QuestFrame\UI-QuestLog-Empty-BotLeft">
                            <Size x="256" y="84"/>
                            <Anchors>
                                <Anchor point="BOTTOMLEFT"/>
                            </Anchors>
                            <TexCoords left="0" right="1" top="0" bottom="0.65625"/>
                        </Texture>
                        <Texture file="Interface\QuestFrame\UI-QuestLog-Empty-TopRight">
                            <Size x="49" y="256"/>
                            <Anchors>
                                <Anchor point="TOPRIGHT"/>
                            </Anchors>
                            <TexCoords left="0" right="0.765625" top="0" bottom="1"/>
                        </Texture>
                        <Texture file="Interface\QuestFrame\UI-QuestLog-Empty-BotRight">
                            <Size x="49" y="84"/>
                            <Anchors>
                                <Anchor point="BOTTOMRIGHT"/>
                            </Anchors>
                            <TexCoords left="0" right="0.765625" top="0" bottom="0.65625"/>
                        </Texture>
                    </Layer>
                    <Layer level="ARTWORK">
                        <FontString name="QuestLogNoQuestsText" inherits="GameFontHighlight" text="QUESTLOG_NO_QUESTS_TEXT">
                            <Size x="200" y="0"/>
                            <Anchors>
                                <Anchor point="CENTER" x="-6" y="16"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <Frame parentKey="count" inherits="InsetFrameTemplate3">
                <Size x="120" y="20"/>
                <Anchors>
                    <Anchor point="TOPLEFT" x="132" y="-33"/>
                </Anchors>
                <Layers>
                    <Layer level="ARTWORK">
                        <FontString parentKey="text" inherits="GameFontNormalSmall" text="Quests: 0/25">
                            <Anchors>
                                <Anchor point="CENTER"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
            </Frame>
            <Button parentKey="mapButton">
                <Size x="48" y="32"/>
                <Anchors>
                    <Anchor point="TOPRIGHT" x="-24" y="-27"/>
                </Anchors>
                <Layers>
                    <Layer level="ARTWORK">
                        <FontString name="$parentText" inherits="GameFontNormal" text="SHOW_MAP" parentKey="text">
                            <Anchors>
                                <Anchor point="RIGHT" relativePoint="LEFT" x="0" y="0"/>
                            </Anchors>
                        </FontString>
                    </Layer>
                </Layers>
                <NormalTexture file="Interface\QuestFrame\UI-QuestMap_Button">
                    <TexCoords left="0.125" right="0.875" top="0" bottom="0.5"/>
                </NormalTexture>
                <PushedTexture file="Interface\QuestFrame\UI-QuestMap_Button">
                    <TexCoords left="0.125" right="0.875" top="0.5" bottom="1.0"/>
                </PushedTexture>
                <HighlightTexture file="Interface\Buttons\ButtonHilight-Square" alphaMode="ADD">
                    <Size x="36" y="25"/>
                    <Anchors>
                        <Anchor point="RIGHT" x="-7" y="0"/>
                    </Anchors>
                </HighlightTexture>
                <Scripts>
                    <OnClick>
                        QuestGuru:ShowMap()
                    </OnClick>
                </Scripts>
            </Button>
            <!-- the actual log scrollFrame in left panel -->
            <ScrollFrame parentKey="scrollFrame" name="QuestGuruScrollFrame" inherits="HybridScrollFrameTemplate">
                <Size x="305" y="403"/> 
                <Anchors>
                    <Anchor point="TOPLEFT" x="6" y="-64"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture parentKey="top" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                            <Size x="29" y="102"/>
                            <Anchors>
                                <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="-6" y="5"/>
                            </Anchors>
                            <TexCoords left="0" right="0.445" top="0" bottom="0.4"/>
                        </Texture>
                        <Texture parentKey="bottom" file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                            <Size x="29" y="106"/>
                            <Anchors>
                                <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="-6" y="-2"/>
                            </Anchors>
                            <TexCoords left="0.515625" right="0.960625" top="0" bottom="0.4140625"/>
                        </Texture>
                        <Texture file="Interface\PaperDollInfoFrame\UI-Character-ScrollBar">
                            <Size x="29" y="1"/>
                            <Anchors>
                                <Anchor point="TOP" relativeKey="$parent.top" relativePoint="BOTTOM"/>
                                <Anchor point="BOTTOM" relativeKey="$parent.bottom" relativePoint="TOP"/>
                            </Anchors>
                            <TexCoords left="0" right="0.445" top=".75" bottom="1.0"/>
                        </Texture>
                    </Layer>
                    <Layer level="BORDER">
                        <Texture parentKey="BG" file="Interface\QuestFrame\QuestBookBG">
                            <Anchors>
                                <Anchor point="TOPLEFT" x="0" y="1"/>
                                <Anchor point="BOTTOMRIGHT" x="-2" y="-2"/>
                            </Anchors>
                            <TexCoords left="0" right="0.5859375" top="0" bottom="0.65625"/>
                        </Texture>
                    </Layer>
                </Layers>
                <Frames>
                    <!-- expand/collapse all button -->
                    <Button parentKey="expandAll">
                        <Size x="64" y="32"/>
                        <Anchors>
                            <Anchor point="BOTTOMLEFT" relativePoint="TOPLEFT" x="48" y="0"/>
                        </Anchors>
                        <Layers>
                            <Layer level="BACKGROUND">
                                <Texture file="Interface\QuestFrame\UI-QuestLogSortTab-Left">
                                    <Size x="8" y="32"/>
                                    <Anchors>
                                        <Anchor point="LEFT"/>
                                    </Anchors>
                                </Texture>
                                <Texture file="Interface\QuestFrame\UI-QuestLogSortTab-Right">
                                    <Size x="8" y="32"/>
                                    <Anchors>
                                        <Anchor point="RIGHT"/>
                                    </Anchors>
                                </Texture>
                                <Texture file="Interface\QuestFrame\UI-QuestLogSortTab-Middle">
                                    <Size x="0" y="32"/>
                                    <Anchors>
                                        <Anchor point="LEFT" x="8" y="0"/>
                                        <Anchor point="RIGHT" x="-8" y="0"/>
                                    </Anchors>
                                </Texture>
                            </Layer>
                        </Layers>
                        <!-- quest title/header normalText is shifted to right 20 -->
                        <ButtonText parentKey="normalText" text="ALL">
                            <Size x="0" y="10"/>
                                <Anchors>
                                <Anchor point="LEFT" x="28" y="-4"/>
                            </Anchors> 
                        </ButtonText>
                        <NormalTexture file="Interface\Buttons\UI-MinusButton-UP">
                            <Size x="16" y="16"/>
                            <Anchors>
                                <Anchor point="LEFT" x="11" y="-4"/>
                            </Anchors>
                        </NormalTexture>
                        <HighlightTexture file="Interface\Buttons\UI-PlusButton-Hilight" alphaMode="ADD">
                            <Size x="16" y="16"/>
                            <Anchors>
                                <Anchor point="LEFT" x="11" y="-4"/>
                            </Anchors>
                        </HighlightTexture>
                        <NormalFont style="GameFontNormalLeft"/>
                        <HighlightFont style="GameFontHighlightLeft"/>
                        <DisabledFont style="GameFontHighlightLeft"/>
                        <Scripts>
                            <OnClick>
                                QuestGuru:ExpandAllOnClick()
                            </OnClick>
                        </Scripts>
                    </Button>
                    <Slider name="$parentScrollBar" inherits="HybridScrollBarTemplate" parentKey="scrollBar">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativePoint="TOPRIGHT" x="0" y="-13"/>
                            <Anchor point="BOTTOMLEFT" relativePoint="BOTTOMRIGHT" x="0" y="14"/>
                        </Anchors>
                        <Scripts>
                            <OnLoad>
                                local name = self:GetName();
                                _G[name.."BG"]:Hide();
                                _G[name.."Top"]:Hide();
                                _G[name.."Bottom"]:Hide();
                                _G[name.."Middle"]:Hide();
                                self.doNotHide = true;
                            </OnLoad>
                        </Scripts>
                    </Slider>
                    <Frame parentKey="highlightFrame" hidden="true">
                        <Anchors>
                            <Anchor point="TOPLEFT"/>
                            <Anchor point="BOTTOMRIGHT"/>
                        </Anchors>
                        <Layers>
                            <Layer level="ARTWORK">
                                <Texture parentKey="texture" file="Interface\QuestFrame\UI-QuestLogTitleHighlight" alphaMode="ADD"/>
                            </Layer>
                        </Layers>
                        <Scripts>
                            <OnLoad>
                                self:SetParent(nil);
                            </OnLoad>
                        </Scripts>
                    </Frame>
                </Frames>
            </ScrollFrame>
            <ScrollFrame parentKey="detail" name="QuestGuruDetailScrollFrame" inherits="QuestScrollFrameTemplate">
                <Size x="298" y="403"/> <!-- was 403 -->
                <Anchors>
                    <Anchor point="TOPRIGHT" x="-32" y="-63"/>
                </Anchors>
                <Layers>
                    <Layer level="BACKGROUND">
                        <Texture parentKey="DetailBG" file="Interface\QuestFrame\QuestBG">
                            <Anchors>
                                <Anchor point="TOPLEFT" x="-2" y="1"/>
                                <Anchor point="BOTTOMRIGHT" x="1" y="-1"/>
                            </Anchors>
                            <TexCoords left="0" right="0.5859375" top="0" bottom="0.65625"/>
                        </Texture>
                    </Layer>
                </Layers>
                <ScrollChild>
                    <Frame name="QuestGuruDetailScrollChildFrame">
                        <Size x="298" y="403"/>
                    </Frame>
                </ScrollChild>
            </ScrollFrame>


            <Frame parentKey="optionsFrame" enableMouse="true" inherits="BasicFrameTemplateWithInset" hidden="true">
                <Size x="220" y="208"/>
                <Anchors>
                    <Anchor point="BOTTOM" relativeKey="$parent.options" relativePoint="TOP" x="0" y="0"/>
                </Anchors>
                <Frames>
                    <CheckButton parentKey="UndockWindow" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" x="16" y="-32"/>
                        </Anchors>
                    </CheckButton>
                    <CheckButton parentKey="LockWindow" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeKey="$parent.UndockWindow" relativePoint="BOTTOMLEFT" x="16" y="-4"/>
                        </Anchors>
                    </CheckButton>
                    <CheckButton parentKey="ShowResizeGrip" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeKey="$parent.LockWindow" relativePoint="BOTTOMLEFT" x="-16" y="-4"/>
                        </Anchors>
                    </CheckButton>
                    <CheckButton parentKey="ShowLevels" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeKey="$parent.ShowResizeGrip" relativePoint="BOTTOMLEFT" x="0" y="-4"/>
                        </Anchors>
                    </CheckButton>
                    <CheckButton parentKey="ShowTooltips" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeKey="$parent.ShowLevels" relativePoint="BOTTOMLEFT" x="0" y="-4"/>
                        </Anchors>
                    </CheckButton>
                    <CheckButton parentKey="SolidBackground" inherits="QuestGuruCheckButtonTemplate">
                        <Anchors>
                            <Anchor point="TOPLEFT" relativeKey="$parent.ShowTooltips" relativePoint="BOTTOMLEFT" x="0" y="-4"/>
                        </Anchors>
                    </CheckButton>
                </Frames>
            </Frame>

        </Frames>
        <Scripts>
            <OnLoad>
                self:RegisterEvent("PLAYER_LOGIN")
            </OnLoad>
            <OnEvent>
                self.OnEvent(self,event)
            </OnEvent>
            <OnShow>
                self.OnShow(self)
                PlaySound("igQuestLogOpen")
            </OnShow>
            <OnHide>
                self.OnHide(self)
                PlaySound("igQuestLogClose")
            </OnHide>
            <OnMouseDown>
                self:StartMoving()
            </OnMouseDown>
            <OnMouseUp>
                self:StopMovingOrSizing()
            </OnMouseUp>
        </Scripts>
    </Frame>
</Ui>
Thank you
__________________
"There's no such thing as too many addons."
Lothaer

My Authored Addons
HOME OF THE FREE, BECAUSE OF THE BRAVE
  Reply With Quote