lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.21/] [KragenBars/] [SetupLMPets.lua] - Rev 72

Compare with Previous | Blame | View Log

import "Turbine.UI";

SetupLMPets = class(Turbine.UI.ListBox);

-- helper functions
local tt = function(width, height, control, text)
    local tooltip = KragenPlugs.UI.Tooltip();
    tooltip:SetText(text);
    tooltip:SetControl(control);
    tooltip:SetSize(width, height);
end

local holder = function(parent, height)
    local container = Turbine.UI.Control();
    container:SetSize(400, height);
    parent:AddItem(container);
    return container;
end

local setShortcut = function(quickslot, shortcutType, shortcutData)
    local setter = function()
        if (shortcutData ~= "") then
            local shortcut = Turbine.UI.Lotro.Shortcut(shortcutType, shortcutData);
            quickslot:SetShortcut(shortcut);
        else
            quickslot:SetShortcut(nil);
        end
    end
    
    if (not pcall(setter)) then
        quickslot:SetShortcut(nil);
    end
end

function SetupLMPets:Constructor()
    Turbine.UI.ListBox.Constructor(self);

    self.current = nil;
        
    self:SetOrientation(Turbine.UI.Orientation.Horizontal);
    self:SetMaxItemsPerLine(1);

    local line = holder(self, 35);
    self.titleRavens = KragenPlugs.UI.PanelDivider();
    self.titleRavens:SetPosition(0,0);
    self.titleRavens:SetParent(line);
    self.titleRavens:SetText("Ravens");
    self.titleRavens:SetSize(400, 30);
      
    line = holder(self, 20);
    self.checkboxlmr1 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr1:SetParent(line);
    self.checkboxlmr1:SetSize(180, 20);
    self.checkboxlmr1:SetPosition(0,0);
    self.checkboxlmr1:SetText("Raven-lore");
    self.checkboxlmr1:SetVisible(true);
        
    self.checkboxlmr2 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr2:SetParent(line);
    self.checkboxlmr2:SetSize(180,20);
    self.checkboxlmr2:SetPosition(220,0);
    self.checkboxlmr2:AlignLeft(true);
    self.checkboxlmr2:SetText("Blood-raven");
    self.checkboxlmr2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmr3 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr3:SetParent(line);
    self.checkboxlmr3:SetSize(180, 20);
    self.checkboxlmr3:SetPosition(0,0);
    self.checkboxlmr3:SetText("Mottled-wing Raven");
    self.checkboxlmr3:SetVisible(true);
        
    self.checkboxlmr4 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr4:SetParent(line);
    self.checkboxlmr4:SetSize(180,20);
    self.checkboxlmr4:SetPosition(220,0);
    self.checkboxlmr4:AlignLeft(true);
    self.checkboxlmr4:SetText("Frost-raven");
    self.checkboxlmr4:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmr5 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr5:SetParent(line);
    self.checkboxlmr5:SetSize(180, 20);
    self.checkboxlmr5:SetPosition(0,0);
    self.checkboxlmr5:SetText("Storm-raven");
    self.checkboxlmr5:SetVisible(true);
        
    self.checkboxlmr6 = KragenPlugs.UI.CheckBox();
    self.checkboxlmr6:SetParent(line);
    self.checkboxlmr6:SetSize(180,20);
    self.checkboxlmr6:SetPosition(220,0);
    self.checkboxlmr6:AlignLeft(true);
    self.checkboxlmr6:SetText("Weathered-raven");
    self.checkboxlmr6:SetVisible(true);
        
    line = holder(self, 35);
    self.titleBears = KragenPlugs.UI.PanelDivider();
    self.titleBears:SetPosition(0,0);
    self.titleBears:SetParent(line);
    self.titleBears:SetText("Bears");
    self.titleBears:SetSize(400, 30);
      
    line = holder(self, 20);
    self.checkboxlmb1 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb1:SetParent(line);
    self.checkboxlmb1:SetSize(180, 20);
    self.checkboxlmb1:SetPosition(0,0);
    self.checkboxlmb1:SetText("Friend of Bears");
    self.checkboxlmb1:SetVisible(true);
        
    self.checkboxlmb2 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb2:SetParent(line);
    self.checkboxlmb2:SetSize(180,20);
    self.checkboxlmb2:SetPosition(220,0);
    self.checkboxlmb2:AlignLeft(true);
    self.checkboxlmb2:SetText("Black Bear");
    self.checkboxlmb2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmb3 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb3:SetParent(line);
    self.checkboxlmb3:SetSize(180, 20);
    self.checkboxlmb3:SetPosition(0,0);
    self.checkboxlmb3:SetText("Polar Bear");
    self.checkboxlmb3:SetVisible(true);
        
    self.checkboxlmb4 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb4:SetParent(line);
    self.checkboxlmb4:SetSize(180,20);
    self.checkboxlmb4:SetPosition(220,0);
    self.checkboxlmb4:AlignLeft(true);
    self.checkboxlmb4:SetText("Wildpaw Bear");
    self.checkboxlmb4:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmb5 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb5:SetParent(line);
    self.checkboxlmb5:SetSize(180, 20);
    self.checkboxlmb5:SetPosition(0,0);
    self.checkboxlmb5:SetText("Tundra Bear Cub");
    self.checkboxlmb5:SetVisible(true);
        
    self.checkboxlmb6 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb6:SetParent(line);
    self.checkboxlmb6:SetSize(180,20);
    self.checkboxlmb6:SetPosition(220,0);
    self.checkboxlmb6:AlignLeft(true);
    self.checkboxlmb6:SetText("Blackpaw Bear");
    self.checkboxlmb6:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmb7 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb7:SetParent(line);
    self.checkboxlmb7:SetSize(180, 20);
    self.checkboxlmb7:SetPosition(0,0);
    self.checkboxlmb7:SetText("Weathered Bear");
    self.checkboxlmb7:SetVisible(true);
        
    self.checkboxlmb8 = KragenPlugs.UI.CheckBox();
    self.checkboxlmb8:SetParent(line);
    self.checkboxlmb8:SetSize(180,20);
    self.checkboxlmb8:SetPosition(220,0);
    self.checkboxlmb8:AlignLeft(true);
    self.checkboxlmb8:SetText("Future Use");
    self.checkboxlmb8:SetVisible(false);
        
    line = holder(self, 35);
    self.titleLynx = KragenPlugs.UI.PanelDivider();
    self.titleLynx:SetPosition(0,0);
    self.titleLynx:SetParent(line);
    self.titleLynx:SetText("Lynx");
    self.titleLynx:SetSize(400, 30);
      
    line = holder(self, 20);
    self.checkboxlml1 = KragenPlugs.UI.CheckBox();
    self.checkboxlml1:SetParent(line);
    self.checkboxlml1:SetSize(180, 20);
    self.checkboxlml1:SetPosition(0,0);
    self.checkboxlml1:SetText("Lynx-speech");
    self.checkboxlml1:SetVisible(true);
        
    self.checkboxlml2 = KragenPlugs.UI.CheckBox();
    self.checkboxlml2:SetParent(line);
    self.checkboxlml2:SetSize(180,20);
    self.checkboxlml2:SetPosition(220,0);
    self.checkboxlml2:AlignLeft(true);
    self.checkboxlml2:SetText("Spotted Lynx");
    self.checkboxlml2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlml3 = KragenPlugs.UI.CheckBox();
    self.checkboxlml3:SetParent(line);
    self.checkboxlml3:SetSize(180, 20);
    self.checkboxlml3:SetPosition(0,0);
    self.checkboxlml3:SetText("Onyx Lynx");
    self.checkboxlml3:SetVisible(true);
        
    self.checkboxlml4 = KragenPlugs.UI.CheckBox();
    self.checkboxlml4:SetParent(line);
    self.checkboxlml4:SetSize(180,20);
    self.checkboxlml4:SetPosition(220,0);
    self.checkboxlml4:AlignLeft(true);
    self.checkboxlml4:SetText("Tundra Lynx");
    self.checkboxlml4:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlml5 = KragenPlugs.UI.CheckBox();
    self.checkboxlml5:SetParent(line);
    self.checkboxlml5:SetSize(180, 20);
    self.checkboxlml5:SetPosition(0,0);
    self.checkboxlml5:SetText("Grey Lynx");
    self.checkboxlml5:SetVisible(true);
        
    self.checkboxlml6 = KragenPlugs.UI.CheckBox();
    self.checkboxlml6:SetParent(line);
    self.checkboxlml6:SetSize(180,20);
    self.checkboxlml6:SetPosition(220,0);
    self.checkboxlml6:AlignLeft(true);
    self.checkboxlml6:SetText("Mountain Lynx");
    self.checkboxlml6:SetVisible(true);
        
    line = holder(self, 35);
    self.titleEagle = KragenPlugs.UI.PanelDivider();
    self.titleEagle:SetPosition(0,0);
    self.titleEagle:SetParent(line);
    self.titleEagle:SetText("Eagle");
    self.titleEagle:SetSize(400, 30);
                
    line = holder(self, 20);
    self.checkboxlme1 = KragenPlugs.UI.CheckBox();
    self.checkboxlme1:SetParent(line);
    self.checkboxlme1:SetSize(180, 20);
    self.checkboxlme1:SetPosition(0,0);
    self.checkboxlme1:SetText("Eagle-friend");
    self.checkboxlme1:SetVisible(true);
        
    self.checkboxlme2 = KragenPlugs.UI.CheckBox();
    self.checkboxlme2:SetParent(line);
    self.checkboxlme2:SetSize(180,20);
    self.checkboxlme2:SetPosition(220,0);
    self.checkboxlme2:AlignLeft(true);
    self.checkboxlme2:SetText("Ashen Eagle");
    self.checkboxlme2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlme3 = KragenPlugs.UI.CheckBox();
    self.checkboxlme3:SetParent(line);
    self.checkboxlme3:SetSize(180, 20);
    self.checkboxlme3:SetPosition(0,0);
    self.checkboxlme3:SetText("Snowcrest Eagle");
    self.checkboxlme3:SetVisible(true);
        
    self.checkboxlme4 = KragenPlugs.UI.CheckBox();
    self.checkboxlme4:SetParent(line);
    self.checkboxlme4:SetSize(180,20);
    self.checkboxlme4:SetPosition(220,0);
    self.checkboxlme4:AlignLeft(true);
    self.checkboxlme4:SetText("Ember Eagle");
    self.checkboxlme4:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlme5 = KragenPlugs.UI.CheckBox();
    self.checkboxlme5:SetParent(line);
    self.checkboxlme5:SetSize(180, 20);
    self.checkboxlme5:SetPosition(0,0);
    self.checkboxlme5:SetText("Tundra Eagle");
    self.checkboxlme5:SetVisible(true);
        
    self.checkboxlme6 = KragenPlugs.UI.CheckBox();
    self.checkboxlme6:SetParent(line);
    self.checkboxlme6:SetSize(180,20);
    self.checkboxlme6:SetPosition(220,0);
    self.checkboxlme6:AlignLeft(true);
    self.checkboxlme6:SetText("Future Use");
    self.checkboxlme6:SetVisible(false);
        
    line = holder(self, 35);
    self.titleSaber = KragenPlugs.UI.PanelDivider();
    self.titleSaber:SetPosition(0,0);
    self.titleSaber:SetParent(line);
    self.titleSaber:SetText("Sabercat");
    self.titleSaber:SetSize(400, 30);
                
    line = holder(self, 20);
    self.checkboxlms1 = KragenPlugs.UI.CheckBox();
    self.checkboxlms1:SetParent(line);
    self.checkboxlms1:SetSize(180, 20);
    self.checkboxlms1:SetPosition(0,0);
    self.checkboxlms1:SetText("Friend of Feline Hunters");
    self.checkboxlms1:SetVisible(true);
        
    self.checkboxlms2 = KragenPlugs.UI.CheckBox();
    self.checkboxlms2:SetParent(line);
    self.checkboxlms2:SetSize(180,20);
    self.checkboxlms2:SetPosition(220,0);
    self.checkboxlms2:AlignLeft(true);
    self.checkboxlms2:SetText("Dusky Sabercat");
    self.checkboxlms2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlms3 = KragenPlugs.UI.CheckBox();
    self.checkboxlms3:SetParent(line);
    self.checkboxlms3:SetSize(180, 20);
    self.checkboxlms3:SetPosition(0,0);
    self.checkboxlms3:SetText("Spotted Sabercat");
    self.checkboxlms3:SetVisible(true);
        
    self.checkboxlms4 = KragenPlugs.UI.CheckBox();
    self.checkboxlms4:SetParent(line);
    self.checkboxlms4:SetSize(180,20);
    self.checkboxlms4:SetPosition(220,0);
    self.checkboxlms4:AlignLeft(true);
    self.checkboxlms4:SetText("Grey Sabercat");
    self.checkboxlms4:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlms5 = KragenPlugs.UI.CheckBox();
    self.checkboxlms5:SetParent(line);
    self.checkboxlms5:SetSize(180, 20);
    self.checkboxlms5:SetPosition(0,0);
    self.checkboxlms5:SetText("Deep-wood Sabercat");
    self.checkboxlms5:SetVisible(true);
        
    self.checkboxlms6 = KragenPlugs.UI.CheckBox();
    self.checkboxlms6:SetParent(line);
    self.checkboxlms6:SetSize(180,20);
    self.checkboxlms6:SetPosition(220,0);
    self.checkboxlms6:AlignLeft(true);
    self.checkboxlms6:SetText("Striped Sabercat");
    self.checkboxlms6:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlms7 = KragenPlugs.UI.CheckBox();
    self.checkboxlms7:SetParent(line);
    self.checkboxlms7:SetSize(180, 20);
    self.checkboxlms7:SetPosition(0,0);
    self.checkboxlms7:SetText("Onyx Sabercat");
    self.checkboxlms7:SetVisible(true);
        
    self.checkboxlms8 = KragenPlugs.UI.CheckBox();
    self.checkboxlms8:SetParent(line);
    self.checkboxlms8:SetSize(180,20);
    self.checkboxlms8:SetPosition(220,0);
    self.checkboxlms8:AlignLeft(true);
    self.checkboxlms8:SetText("Future Use");
    self.checkboxlms8:SetVisible(false);
        
    line = holder(self, 35);
    self.titleBog = KragenPlugs.UI.PanelDivider();
    self.titleBog:SetPosition(0,0);
    self.titleBog:SetParent(line);
    self.titleBog:SetText("Bog-lurker");
    self.titleBog:SetSize(400, 30);
      
    line = holder(self, 20);
    self.checkboxlmbg1 = KragenPlugs.UI.CheckBox();
    self.checkboxlmbg1:SetParent(line);
    self.checkboxlmbg1:SetSize(180, 20);
    self.checkboxlmbg1:SetPosition(0,0);
    self.checkboxlmbg1:SetText("Nature-friend");
    self.checkboxlmbg1:SetVisible(true);
        
    self.checkboxlmbg2 = KragenPlugs.UI.CheckBox();
    self.checkboxlmbg2:SetParent(line);
    self.checkboxlmbg2:SetSize(180,20);
    self.checkboxlmbg2:SetPosition(220,0);
    self.checkboxlmbg2:AlignLeft(true);
    self.checkboxlmbg2:SetText("Swamp-guardian");
    self.checkboxlmbg2:SetVisible(true);
        
    line = holder(self, 20);
    self.checkboxlmbg3 = KragenPlugs.UI.CheckBox();
    self.checkboxlmbg3:SetParent(line);
    self.checkboxlmbg3:SetSize(180, 20);
    self.checkboxlmbg3:SetPosition(0,0);
    self.checkboxlmbg3:SetText("Mountain-guardian");
    self.checkboxlmbg3:SetVisible(true);
        
    self.checkboxlmbg4 = KragenPlugs.UI.CheckBox();
    self.checkboxlmbg4:SetParent(line);
    self.checkboxlmbg4:SetSize(180,20);
    self.checkboxlmbg4:SetPosition(220,0);
    self.checkboxlmbg4:AlignLeft(true);
    self.checkboxlmbg4:SetText("Tundra-guardian");
    self.checkboxlmbg4:SetVisible(true);
        
        
end


function SetupLMPets:EnableControls(enable)
    -- self.checkboxf1:SetEnabled(enable);
    -- self.checkboxf2:SetEnabled(enable);

end



function SetupLMPets:Destroy()
    -- cleanup the quickslots so the client doesn't crash

end

Compare with Previous | Blame


All times are GMT -5. The time now is 05:28 AM.


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