Skip to content

Commit

Permalink
Split functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ZarestiaDev committed Feb 21, 2023
1 parent 1b47095 commit 7dfeef2
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions campaign/scripts/char_actions.lua
Expand Up @@ -66,21 +66,27 @@ function stateChanged()
subothers.setAnchor("bottom", "", "", "", nBottomActionFrame);
end

setTracker(bVisible, nTopActionFrame, nBottomActionFrame, nTopActionSub, sParent, sAnchor);
setActionFrame(nTopActionFrame, nBottomActionFrame);
setTrackerVisiblity(bVisible);
setSubwindows(nTopActionSub, sParent, sAnchor);
end

function setTracker(bVisible, nTopActionFrame, nBottomActionFrame, nTopActionSub, sParent, sAnchor)
actionframe.setStaticBounds(15,nTopActionFrame,-29,nBottomActionFrame);

subspells.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subweapons.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subitems.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subothers.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
function setActionFrame(nTopActionFrame, nBottomActionFrame)
actionframe.setStaticBounds(15, nTopActionFrame, -29, nBottomActionFrame);
end

label_actiontracker.setVisible(bVisible);
function setTrackerVisiblity(bVisible)
label_actiontracker.setVisible(bVisible);
standard.setVisible(bVisible);
move.setVisible(bVisible);
fullround.setVisible(bVisible);
swift.setVisible(bVisible);
reset.setVisible(bVisible);
end

function setSubwindows(nTopActionSub, sParent, sAnchor)
subspells.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subweapons.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subitems.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
subothers.setAnchor("top", sParent, sAnchor, "", nTopActionSub);
end

0 comments on commit 7dfeef2

Please sign in to comment.