lotrointerface.com
Search Downloads

LoTROInterface SVN SequenceBars

[/] [trunk/] [Thurallor/] [SequenceBars/] [Main.lua] - Blame information for rev 209

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 Thurallor-7095
import "Thurallor.SequenceBars";
2 127 Thurallor-7095
--Puts("--------------------------------------");
3 12 Thurallor-7095
 
4 7 Thurallor-7095
math.randomseed(Turbine.Engine.GetGameTime());
5 2 Thurallor-7095
 
6 Thurallor-7095
theManager = Manager();
7 121 Thurallor-7095
AddCallback(Turbine.Plugin, "Unload", function()
8 2 Thurallor-7095
    theManager:Unload();
9 34 Thurallor-7095
    Puts(L:GetText("/GoodbyeMessage"));
10 20 Thurallor-7095
end);
11 2 Thurallor-7095
 
12 Thurallor-7095
local hello = L:GetText("/HelloMessage");
13 Thurallor-7095
hello = string.gsub(hello, "<version>", plugin:GetVersion());
14 Thurallor-7095
Turbine.Shell.WriteLine(hello);
15 141 Thurallor-7095
_G.PutsPrefix = L:GetText("/PutsPrefix");
16 2 Thurallor-7095
 
17 165 Thurallor-7095
if (L:GetLanguage() ~= Turbine.Language.English) then
18 140 Thurallor-7095
    Puts(L:GetText("/TranslationHelpWanted"));
19 Thurallor-7095
end
20 Thurallor-7095
 
21 7 Thurallor-7095
sbCmd = Turbine.ShellCommand();
22 Thurallor-7095
function sbCmd:Execute(cmd, args)
23 122 Thurallor-7095
    if ((args == "help") or (not theManager:ShellCommand(cmd, args))) then
24 7 Thurallor-7095
        Turbine.Shell.WriteLine(sbCmd.GetHelp());
25 Thurallor-7095
    end
26 Thurallor-7095
end
27 Thurallor-7095
sbCmd.GetHelp = function()
28 Thurallor-7095
    return L:GetText("/ShellCommand/LongHelp");
29 Thurallor-7095
end
30 Thurallor-7095
sbCmd.GetShortHelp = function()
31 Thurallor-7095
    return L:GetText("/ShellCommand/ShortHelp");
32 Thurallor-7095
end
33 Thurallor-7095
Turbine.Shell.AddCommand(L:GetText("/ShellCommand/Command"), sbCmd);
34 17 Thurallor-7095
 
35 22 Thurallor-7095
--[[
36 121 Thurallor-7095
    Turbine.Plugin.Load = function()
37 22 Thurallor-7095
        import "Equendil.Utils";
38 Thurallor-7095
        import "Equendil.LuaExplorer.Browser";
39 Thurallor-7095
        function BrowseTable(name, t)
40 Thurallor-7095
            local b = Equendil.LuaExplorer.Browser("Browsing: " .. name);
41 Thurallor-7095
            b:Add(name, t, true, false);
42 Thurallor-7095
            b:SetVisible( true );
43 Thurallor-7095
            b:SetPosition(0, 0);
44 Thurallor-7095
            b:Activate();
45 Thurallor-7095
        end
46 Thurallor-7095
        BrowseTable("_G", _G);
47 Thurallor-7095
    end
48 Thurallor-7095
]]
49 17 Thurallor-7095
 
50 Thurallor-7095
--[[
51 22 Thurallor-7095
    -- Display a nice matte for screencaps of windows
52 Thurallor-7095
    win = Turbine.UI.Lotro.Window();
53 Thurallor-7095
    win:SetVisible(true);
54 Thurallor-7095
    win:SetResizable(true);
55 26 Thurallor-7095
    win:SetZOrder(-1);
56 22 Thurallor-7095
    win.border = Turbine.UI.Control();
57 Thurallor-7095
    win.border:SetParent(win);
58 Thurallor-7095
    win.border:SetBackColor(Turbine.UI.Color(74/255, 79/255, 87/255))
59 Thurallor-7095
    win.border:SetMouseVisible(false);
60 Thurallor-7095
    win.bg = Turbine.UI.Control();
61 Thurallor-7095
    win.bg:SetParent(win.border);
62 Thurallor-7095
    win.bg:SetBackColor(Turbine.UI.Color.Black);
63 Thurallor-7095
    win.bg:SetPosition(50, 50);
64 Thurallor-7095
    win.bg:SetMouseVisible(false);
65 Thurallor-7095
    function win:SizeChanged()
66 Thurallor-7095
        local w, h = self:GetSize();
67 Thurallor-7095
        win.border:SetSize(w, h);
68 Thurallor-7095
        win.bg:SetSize(w - 100, h - 100);
69 Thurallor-7095
    end
70 Thurallor-7095
    win:SetSize(300, 300);
71 Thurallor-7095
    CenterWindow(win);
72 Thurallor-7095
]]
73 Thurallor-7095
 

All times are GMT -5. The time now is 04:18 AM.


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