Thread Tools Display Modes
Prev Previous Post   Next Post Next
03/12/17, 02:46 PM   #1
stypsy
Join Date: Aug 2014
Posts: 2
Looking for help with my first addon

Hello,

I'm looking for help with completing my first addon. The part I'm having difficulty with is writing the code to display the information I requested. The following is the addon I'm creating and as you can see in the Update Functions section ... I'm at a loss. Below the lua lines I have posted the xml code that I'm hoping will display rank points.

The reason I'm writing this is because I prefer to see rank points earned / rank points required to next level. Both are available on the PvP window but it takes a few clicks to get too and you have to stare at a large window that blocks the action. This way, with the addon, I should have a small moveable window that displays rank points earned / rank points needed.

Any help would be greatly appreciated,

Sty

----------------------------------------------------------------------------
LUA:
----------------------------------------------------------------------------
RankPoints = {}
*
-- Initialize Variables --

RankPoints.name = "RankPoints"
RankPoints.version = 1.0.0
*
-- OnAddOnLoaded --

function RankPoints.OnAddOnLoaded(event, addonName)
if addonName ~= RankPoints.name then return end
*
RankPoints:Initialize()
end
*
-- Initialize Function --

function RankPoints:Initialize()
local rpoints = GetUnitAvARankPoints(string unitTag)
local rneeded = GetNumPointsNeededForAvARank(number rank)
*
EVENT_MANAGER:UnregisterForEvent(RankPoints.name, EVENT_ADD_ON_LOADED)
end

*-- Update Functions --

function RankPoints.Update()
local

-- Register Events --

EVENT_MANAGER:RegisterForEvent(RankPoints.name, EVENT_ADD_ON_LOADED, RankPoints.OnAddOnLoaded)


XML:
<GuiXml>
<Controls>
<TopLevelControl name="RankPointsWindow" clampedToScreen="true" mouseenabled="true" movable="true" hidden="False">
<Dimensions x="200" y="50" />
<Anchor point="CENTER" />

<OnUpdate>
RankPointsUpdate()
</OnUpdate>

<OnInitialized>
RankPointsInitialized()
</OnInitialized>

<Controls>
<Backdrop name="$(parent)BG" inherits="ZO_ThinBackdrop" />
<Label name="$(parent)Counter" font="ZoFontWindowTitle" colo"CFDCBD" wrapMode="ELLISIS" verticalAlignment="CENTER" text="Counter: ">
<AnchorFill />
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
  Reply With Quote
 

ESOUI » AddOns » AddOn Help/Support » Looking for help with my first addon


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off