lotrointerface.com
Search Downloads

LoTROInterface SVN KragenBars

[/] [branches/] [3.20/] [KragenBars/] [SetupFeatures.lua] - Rev 133

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

import "Turbine.UI";

SetupFeatures = 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 SetupFeatures:Constructor()
    Turbine.UI.ListBox.Constructor(self);

    self.current = nil;

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

    local line = holder(self, 35);
    self.titleTraits = KragenPlugs.UI.PanelDivider();
    self.titleTraits:SetPosition(0,0);
    self.titleTraits:SetParent(line);
    self.titleTraits:SetText("Traits");
    self.titleTraits:SetSize(400, 30);

    line = holder(self, 20);
    self.checkboxf1 = KragenPlugs.UI.CheckBox();
    self.checkboxf1:SetParent(line);
    self.checkboxf1:SetSize(180, 20);
    self.checkboxf1:SetPosition(0,0);
    self.checkboxf1:SetText("Checkboxf1");
    self.checkboxf1:SetVisible(false);
    -- tt(420, 19, self.Checkboxf1, "When checked, the disease quickslot will be shown.");

    self.checkboxf2 = KragenPlugs.UI.CheckBox();
    self.checkboxf2:SetParent(line);
    self.checkboxf2:SetSize(180,20);
    self.checkboxf2:SetPosition(220,0);
    self.checkboxf2:AlignLeft(true);
    self.checkboxf2:SetText("Checkboxf2");
    self.checkboxf2:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf3 = KragenPlugs.UI.CheckBox();
    self.checkboxf3:SetParent(line);
    self.checkboxf3:SetSize(180, 20);
    self.checkboxf3:SetPosition(0,0);
    self.checkboxf3:SetText("Checkboxf3");
    self.checkboxf3:SetVisible(false);

    self.checkboxf4 = KragenPlugs.UI.CheckBox();
    self.checkboxf4:SetParent(line);
    self.checkboxf4:SetSize(180,20);
    self.checkboxf4:SetPosition(220,0);
    self.checkboxf4:AlignLeft(true);
    self.checkboxf4:SetText("Checkboxf4");
    self.checkboxf4:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf5 = KragenPlugs.UI.CheckBox();
    self.checkboxf5:SetParent(line);
    self.checkboxf5:SetSize(180, 20);
    self.checkboxf5:SetPosition(0,0);
    self.checkboxf5:SetText("Checkboxf5");
    self.checkboxf5:SetVisible(false);

    self.checkboxf6 = KragenPlugs.UI.CheckBox();
    self.checkboxf6:SetParent(line);
    self.checkboxf6:SetSize(180,20);
    self.checkboxf6:SetPosition(220,0);
    self.checkboxf6:AlignLeft(true);
    self.checkboxf6:SetText("Checkboxf6");
    self.checkboxf6:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf7 = KragenPlugs.UI.CheckBox();
    self.checkboxf7:SetParent(line);
    self.checkboxf7:SetSize(180, 20);
    self.checkboxf7:SetPosition(0,0);
    self.checkboxf7:SetText("Checkboxf7");
    self.checkboxf7:SetVisible(false);

    self.checkboxf8 = KragenPlugs.UI.CheckBox();
    self.checkboxf8:SetParent(line);
    self.checkboxf8:SetSize(180,20);
    self.checkboxf8:SetPosition(220,0);
    self.checkboxf8:AlignLeft(true);
    self.checkboxf8:SetText("Checkboxf8");
    self.checkboxf8:SetVisible(false);

    line = holder(self, 35);
    self.titleFeatures = KragenPlugs.UI.PanelDivider();
    self.titleFeatures:SetPosition(0,0);
    self.titleFeatures:SetParent(line);
    self.titleFeatures:SetText("Features");
    self.titleFeatures:SetSize(400, 30);

    line = holder(self, 20);
    self.checkboxf10 = KragenPlugs.UI.CheckBox();
    self.checkboxf10:SetParent(line);
    self.checkboxf10:SetSize(180, 20);
    self.checkboxf10:SetPosition(0,0);
    self.checkboxf10:SetText("Checkboxf1");
    self.checkboxf10:SetVisible(false);

    self.checkboxf11 = KragenPlugs.UI.CheckBox();
    self.checkboxf11:SetParent(line);
    self.checkboxf11:SetSize(180,20);
    self.checkboxf11:SetPosition(220,0);
    self.checkboxf11:AlignLeft(true);
    self.checkboxf11:SetText("Checkboxf2");
    self.checkboxf11:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf12 = KragenPlugs.UI.CheckBox();
    self.checkboxf12:SetParent(line);
    self.checkboxf12:SetSize(180, 20);
    self.checkboxf12:SetPosition(0,0);
    self.checkboxf12:SetText("Checkboxf1");
    self.checkboxf12:SetVisible(false);

    self.checkboxf13 = KragenPlugs.UI.CheckBox();
    self.checkboxf13:SetParent(line);
    self.checkboxf13:SetSize(180,20);
    self.checkboxf13:SetPosition(220,0);
    self.checkboxf13:AlignLeft(true);
    self.checkboxf13:SetText("Checkboxf2");
    self.checkboxf13:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf14 = KragenPlugs.UI.CheckBox();
    self.checkboxf14:SetParent(line);
    self.checkboxf14:SetSize(180, 20);
    self.checkboxf14:SetPosition(0,0);
    self.checkboxf14:SetText("Checkboxf1");
    self.checkboxf14:SetVisible(false);

    self.checkboxf15 = KragenPlugs.UI.CheckBox();
    self.checkboxf15:SetParent(line);
    self.checkboxf15:SetSize(180,20);
    self.checkboxf15:SetPosition(220,0);
    self.checkboxf15:AlignLeft(true);
    self.checkboxf15:SetText("Checkboxf2");
    self.checkboxf15:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf16 = KragenPlugs.UI.CheckBox();
    self.checkboxf16:SetParent(line);
    self.checkboxf16:SetSize(180, 20);
    self.checkboxf16:SetPosition(0,0);
    self.checkboxf16:SetText("Checkboxf1");
    self.checkboxf16:SetVisible(false);

    self.checkboxf17 = KragenPlugs.UI.CheckBox();
    self.checkboxf17:SetParent(line);
    self.checkboxf17:SetSize(180,20);
    self.checkboxf17:SetPosition(220,0);
    self.checkboxf17:AlignLeft(true);
    self.checkboxf17:SetText("Checkboxf2");
    self.checkboxf17:SetVisible(false);

    line = holder(self, 20);
    self.checkboxf18 = KragenPlugs.UI.CheckBox();
    self.checkboxf18:SetParent(line);
    self.checkboxf18:SetSize(180, 20);
    self.checkboxf18:SetPosition(0,0);
    self.checkboxf18:SetText("Checkboxf1");
    self.checkboxf18:SetVisible(false);

    self.checkboxf19 = KragenPlugs.UI.CheckBox();
    self.checkboxf19:SetParent(line);
    self.checkboxf19:SetSize(180,20);
    self.checkboxf19:SetPosition(220,0);
    self.checkboxf19:AlignLeft(true);
    self.checkboxf19:SetText("Checkboxf2");
    self.checkboxf19:SetVisible(false);

    line = holder(self, 35);
    self.titleDefaults = KragenPlugs.UI.PanelDivider();
    self.titleDefaults:SetPosition(0,0);
    self.titleDefaults:SetParent(line);
    self.titleDefaults:SetText("Defaults");
    self.titleDefaults:SetSize(400, 30);

    line = holder(self, 30);
    self.combo1Label = KragenPlugs.UI.Label();
    self.combo1Label:SetParent(line);
    self.combo1Label:SetSize(190, 20);
    self.combo1Label:SetPosition(20, 0);
    self.combo1Label:SetText("Combo1");
    self.combo1Label:SetVisible(false);
    -- tt(240, 19, self.visibleTypeLabel, L["Select when the bar is visible."]);
    
    self.combo1box = KragenPlugs.UI.ComboBox();
    self.combo1box:SetParent(line);
    self.combo1box:SetSize(190, 20);
    self.combo1box:SetPosition(210, 0);
    self.combo1box:SetVisible(false);
        
    line = holder(self, 30);
    self.combo2Label = KragenPlugs.UI.Label();
    self.combo2Label:SetParent(line);
    self.combo2Label:SetSize(190, 20);
    self.combo2Label:SetPosition(20, 0);
    self.combo2Label:SetText("Combo1");
    self.combo2Label:SetVisible(false);
    -- tt(240, 19, self.visibleTypeLabel, L["Select when the bar is visible."]);
    
    self.combo2box = KragenPlugs.UI.ComboBox();
    self.combo2box:SetParent(line);
    self.combo2box:SetSize(190, 20);
    self.combo2box:SetPosition(210, 0);
    self.combo2box:SetVisible(false);
        
    line = holder(self, 30);
    self.combo3Label = KragenPlugs.UI.Label();
    self.combo3Label:SetParent(line);
    self.combo3Label:SetSize(190, 20);
    self.combo3Label:SetPosition(20, 0);
    self.combo3Label:SetText("Combo1");
    self.combo3Label:SetVisible(false);
    -- tt(240, 19, self.visibleTypeLabel, L["Select when the bar is visible."]);
    
    self.combo3box = KragenPlugs.UI.ComboBox();
    self.combo3box:SetParent(line);
    self.combo3box:SetSize(190, 20);
    self.combo3box:SetPosition(210, 0);
    self.combo3box:SetVisible(false);
        
    line = holder(self, 30);
    self.combo4Label = KragenPlugs.UI.Label();
    self.combo4Label:SetParent(line);
    self.combo4Label:SetSize(190, 20);
    self.combo4Label:SetPosition(20, 0);
    self.combo4Label:SetText("Combo1");
    self.combo4Label:SetVisible(false);
    -- tt(240, 19, self.visibleTypeLabel, L["Select when the bar is visible."]);
    
    self.combo4box = KragenPlugs.UI.ComboBox();
    self.combo4box:SetParent(line);
    self.combo4box:SetSize(190, 20);
    self.combo4box:SetPosition(210, 0);
    self.combo4box:SetVisible(false);
        
        
end


function SetupFeatures:EnableControls(enable)
    self.checkboxf1:SetEnabled(enable);
    self.checkboxf2:SetEnabled(enable);
    self.checkboxf3:SetEnabled(enable);
    self.checkboxf4:SetEnabled(enable);
    self.checkboxf5:SetEnabled(enable);
    self.checkboxf6:SetEnabled(enable);

end



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

end

Go to most recent revision | Compare with Previous | Blame


All times are GMT -5. The time now is 03:11 AM.


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