lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

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

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 199 Thurallor-7095
    textBox:SetPosition(140, 61);
25 Thurallor-7095
    textBox:SetSize(40, 20);
26 Thurallor-7095
    textBox:SetMarkupEnabled(false);
27 2 Thurallor-7095
 
28 Thurallor-7095
    L:SetContext(prevContext);
29 7 Thurallor-7095
    self:Activate();
30 Thurallor-7095
    self.textBox:Focus();
31 199 Thurallor-7095
 
32 Thurallor-7095
    self:SetWantsUpdates(true);
33 2 Thurallor-7095
end
34 199 Thurallor-7095
 
35 Thurallor-7095
function ImportWindow:Update()
36 Thurallor-7095
    local importData = self.textBox:GetText();
37 Thurallor-7095
    if (importData:len() > 0) then
38 Thurallor-7095
        self:SetWantsUpdates(false);
39 Thurallor-7095
        self.object:Import(self.textBox:GetText());
40 Thurallor-7095
        self:Close();
41 Thurallor-7095
    end
42 Thurallor-7095
end

All times are GMT -5. The time now is 09:56 PM.


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