lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [SequenceBars/] [ImportWindow.lua] - Rev 199

Compare with Previous | Blame | View Log

ImportWindow = class(Turbine.UI.Lotro.Window);

function ImportWindow:Constructor(title, object)
    Turbine.UI.Lotro.Window.Constructor(self);
    self:SetVisible(true);
    self:SetSize(320, 90);
    self:SetText(title);
    self.object = object;
    CenterWindow(self);
    self:SetZOrder(2147483647);
        
    local prevContext = L:SetContext("/ImportWindow");
    local label = Turbine.UI.Label();
    self.label = label;
    label:SetParent(self);
    label:SetFont(Turbine.UI.Lotro.Font.TrajanPro14);
    label:SetText(L:GetText("PasteDataHere"));
    label:SetSize(300, 16);
    label:SetPosition(10, 45);
    
    local textBox = Turbine.UI.Lotro.TextBox();
    self.textBox = textBox;
    textBox:SetParent(self);
    textBox:SetPosition(140, 61);
    textBox:SetSize(40, 20);
    textBox:SetMarkupEnabled(false);
    
    L:SetContext(prevContext);
    self:Activate();
    self.textBox:Focus();

    self:SetWantsUpdates(true);
end

function ImportWindow:Update()
    local importData = self.textBox:GetText();
    if (importData:len() > 0) then
        self:SetWantsUpdates(false);
        self.object:Import(self.textBox:GetText());
        self:Close();
    end
end

Compare with Previous | Blame


All times are GMT -5. The time now is 04:39 PM.


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