Skip to content

Commit

Permalink
added more spellbook container
Browse files Browse the repository at this point in the history
  • Loading branch information
Nils89 committed Jan 1, 2025
1 parent 45df012 commit 423a01a
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 21 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
3.3.19-Era
- Added more spellbook container

3.3.18-Era
- BigWigs fix

Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG_NEW_VERSION.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
3.3.19-Era
- Added more spellbook container

3.3.18-Era
- BigWigs fix

Expand Down
4 changes: 4 additions & 0 deletions changelog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ local ct = {
}
GW.CHANGELOGS_TYPES = ct

addChange("3.3.19",{
{ct.change,[=[Added more spellbook container]=]},
})

addChange("3.3.18",{
{ct.change,[=[BigWigs fix]=]},
})
Expand Down
42 changes: 21 additions & 21 deletions character/spellbook.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,26 +220,6 @@ local function setButtonStyle(ispassive, spellID, skillType, icon, spellbookInde
return btn
end

local function findHigherRank(t,spellID)
local si = spellID
for k,v in pairs(GW.SpellsByLevel) do
for _,spell in pairs(v) do
if spell.requiredIds~=nil then
for _,rid in pairs(spell.requiredIds) do
if rid == si then
if not IsSpellKnown(spell.id) then
t[#t + 1] = {id=spell.id,level=k,rank=spell.rank}
t = findHigherRank(t,spell.id)
return t
end
end
end
end
end
end
return t
end

local function getHeaderHeight(pagingContainer,lastHeader)
local lastColumn = 1
if lastHeader~=nil then
Expand Down Expand Up @@ -276,6 +256,8 @@ local function setUpPaging(self)
self.attrDummy:SetFrameRef('container3', self.container3)
self.attrDummy:SetFrameRef('container4', self.container4)
self.attrDummy:SetFrameRef('container5', self.container5)
self.attrDummy:SetFrameRef('container6', self.container6)
self.attrDummy:SetFrameRef('container7', self.container7)
self.attrDummy:SetFrameRef('left', self.left)
self.attrDummy:SetFrameRef('right', self.right)
self.attrDummy:SetAttribute('_onattributechanged', ([=[
Expand All @@ -286,13 +268,23 @@ local function setUpPaging(self)
local p3 = self:GetFrameRef('container3')
local p4 = self:GetFrameRef('container4')
local p5 = self:GetFrameRef('container5')
local p6 = self:GetFrameRef('container6')
local p7 = self:GetFrameRef('container7')
local left = self:GetFrameRef('left')
local right = self:GetFrameRef('right')
local numPages = %s
local currentPage = 1
if value == "left" then
if p5:IsVisible() then
if p7:IsVisible() then
p7:Hide()
p6:Show()
currentPage = 6
elseif p6:IsVisible() then
p6:Hide()
p5:Show()
currentPage = 5
elseif p5:IsVisible() then
p5:Hide()
p4:Show()
currentPage = 4
Expand Down Expand Up @@ -327,6 +319,14 @@ local function setUpPaging(self)
p4:Hide()
p5:Show()
currentPage = 5
elseif p5:IsVisible() then
p5:Hide()
p6:Show()
currentPage = 6
elseif p6:IsVisible() then
p6:Hide()
p7:Show()
currentPage = 7
end
end
Expand Down
22 changes: 22 additions & 0 deletions character/talents.xml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,28 @@
</OnShow>
</Scripts>
</Frame>
<Frame name="$parentcontainer6" parentKey="container6" inherits="SecureHandlerShowHideTemplate" enableMouse="false" hidden="true">
<Size x="608" y="541"/>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0" />
</Anchors>
<Scripts>
<OnShow>
self:GetParent().pages:SetText(6)
</OnShow>
</Scripts>
</Frame>
<Frame name="$parentcontainer7" parentKey="container7" inherits="SecureHandlerShowHideTemplate" enableMouse="false" hidden="true">
<Size x="608" y="541"/>
<Anchors>
<Anchor point="TOPLEFT" relativePoint="TOPLEFT" x="0" y="0" />
</Anchors>
<Scripts>
<OnShow>
self:GetParent().pages:SetText(7)
</OnShow>
</Scripts>
</Frame>
<Button parentKey="left" enableMouse="true" inherits="SecureHandlerClickTemplate,SecureHandlerShowHideTemplate,SecureHandlerStateTemplate" >
<size x="32" y="32"/>
<Anchors>
Expand Down

0 comments on commit 423a01a

Please sign in to comment.