lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [Common/] [UI/] [Tabs/] [TabCardStack.lua] - Rev 2

Go to most recent revision | Compare with Previous | Blame | View Log

TabCardStack = class(Turbine.UI.Control);

function TabCardStack:Constructor()
    Turbine.UI.Control.Constructor(self);

    self.tabCards = {};
end

function TabCardStack:AddTabCard(tabCard)
    table.insert(self.tabCards, tabCard);
    tabCard:SetParent(self);
    tabCard:SetSize(self:GetSize());
    self:BringToFront(tabCard);
end

function TabCardStack:BringToFront(tabCard)
    for t = 1, #self.tabCards do
        local otherTabCard = self.tabCards[t];
        if (otherTabCard == tabCard) then
            otherTabCard:BringToFront();
        else
            otherTabCard:SendToBack();
        end
    end
end

function TabCardStack:SetSize(width, height)
    Turbine.UI.Control.SetSize(self, width, height);
    for t = 1, #self.tabCards do
        self.tabCards[t]:SetSize(width, height);
    end
end

function TabCardStack:SetWidth(width)
    self:SetSize(width, self:GetHeight());
end

function TabCardStack:SetHeight(height)
    self:SetSize(self:GetWidth(), height);
end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 02:13 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui