Skip to content

Commit

Permalink
Fixed issue #52. Fixed invalid sprite reference. Updated README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Avinger authored and Crowdedlight committed Aug 20, 2014
1 parent e13022d commit 52fdb23
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 19 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@

* [VikingActionBarShortcut] (https://github.com/vikinghug/VikingActionBarShortcut)
* [VikingClassResources] (https://github.com/vikinghug/VikingClassResources)
* [VikingMedic] (https://github.com/vikinghug/VikingMedic)
* [VikingRecallFrame] (https://github.com/vikinghug/VikingRecallFrame)
* [VikingStalkerResources] (https://github.com/vikinghug/VikingStalkerResource)
* [VikingWarriorResources] (https://github.com/vikinghug/VikingWarriorResource)

### Replaces Carbine:

* ActionBarFrame
* RecallFrame

### Want to contribute?

Expand Down
28 changes: 14 additions & 14 deletions VikingActionBarFrame.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ end
function VikingActionBarFrame:GetAsyncLoadStatus()
if not (self.xmlDoc and self.xmlDoc:IsLoaded()) then
return Apollo.AddonLoadStatus.Loading
end
end

if not self.unitPlayer then
self.unitPlayer = GameLib.GetPlayerUnit()
Expand All @@ -50,19 +50,19 @@ function VikingActionBarFrame:GetAsyncLoadStatus()
return Apollo.AddonLoadStatus.Loading
end
end

if not (Tooltip and Tooltip.GetSpellTooltipForm) then
return Apollo.AddonLoadStatus.Loading
end

self:Setup()

return Apollo.AddonLoadStatus.Loaded
end

function VikingActionBarFrame:Setup()
g_ActionBarLoaded = false

Apollo.RegisterEventHandler("UnitEnteredCombat", "OnUnitEnteredCombat", self)
Apollo.RegisterEventHandler("PlayerChanged", "InitializeBars", self)
Apollo.RegisterEventHandler("WindowSizeChanged", "InitializeBars", self)
Expand Down Expand Up @@ -100,7 +100,7 @@ function VikingActionBarFrame:Setup()
Apollo.RegisterTimerHandler("CloseRecallTimer", "CloseRecallFlyout", self)

g_wndActionBarResources = Apollo.LoadForm(self.xmlDoc, "Resources", "FixedHudStratumLow", self) -- Do not rename. This is global and used by other forms as a parent.

self.wndMain:Show(false)

g_ActionBarLoaded = true
Expand Down Expand Up @@ -226,7 +226,7 @@ function VikingActionBarFrame:InitializeBars()
elseif idx < 11 then -- 9 to 10
-- we'll skip 10 since it has been promoted to a flyout
if idx == 9 then
wndCurr = Apollo.LoadForm(self.xmlDoc, "ActionBarItemMed", self.wndMain:FindChild("Bar1ButtonSmallContainer:Buttons"), self)
wndCurr = Apollo.LoadForm(self.xmlDoc, "ActionBarItemBig", self.wndMain:FindChild("Bar1ButtonSmallContainer:Buttons"), self)
wndActionBarBtn = wndCurr:FindChild("ActionBarBtn")
wndActionBarBtn:SetContentId(idx - 1)

Expand Down Expand Up @@ -446,7 +446,7 @@ end
function VikingActionBarFrame:OnMountBtn(wndHandler, wndControl)
self.nSelectedMount = wndControl:GetData():GetId()
GameLib.SetShortcutMount(self.nSelectedMount)

self.wndMountFlyout:FindChild("PopoutFrame"):Show(false)
end

Expand Down Expand Up @@ -653,7 +653,7 @@ end
function VikingActionBarFrame:CreateFlyout(wndContainer, strContentType, nContentID)
-- to circumvent an API limitation an actionbarbutton template should be made for each different content type
-- templates should follow the recipe: "FlyoutBtn_ContentType" eg. "FlyoutBtn_LASBar"

local wndFlyout = Apollo.LoadForm(self.xmlDoc, "Flyout", wndContainer, self)
wndFlyout:SetAnchorPoints(0, 0, 1, 1)
wndFlyout:SetAnchorOffsets(0, 0, 0, 0)
Expand All @@ -668,7 +668,7 @@ function VikingActionBarFrame:CreateFlyout(wndContainer, strContentType, nConten
end

function VikingActionBarFrame:RepopulateFlyout(wndFlyout, tList, strType)
-- tList contains either spellObject or itemObject
-- tList contains either spellObject or itemObject

local wndPopoutList = wndFlyout:FindChild("PopoutFrame:PopoutList")

Expand All @@ -679,19 +679,19 @@ function VikingActionBarFrame:RepopulateFlyout(wndFlyout, tList, strType)

wndCurr:FindChild(strType .. "BtnIcon"):SetSprite(tObject:GetIcon())

if strType == "Potion" then
if strType == "Potion" then
local nCount = tObject:GetBackpackCount()
if nCount > 1 then wndCurr:FindChild("PotionBtnStackCount"):SetText(nCount) end
elseif strType == "Stance" then
elseif strType == "Stance" then
local strKeyBinding = GameLib.GetKeyBinding("SetStance"..idx)
wndCurr:FindChild("StanceBtnKeyBind"):SetText(strKeyBinding == "<Unbound>" and "" or strKeyBinding)
wndCurr:FindChild("StanceBtnKeyBind"):SetText(strKeyBinding == "<Unbound>" and "" or strKeyBinding)
end

wndCurr:SetData(strType == "Stance" and idx or tObject)

if Tooltip then
wndCurr:SetTooltipDoc(nil)

if strType == "Potion" then
Tooltip.GetItemTooltipForm(self, wndCurr, tObject, {})
else
Expand Down Expand Up @@ -724,7 +724,7 @@ function VikingActionBarFrame:UpdateFlyoutSize(wndFlyout)
wndPopoutList:AddStyle("VScroll")
else
wndPopoutList:RemoveStyle("VScroll")
end
end
wndPopoutFrame:SetAnchorOffsets(nLeft, nBottom - nHeight, nRight, nBottom)
--wndPopoutList:ArrangeChildrenTiles()
end
Expand Down
2 changes: 1 addition & 1 deletion VikingActionBarFrame.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<Control Class="Window" LAnchorPoint="POTION_RIGHT" LAnchorOffset="0" TAnchorPoint="1" TAnchorOffset="-111" RAnchorPoint="POTION_RIGHT" RAnchorOffset="48" BAnchorPoint="1" BAnchorOffset="-36" RelativeToClient="1" Font="Default" Text="" Template="Default" TooltipType="OnCursor" Name="RecallContainer" BGColor="992b273d" TextColor="ffffffff" TooltipColor="" IgnoreMouse="1" Escapable="0" Tooltip="" CloseOnExternalClick="0" NoClip="1" NewWindowDepth="1" Picture="0" Sprite="" LeftEdgeControlsAnchor="" RightEdgeControlsAnchor="" Visible="1"/>
<Control Class="Window" LAnchorPoint="BAR1SMALL_RIGHT" LAnchorOffset="0" TAnchorPoint="1" TAnchorOffset="-111" RAnchorPoint="BAR1SMALL_RIGHT" RAnchorOffset="48" BAnchorPoint="1" BAnchorOffset="-36" RelativeToClient="1" Font="Default" Text="" Template="Default" TooltipType="OnCursor" Name="PathContainer" BGColor="992b273d" TextColor="ffffffff" TooltipColor="" IgnoreMouse="1" Escapable="0" Tooltip="" CloseOnExternalClick="0" NoClip="1" NewWindowDepth="1" Picture="0" Sprite="" LeftEdgeControlsAnchor="" RightEdgeControlsAnchor="PATH_RIGHT" Visible="1"/>
</Form>
<Form Class="Window" LAnchorPoint="0" LAnchorOffset="0" TAnchorPoint="0" TAnchorOffset="0" RAnchorPoint="0" RAnchorOffset="48" BAnchorPoint="0" BAnchorOffset="60" RelativeToClient="1" Font="CRB_InterfaceTiny_BB" Text="" Template="Default" TooltipType="OnCursor" Name="ActionBarItemBig" Border="0" Picture="1" SwallowMouseClicks="1" Moveable="1" Escapable="0" Overlapped="1" BGColor="992b273d" TextColor="ffffffff" TooltipColor="" IgnoreMouse="1" Tooltip="" TooltipFont="CRB_InterfaceSmall_O" HideInEditor="0" Sprite="WhiteFill" NoClip="0">
<Form Class="Window" LAnchorPoint="0" LAnchorOffset="0" TAnchorPoint="0" TAnchorOffset="0" RAnchorPoint="0" RAnchorOffset="48" BAnchorPoint="0" BAnchorOffset="60" RelativeToClient="1" Font="CRB_InterfaceTiny_BB" Text="" Template="Default" TooltipType="OnCursor" Name="ActionBarItemBig" Border="0" Picture="1" SwallowMouseClicks="1" Moveable="1" Escapable="0" Overlapped="1" BGColor="992b273d" TextColor="ffffffff" TooltipColor="" IgnoreMouse="1" Tooltip="" TooltipFont="CRB_InterfaceSmall_O" HideInEditor="0" Sprite="BasicSprites:WhiteFill" NoClip="0">
<Control Class="Window" LAnchorPoint="0" LAnchorOffset="0" TAnchorPoint="0" TAnchorOffset="0" RAnchorPoint="1" RAnchorOffset="0" BAnchorPoint="1" BAnchorOffset="0" RelativeToClient="1" Font="CRB_InterfaceTiny_BB" Text="" Template="Default" TooltipType="OnCursor" Name="Cover" BGColor="ffffffff" TextColor="ffffffff" TooltipColor="" Picture="1" IgnoreMouse="1" Sprite="" Tooltip="" TooltipId="" TooltipFont="CRB_InterfaceSmall_O" HideInEditor="0" AutoFadeBG="0"/>
<Control Class="ActionBarButton" Name="ActionBarBtn" ContentType="LASBar" ContentId="0" Base="Button_ActionBarBlank" RelativeToClient="1" IfHoldNoSignal="1" DT_VCENTER="1" DT_CENTER="1" NeverBringToFront="1" WindowSoundTemplate="ActionBarButton" BGColor="66141122" TextColor="ffffffff" LAnchorPoint="0" LAnchorOffset="0" TAnchorPoint="0" TAnchorOffset="0" RAnchorPoint="1" RAnchorOffset="0" BAnchorPoint="1" BAnchorOffset="0" Font="CRB_InterfaceTiny_BB" IgnoreTooltipDelay="0" TooltipColor="" RechargeBarLAnchorPoint="1" RechargeBarLAnchorOffset="-8" RechargeBarTAnchorPoint="0" RechargeBarTAnchorOffset="15" RechargeBarRAnchorPoint="1" RechargeBarRAnchorOffset="0" RechargeBarBAnchorPoint="1" RechargeBarBAnchorOffset="-3" RechargeBarEmptyColorAttribute="Black" RechargeBarFullColorAttribute="ffffffff" RechargeBarEmptyAttribute="WhiteFill" RechargeBarFullAttribute="spr_HUD_VerticalGoo_Pulse" Sprite="" TooltipType="DynamicFloater" ShortHotkeyFontAttribute="CRB_InterfaceTiny_BB" LongHotkeyFontAttribute="CRB_InterfaceTiny_BB" CountFontAttribute="CRB_InterfaceTiny_BB" CooldownFontAttribute="CRB_HeaderLarge" Tooltip="" ProcessRightClick="1" HideInEditor="0" NewWindowDepth="0" DrawShortcutBottom="1" Picture="1">
<Event Name="GenerateTooltip" Function="OnGenerateTooltip"/>
Expand Down

0 comments on commit 52fdb23

Please sign in to comment.