- Open the addons folder and create a new folder named "BankedGold" (without the quotes).
- Create 3 files in that directory with the following names.
------------------------- BankedGold.lua
- BankedGold.txt
- BankedGold.xml
------------------------
- Copy and paste the following code into the BankedGold.lua file.
Code:
BankedGold = {}
BankedGold.name = 'BankedGold'
BankedGold.author = 't31os'
BankedGold.version = '1.0'
BankedGold.settingsVersion = 1
BankedGold.defaults = { panelX = 0, panelY = 0 }
function BankedGold:UpdatePanel()
BankedGold.bankGold = GetBankedMoney()
tBGBankCoins:SetText( BankedGold.bankGold )
end
function BankedGold:MoveStop()
BankedGold.savedOptions.panelX = tBG:GetLeft()
BankedGold.savedOptions.panelY = tBG:GetTop()
end
function BankedGold:RestorePanelPosition()
tBG:ClearAnchors()
tBG:SetAnchor( TOPLEFT, GuiRoot, TOPLEFT, BankedGold.savedOptions.panelX, BankedGold.savedOptions.panelY )
end
function BankedGold.AddonLoaded( eventCode, addOnName )
if BankedGold.name ~= addOnName then return end
BankedGold.savedOptions = ZO_SavedVars:NewAccountWide( "tBG_vars", BankedGold.settingsVersion, nil, BankedGold.defaults )
BankedGold:RestorePanelPosition()
-- Banked gold update events
EVENT_MANAGER:RegisterForEvent("BankedGold", EVENT_BANKED_MONEY_UPDATE, BankedGold.UpdatePanel )
end
EVENT_MANAGER:RegisterForEvent("BankedGold", EVENT_ADD_ON_LOADED, BankedGold.AddonLoaded )
- Copy and paste the following code into the BankedGold.txt file.
Code:
## Title: Banked |cffcc33Gold|r
## Description: Displays how much gold is in your bank
## APIVersion: 100012
## Version: 1.0
## Author: t31os
## SavedVariables: tBG_vars
; Addon main files
BankedGold.lua
BankedGold.xml
- Copy and paste the following code into the BankedGold.xml file.
Code:
<GuiXml>
<Controls>
<TopLevelControl name="tBG" movable="true" mouseEnabled="true" clampedToScreen="true" DrawLayer="0">
<Dimensions x="100" y="20" />
<Anchor point="CENTER" />
<OnMoveStop>
BankedGold:MoveStop()
</OnMoveStop>
<Controls>
<Backdrop name="$(parent)Backdrop" alpha="1" inherits="ZO_DefaultBackdrop" layer="BACKGROUND" />
<Texture name="$(parent)CoinIcon" textureFile="/EsoUI/Art/Currency/currency_gold.dds" verticalAlignment="CENTER">
<Dimensions x="16" y="16" />
<Anchor point="left" relativeTo="$(parent)" relativePoint="left" offsetX="" offsetY="" />
</Texture>
<Label name="$(parent)BankCoins" font="ZoFontGameOutline" wrapMode="ELLIPSIS" verticalAlignment="CENTER" text="">
<AnchorFill />
<Anchor point="left" relativeTo="$(parent)CoinIcon" relativePoint="right" offsetX="5" offsetY="" />
<OnInitialized>
BankedGold:UpdatePanel()
</OnInitialized>
</Label>
</Controls>
</TopLevelControl>
</Controls>
</GuiXml>
- Save the files, load up the game and check it out.
- Tweak code to suit.
- Enjoy!
Hope that helps and feel free to ask questions if you want help making adjustments.
Originally Posted by Marazota
afaik you cant turn off all extra stuff in infohub
|
Sure you can(assuming we're both talking about RAETIA Info Hub), you can have as many or as few modules as you want in the info bar, take a look at the Legatus feature, i use it myself.