lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [SequenceBars/] [ScreenBoundary.lua] - Rev 30

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

ScreenBoundary = class(Turbine.Object);

function ScreenBoundary:Constructor()
    self.thickness = 20;
    self.patternSize = 31;

    self.bottom = Turbine.UI.Window();
    self.bottom:SetBackground("Thurallor/SequenceBars/Images/screen_boundary.tga");
    self.bottom.MouseEnter = function() self:MouseEnter(); end
    self.bottom:SetHeight(self.thickness);
    self.bottom:SetZOrder(1);
    
    self.side = Turbine.UI.Window();
    self.side:SetBackground("Thurallor/SequenceBars/Images/screen_boundary.tga");
    self.side.MouseEnter = function() self:MouseEnter(); end
    self.side:SetWidth(self.thickness);
    self.side:SetZOrder(1);
end

function ScreenBoundary:SetVisible(visible)
    self.bottom:SetVisible(visible);
    self.side:SetVisible(visible);
end

function ScreenBoundary:MouseEnter()
    -- to be overridden
end

function ScreenBoundary:SetSize(width, height)
    local w = math.ceil(width / self.patternSize) * self.patternSize;
    local h = math.ceil(height / self.patternSize) * self.patternSize;

    self.bottom:SetTop(height);
    self.bottom:SetLeft(width - w);
    self.bottom:SetWidth(w + self.thickness);
    self.side:SetLeft(width);
    self.side:SetTop(height - h);
    self.side:SetHeight(h);
end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 06:51 AM.


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