lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [SequenceBars/] [ImportWindow.lua] - Blame information for rev 177

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

Line No. Rev Author Line
1 2 Thurallor-7095
ImportWindow = class(Turbine.UI.Lotro.Window);
2 Thurallor-7095
 
3 Thurallor-7095
function ImportWindow:Constructor(title, object)
4 Thurallor-7095
    Turbine.UI.Lotro.Window.Constructor(self);
5 Thurallor-7095
    self:SetVisible(true);
6 Thurallor-7095
    self:SetSize(320, 90);
7 Thurallor-7095
    self:SetText(title);
8 Thurallor-7095
    self.object = object;
9 Thurallor-7095
    CenterWindow(self);
10 Thurallor-7095
    self:SetZOrder(2147483647);
11 Thurallor-7095
 
12 Thurallor-7095
    local prevContext = L:SetContext("/ImportWindow");
13 Thurallor-7095
    local label = Turbine.UI.Label();
14 Thurallor-7095
    self.label = label;
15 Thurallor-7095
    label:SetParent(self);
16 Thurallor-7095
    label:SetFont(Turbine.UI.Lotro.Font.TrajanPro14);
17 Thurallor-7095
    label:SetText(L:GetText("PasteDataHere"));
18 Thurallor-7095
    label:SetSize(300, 16);
19 Thurallor-7095
    label:SetPosition(10, 45);
20 Thurallor-7095
 
21 Thurallor-7095
    local textBox = Turbine.UI.Lotro.TextBox();
22 Thurallor-7095
    self.textBox = textBox;
23 Thurallor-7095
    textBox:SetParent(self);
24 Thurallor-7095
    textBox:SetPosition(10, 61);
25 Thurallor-7095
    textBox:SetSize(300, 20);
26 Thurallor-7095
    textBox.TextChanged = function()
27 Thurallor-7095
        self.object:Import(self.textBox:GetText());
28 Thurallor-7095
        self.textBox.TextChanged = nil;
29 Thurallor-7095
        self:Close();
30 Thurallor-7095
    end
31 Thurallor-7095
 
32 Thurallor-7095
    L:SetContext(prevContext);
33 7 Thurallor-7095
    self:Activate();
34 Thurallor-7095
    self.textBox:Focus();
35 2 Thurallor-7095
end

All times are GMT -5. The time now is 06:11 PM.


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