PK xDJ TitanBar/PK
vGJe TitanBar.plugin
TitanBar
Habna (Patch by Technical_13)
v1.30.04
HabnaPlugins/TitanBar/Resources/icon.tga
This plugin will show various kinds of information on a bar at the top or bottom of your screen. Each display of information is called "control". They can be moved anywhere on the bar. You can also change the back color, font and the icon size and height of TitanBar.
TitanBar support all three official language. ('FR', 'EN', 'DE')
TitanBar can auto hide, hide when entering combat or be always visible. (Default is always visible)(See more options to change this feature)
It also includes a profile feature.
TitanBar menu is accessed with a right click on TitanBar.
Control menu is accessed with a right click on any control.
Some controls are not visible by default, right click on TitanBar to get the menu where you can show other control.
Available control:
-Player infos and Location
-Equipment score and durability**
-Money (Keep track of the total money between all of your characters, tracking current money earned and spent per session per day)
-Backpack infos (Track all of your characters backpack)
-Local and game time (12h / 24h format are supported)
-Faction reputation points*
-Experience points*
-LOTRO Points*
-Destiny Points***
-Shards***
-Skirmish marks***
-Mithril Coins***
-Tokens of Hytbold***
-Medallions***
-Seals***
-Commendations***
-Infamy/renown points*
-Track Items
-In-game day/night time
-Vault (Track all of your characters Vault)
-Shared Storage and Bag of coins (Track all of your characters Shared Storage)
-Wallet
*: Information are not available in the API so it's currently based on advancement chat channel, so it will only work if this channel is active.
**: Not working because the GetEquipment() is not working properly. (Turbine API issue, but they are working on a fix)
***: On TitanBar or as a ToolTip in 'Wallet' control. More coming soon.
HabnaPlugins.TitanBar.Main
PK
vGJ6 TitanBar.plugincompendium
967
TitanBar
Habna (Patch by Technical_13)
v1.30.04
http://www.lotrointerface.com/downloads/info967
http://www.lotrointerface.com/downloads/download967
HabnaPlugins\TitanBar.plugin
HabnaPlugins\TitanBarReloader.plugin
HabnaPlugins\TitanBarUnloader.plugin
PK
wxDJn}L TitanBarReloader.plugin
TitanBar Reloader
by Habna
v1.0.0
HabnaPlugins/TitanBar/Resources/x.tga
This plugin is used internally by TitanBar and should NOT be loaded by user or plugin manager
HabnaPlugins.TitanBar.reloader
PK
wxDJck TitanBarUnloader.plugin
TitanBar Unloader
by Habna
v1.0.0
HabnaPlugins/TitanBar/Resources/x.tga
This plugin is used internally by TitanBar and should NOT be loaded by user or plugin manager
HabnaPlugins.TitanBar.unloader
PK
FJ7fdN dN TitanBar/background.lua-- background.lua
-- Written by Habna
function frmBackground()
sFrom = _G.sFromCtr;
curColor = {};
bClick = false;
-- **v Set some window stuff v**
wBackground = Turbine.UI.Lotro.Window();
wBackground.Opacity = 1;
wBackground:SetText( L["BWTitle"] );
wBackground:SetSize( 400, 210 );
wBackground:SetPosition( BGWLeft, BGWTop );
wBackground:SetVisible( true );
wBackground:SetWantsKeyEvents( true );
--wBackground:SetZOrder( 2 );
--wBackground:Activate();
-- **^
-- **v Check box - label v**
local SetToAllCtr = Turbine.UI.Lotro.CheckBox();
SetToAllCtr:SetParent( wBackground );
SetToAllCtr:SetPosition( 40, wBackground:GetHeight() - 70 );
SetToAllCtr:SetText( L["BWApply"] );
SetToAllCtr:SetSize( SetToAllCtr:GetTextLength() * 8, 30 );
SetToAllCtr:SetVisible( true );
--SetToAllCtr:SetEnabled( false );
SetToAllCtr:SetChecked( BGWToAll );
SetToAllCtr:SetForeColor( Color["rustedgold"] );
SetToAllCtr.CheckedChanged = function( sender, args )
BGWToAll = SetToAllCtr:IsChecked();
--if BGWToAll then ChangeColor(mColor); end
settings.Background.A = BGWToAll;
SaveSettings( false );
end
-- **^
-- **v Currently set color - label v**
local CurSetColorLbl = Turbine.UI.Label();
CurSetColorLbl:SetParent( wBackground );
CurSetColorLbl:SetPosition( 305, 35 );
CurSetColorLbl:SetSize( 80, 30 );
CurSetColorLbl:SetText( L["BWCurSetColor"] );
CurSetColorLbl:SetVisible( true );
CurSetColorLbl:SetForeColor( Color["rustedgold"] );
-- **^
-- **v Currently Selected color - box v**
curSelColorBorder = Turbine.UI.Label();
curSelColorBorder:SetParent( wBackground );
curSelColorBorder:SetSize( 73, 73 );
curSelColorBorder:SetPosition( 305, 60 );
curSelColorBorder:SetBackColor( Color["white"] );
curSelColor = Turbine.UI.Label();
curSelColor:SetParent( curSelColorBorder );
curSelColor:SetSize( 71, 71 );
curSelColor:SetPosition( 1, 1 );
-- Set backcolor window setting to currently control color
if sFrom == "TitanBar" then curSelAlpha = bcAlpha; curSelRed = bcRed; curSelGreen = bcGreen; curSelBlue = bcBlue; end
if sFrom == "WI" then curSelAlpha = WIbcAlpha; curSelRed = WIbcRed; curSelGreen = WIbcGreen; curSelBlue = WIbcBlue; end
if sFrom == "Money" then curSelAlpha = MIbcAlpha; curSelRed = MIbcRed; curSelGreen = MIbcGreen; curSelBlue = MIbcBlue; end
if sFrom == "DP" then curSelAlpha = DPbcAlpha; curSelRed = DPbcRed; curSelGreen = DPbcGreen; curSelBlue = DPbcBlue; end
if sFrom == "SP" then curSelAlpha = SPbcAlpha; curSelRed = SPbcRed; curSelGreen = SPbcGreen; curSelBlue = SPbcBlue; end
if sFrom == "SM" then curSelAlpha = SMbcAlpha; curSelRed = SMbcRed; curSelGreen = SMbcGreen; curSelBlue = SMbcBlue; end
if sFrom == "MC" then curSelAlpha = MCbcAlpha; curSelRed = MCbcRed; curSelGreen = MCbcGreen; curSelBlue = MCbcBlue; end
if sFrom == "HT" then curSelAlpha = HTbcAlpha; curSelRed = HTbcRed; curSelGreen = HTbcGreen; curSelBlue = HTbcBlue; end
if sFrom == "MP" then curSelAlpha = MPbcAlpha; curSelRed = MPbcRed; curSelGreen = MPbcGreen; curSelBlue = MPbcBlue; end
if sFrom == "SL" then curSelAlpha = SLbcAlpha; curSelRed = SLbcRed; curSelGreen = SLbcGreen; curSelBlue = SLbcBlue; end
if sFrom == "CP" then curSelAlpha = CPbcAlpha; curSelRed = CPbcRed; curSelGreen = CPbcGreen; curSelBlue = CPbcBlue; end
if sFrom == "BI" then curSelAlpha = BIbcAlpha; curSelRed = BIbcRed; curSelGreen = BIbcGreen; curSelBlue = BIbcBlue; end
if sFrom == "PI" then curSelAlpha = PIbcAlpha; curSelRed = PIbcRed; curSelGreen = PIbcGreen; curSelBlue = PIbcBlue; end
if sFrom == "EI" then curSelAlpha = EIbcAlpha; curSelRed = EIbcRed; curSelGreen = EIbcGreen; curSelBlue = EIbcBlue; end
if sFrom == "DI" then curSelAlpha = DIbcAlpha; curSelRed = DIbcRed; curSelGreen = DIbcGreen; curSelBlue = DIbcBlue; end
if sFrom == "TI" then curSelAlpha = TIbcAlpha; curSelRed = TIbcRed; curSelGreen = TIbcGreen; curSelBlue = TIbcBlue; end
if sFrom == "IF" then curSelAlpha = IFbcAlpha; curSelRed = IFbcRed; curSelGreen = IFbcGreen; curSelBlue = IFbcBlue; end
if sFrom == "VT" then curSelAlpha = VTbcAlpha; curSelRed = VTbcRed; curSelGreen = VTbcGreen; curSelBlue = VTbcBlue; end
if sFrom == "SS" then curSelAlpha = SSbcAlpha; curSelRed = SSbcRed; curSelGreen = SSbcGreen; curSelBlue = SSbcBlue; end
if sFrom == "BK" then curSelAlpha = BKbcAlpha; curSelRed = BKbcRed; curSelGreen = BKbcGreen; curSelBlue = BKbcBlue; end
if sFrom == "DN" then curSelAlpha = DNbcAlpha; curSelRed = DNbcRed; curSelGreen = DNbcGreen; curSelBlue = DNbcBlue; end
if sFrom == "RP" then curSelAlpha = RPbcAlpha; curSelRed = RPbcRed; curSelGreen = RPbcGreen; curSelBlue = RPbcBlue; end
if sFrom == "LP" then curSelAlpha = LPbcAlpha; curSelRed = LPbcRed; curSelGreen = LPbcGreen; curSelBlue = LPbcBlue; end
if sFrom == "PL" then curSelAlpha = PLbcAlpha; curSelRed = PLbcRed; curSelGreen = PLbcGreen; curSelBlue = PLbcBlue; end
if sFrom == "GT" then curSelAlpha = GTbcAlpha; curSelRed = GTbcRed; curSelGreen = GTbcGreen; curSelBlue = GTbcBlue; end
-- AU3 MARKER 1 - DO NOT REMOVE
if sFrom == "ASP" then curSelAlpha =ASPbcAlpha; curSelRed = ASPbcRed; curSelGreen = ASPbcGreen; curSelBlue = ASPbcBlue; end
if sFrom == "SOM" then curSelAlpha =SOMbcAlpha; curSelRed = SOMbcRed; curSelGreen = SOMbcGreen; curSelBlue = SOMbcBlue; end
if sFrom == "CGSP" then curSelAlpha =CGSPbcAlpha; curSelRed = CGSPbcRed; curSelGreen = CGSPbcGreen; curSelBlue = CGSPbcBlue; end
if sFrom == "GGB" then curSelAlpha =GGBbcAlpha; curSelRed = GGBbcRed; curSelGreen = GGBbcGreen; curSelBlue = GGBbcBlue; end
-- AU3 MARKER 1 END
curAlpha, curColor.R, curColor.G, curColor.B = curSelAlpha, curSelRed, curSelGreen, curSelBlue;
curSelColor:SetBackColor( Turbine.UI.Color( curSelAlpha, curSelRed, curSelGreen, curSelBlue ) );
-- **^
-- **v Save button v**
local buttonSave = Turbine.UI.Lotro.Button();
buttonSave:SetParent( wBackground );
buttonSave:SetText( L["BWSave"] );
buttonSave:SetSize( buttonSave:GetTextLength() * 10, 15 ); --Auto size with text lenght
buttonSave:SetPosition( wBackground:GetWidth() - buttonSave:GetWidth() - 15 , wBackground:GetHeight() - 34 );
buttonSave:SetVisible( true );
buttonSave.Click = function( sender, args )
BGWToAll = SetToAllCtr:IsChecked();
UpdateBCvariable();
ChangeColor(curSelColor:GetBackColor());
SaveSettings( true );
end
-- **^
-- Create alpha label and slider.
local alphalabel = Turbine.UI.Label();
alphalabel:SetParent( wBackground );
alphalabel:SetText( L["BWAlpha"] .. " @ " .. ( curSelAlpha * 100 ) .. "%" );
alphalabel:SetPosition( 40, 40 );
alphalabel:SetSize( 242, 10 );
alphalabel:SetBackColor( Color["black"] );
alphalabel:SetTextAlignment( Turbine.UI.ContentAlignment.TopCenter );
local alphaScrollBar = Turbine.UI.Lotro.ScrollBar();
alphaScrollBar:SetParent( alphalabel );
alphaScrollBar:SetPosition( 0, 0 );
alphaScrollBar:SetSize( 242, 10 );
alphaScrollBar:SetMinimum( 0 );
alphaScrollBar:SetMaximum( 100 );
alphaScrollBar:SetValue( curSelAlpha * 100);
alphaScrollBar.ValueChanged = function(sender, args)
curAlpha = alphaScrollBar:GetValue() / 100;
alphalabel:SetText( L["BWAlpha"] .. " @ " .. ( curAlpha * 100 ) .. "%" );
BGWToAll = SetToAllCtr:IsChecked();
if bClick then ChangeColor(Turbine.UI.Color( curAlpha, curSelRed, curSelGreen, curSelBlue ));
else ChangeColor(Turbine.UI.Color( curAlpha, curColor.R, curColor.G, curColor.B )); end
curSelColor:SetBackColor( Turbine.UI.Color( curAlpha, curSelRed, curSelGreen, curSelBlue ) )
end
-- **^
-- **v Default button v**
local buttonDefault = Turbine.UI.Lotro.Button();
buttonDefault:SetParent( wBackground );
buttonDefault:SetPosition( 23, wBackground:GetHeight() - 34 );
buttonDefault:SetText( L["BWDef"] );
buttonDefault:SetSize( buttonDefault:GetTextLength() * 10, 15 ); --Auto size with text lenght
buttonDefault:SetVisible( true );
buttonDefault.Click = function(sender, args)
BGWToAll = SetToAllCtr:IsChecked();
alphaScrollBar:SetValue( 30 );
curSelAlpha = ( 0.3 );
curSelRed = ( 0.3 );
curSelGreen = ( 0.3 );
curSelBlue = ( 0.3 );
curSelColor:SetBackColor( Turbine.UI.Color( curSelAlpha, curSelRed, curSelGreen, curSelBlue ) );
ChangeColor(curSelColor:GetBackColor());
bClick = true;
end
-- **^
-- **v Black button v**
local buttonBlack = Turbine.UI.Lotro.Button();
buttonBlack:SetParent( wBackground );
buttonBlack:SetPosition( buttonDefault:GetLeft() + buttonDefault:GetWidth() + 5, wBackground:GetHeight() - 34 );
buttonBlack:SetText( L["BWBlack"] );
buttonBlack:SetSize( buttonBlack:GetTextLength() * 10, 15 ); --Auto size with text lenght
buttonBlack:SetVisible( true );
buttonBlack.Click = function(sender, args)
BGWToAll = SetToAllCtr:IsChecked();
alphaScrollBar:SetValue ( 100 );
curSelAlpha = ( 1 );
curSelRed = ( 0 );
curSelGreen = ( 0 );
curSelBlue = ( 0 );
curSelColor:SetBackColor( Turbine.UI.Color( curSelAlpha, curSelRed, curSelGreen, curSelBlue ) );
ChangeColor(curSelColor:GetBackColor());
bClick = true;
end
-- **^
-- **v Transparent button v**
local buttonTrans = Turbine.UI.Lotro.Button();
buttonTrans:SetParent( wBackground );
buttonTrans:SetPosition( buttonBlack:GetLeft() + buttonBlack:GetWidth() + 5, wBackground:GetHeight() - 34 );
buttonTrans:SetText( L["BWTrans"] );
buttonTrans:SetSize( buttonTrans:GetTextLength() * 10, 15 ); --Auto size with text lenght
buttonTrans:SetVisible( true );
buttonTrans.Click = function(sender, args)
BGWToAll = SetToAllCtr:IsChecked();
alphaScrollBar:SetValue ( 0 );
curSelAlpha = ( 0 );
curSelRed = ( 0 );
curSelGreen = ( 0 );
curSelBlue = ( 0 );
curSelColor:SetBackColor( Turbine.UI.Color( curSelAlpha, curSelRed, curSelGreen, curSelBlue ) );
ChangeColor(curSelColor:GetBackColor());
bClick = true;
end
-- **^
-- Create Colour Picker window/border.
ColourPickerBorder = Turbine.UI.Label();
ColourPickerBorder:SetParent( wBackground );
ColourPickerBorder:SetPosition( 40, 60 );
ColourPickerBorder:SetSize( 242, 73 );
ColourPickerBorder:SetBackColor( Turbine.UI.Color( 1, .2, .2, .2 ) );
ColourPickerBorder:SetVisible( true );
-- Create Colour Picker.
ColourPicker = Turbine.UI.Label();
ColourPicker:SetParent( ColourPickerBorder );
ColourPicker:SetPosition( 1, 1 );
ColourPicker:SetSize( 240, 71 );
ColourPicker:SetBackground( resources.Picker ); -- 0x41007e13 / resources.Picker.Background
ColourPicker.GetColorFromCoord = function( sender, X, Y )
-- Controls the visibility of the cursor window
local blockXvalue = (round(ColourPicker:GetWidth()/3));
local blockYvalue = (round(ColourPicker:GetHeight()/2));
curColor = Turbine.UI.Color();
--curColor.A = 1.0;
local myX = X;
local myY = Y;
local curRed = 0;
local curGreen = 0;
local curBlue = 0;
if (myX >= 0) and (myX < blockXvalue) then
-- First color block = red to green
curRed = 100-((100/blockXvalue)*myX);
curGreen = (100/blockXvalue)*myX;
curBlue = 0;
elseif (myX >= blockXvalue) and (myX < (2*blockXvalue)) then
-- Second color block = green to blue
curRed = 0;
curGreen = 100-((100/blockXvalue)*(myX - blockXvalue));
curBlue = (100/blockXvalue)*(myX - blockXvalue);
elseif (myX >= (2*blockXvalue)) then
-- Third color block = blue to red
curRed = (100/blockXvalue)*(myX - 2*blockXvalue);
curGreen = 0;
curBlue = 100-((100/blockXvalue)*(myX - 2*blockXvalue));
end
if myY <= blockYvalue then
-- In the top block, so fade from black to full color
curRed = curRed * (myY/blockYvalue);
curGreen = curGreen * (myY/blockYvalue);
curBlue = curBlue * (myY/blockYvalue);
else
-- In the bottom block, so fade from full color to white
curRed = curRed + ((myY - blockYvalue) * ((100 - curRed)/(blockYvalue)));
curGreen = curGreen + ((myY - blockYvalue) * ((100 - curGreen)/(blockYvalue)));
curBlue = curBlue + ((myY - blockYvalue) * ((100 - curBlue)/(blockYvalue)));
end
curColor.A = curAlpha;
curColor.R = (1/100) * curRed;
curColor.G = (1/100) * curGreen;
curColor.B = (1/100) * curBlue;
return curColor;
end
ColourPicker.MouseMove = function( sender, args )
mColor = ColourPicker:GetColorFromCoord( args.X, args.Y );
BGWToAll = SetToAllCtr:IsChecked();
ChangeColor(mColor);
end
ColourPicker.MouseClick = function( sender, args )
curSelRed = curColor.R;
curSelGreen = curColor.G;
curSelBlue = curColor.B;
curSelColor:SetBackColor( mColor );
bClick = true;
end
wBackground.KeyDown = function( sender, args )
if ( args.Action == Turbine.UI.Lotro.Action.Escape ) then
wBackground:Close();
elseif ( args.Action == 268435635 ) or ( args.Action == 268435579 ) then -- Hide if F12 key is press or reposition UI
wBackground:SetVisible( not wBackground:IsVisible() );
end
end
wBackground.MouseUp = function( sender, args )
settings.Background.L = string.format("%.0f", wBackground:GetLeft());
settings.Background.T = string.format("%.0f", wBackground:GetTop());
BGWLeft, BGWTop = wBackground:GetPosition();
SaveSettings( false );
end
wBackground.Closing = function( sender, args )
wBackground:SetWantsKeyEvents( false );
TB["win"].MouseLeave();
BGWToAll = SetToAllCtr:IsChecked();
UpdateBCvariable();
ChangeColor(curSelColor:GetBackColor());
wBackground = nil;
option_backcolor:SetEnabled( true );
end
end
function UpdateBCvariable()
curSelAlpha = curAlpha;
if BGWToAll then
bcAlpha, WIbcAlpha, MIbcAlpha, DPbcAlpha, SPbcAlpha, SMbcAlpha, MCbcAlpha, HTbcAlpha, MPbcAlpha, SLbcAlpha, CPbcAlpha, BIbcAlpha, PIbcAlpha, EIbcAlpha, DIbcAlpha, TIbcAlpha, IFbcAlpha, VTbcAlpha, SSbcAlpha, BKbcAlpha, DNbcAlpha, RPbcAlpha, LPbcAlpha, PLbcAlpha, GTbcAlpha = curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha, curSelAlpha;
bcRed, WIbcRed, MIbcRed, DPbcRed, SPbcRed, SMbcRed, MCbcRed, HTbcRed, MPbcRed, SLbcRed, CPbcRed, BIbcRed, PIbcRed, EIbcRed, DIbcRed, TIbcRed, IFbcRed, VTbcRed, SSbcRed, BKbcRed, DNbcRed, RPbcRed, LPbcRed, PLbcRed, GTbcRed = curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed, curSelRed;
bcGreen, WIbcGreen, MIbcGreen, DPbcGreen, SPbcGreen, SMbcGreen, MCbcGreen, HTbcGreen, MPbcGreen, SLbcGreen, CPbcGreen, BIbcGreen, PIbcGreen, EIbcGreen, DIbcGreen, TIbcGreen, IFbcGreen, VTbcGreen, SSbcGreen, BKbcGreen, DNbcGreen, RPbcGreen, LPbcGreen, PLbcGreen, GTbcGreen = curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen, curSelGreen;
bcBlue, WIbcBlue, MIbcBlue, DPbcBlue, SPbcBlue, SMbcBlue, MCbcBlue, HTbcBlue, MPbcBlue, SLbcBlue, CPbcBlue, BIbcBlue, PIbcBlue, EIbcBlue, DIbcBlue, TIbcBlue, IFbcBlue, VTbcBlue, SSbcBlue, BKbcBlue, DNbcBlue, RPbcBlue, LPbcBlue, PLbcBlue, GTbcBlue = curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue, curSelBlue;
-- AU3 MARKER 2 - DO NOT REMOVE
ASPbcAlpha, ASPbcRed, ASPbcGreen, ASPbcBlue = curSelAlpha, curSelRed, curSelGreen, curSelBlue;
SOMbcAlpha, SOMbcRed, SOMbcGreen, SOMbcBlue = curSelAlpha, curSelRed, curSelGreen, curSelBlue;
CGSPbcAlpha, CGSPbcRed, CGSPbcGreen, CGSPbcBlue = curSelAlpha, curSelRed, curSelGreen, curSelBlue;
GGBbcAlpha, GGBbcRed, GGBbcGreen, GGBbcBlue = curSelAlpha, curSelRed, curSelGreen, curSelBlue;
-- AU3 MARKER 2 END
else
if sFrom == "TitanBar" then bcAlpha = curSelAlpha; bcRed = curSelRed; bcGreen = curSelGreen; bcBlue = curSelBlue; end
if sFrom == "WI" then WIbcAlpha = curSelAlpha; WIbcRed = curSelRed; WIbcGreen = curSelGreen; WIbcBlue = curSelBlue; end
if sFrom == "Money" then MIbcAlpha = curSelAlpha; MIbcRed = curSelRed; MIbcGreen = curSelGreen; MIbcBlue = curSelBlue; end
if sFrom == "DP" then DPbcAlpha = curSelAlpha; DPbcRed = curSelRed; DPbcGreen = curSelGreen; DPbcBlue = curSelBlue; end
if sFrom == "SP" then SPbcAlpha = curSelAlpha; SPbcRed = curSelRed; SPbcGreen = curSelGreen; SPbcBlue = curSelBlue; end
if sFrom == "SM" then SMbcAlpha = curSelAlpha; SMbcRed = curSelRed; SMbcGreen = curSelGreen; SMbcBlue = curSelBlue; end
if sFrom == "MC" then MCbcAlpha = curSelAlpha; MCbcRed = curSelRed; MCbcGreen = curSelGreen; MCbcBlue = curSelBlue; end
if sFrom == "HT" then HTbcAlpha = curSelAlpha; HTbcRed = curSelRed; HTbcGreen = curSelGreen; HTbcBlue = curSelBlue; end
if sFrom == "MP" then MPbcAlpha = curSelAlpha; MPbcRed = curSelRed; MPbcGreen = curSelGreen; MPbcBlue = curSelBlue; end
if sFrom == "SL" then SLbcAlpha = curSelAlpha; SLbcRed = curSelRed; SLbcGreen = curSelGreen; SLbcBlue = curSelBlue; end
if sFrom == "CP" then CPbcAlpha = curSelAlpha; CPbcRed = curSelRed; CPbcGreen = curSelGreen; CPbcBlue = curSelBlue; end
if sFrom == "BI" then BIbcAlpha = curSelAlpha; BIbcRed = curSelRed; BIbcGreen = curSelGreen; BIbcBlue = curSelBlue; end
if sFrom == "PI" then PIbcAlpha = curSelAlpha; PIbcRed = curSelRed; PIbcGreen = curSelGreen; PIbcBlue = curSelBlue; end
if sFrom == "EI" then EIbcAlpha = curSelAlpha; EIbcRed = curSelRed; EIbcGreen = curSelGreen; EIbcBlue = curSelBlue; end
if sFrom == "DI" then DIbcAlpha = curSelAlpha; DIbcRed = curSelRed; DIbcGreen = curSelGreen; DIbcBlue = curSelBlue; end
if sFrom == "TI" then TIbcAlpha = curSelAlpha; TIbcRed = curSelRed; TIbcGreen = curSelGreen; TIbcBlue = curSelBlue; end
if sFrom == "IF" then IFbcAlpha = curSelAlpha; IFbcRed = curSelRed; IFbcGreen = curSelGreen; IFbcBlue = curSelBlue; end
if sFrom == "VT" then VTbcAlpha = curSelAlpha; VTbcRed = curSelRed; VTbcGreen = curSelGreen; VTbcBlue = curSelBlue; end
if sFrom == "SS" then SSbcAlpha = curSelAlpha; SSbcRed = curSelRed; SSbcGreen = curSelGreen; SSbcBlue = curSelBlue; end
if sFrom == "BK" then BKbcAlpha = curSelAlpha; BKbcRed = curSelRed; BKbcGreen = curSelGreen; BKbcBlue = curSelBlue; end
if sFrom == "DN" then DNbcAlpha = curSelAlpha; DNbcRed = curSelRed; DNbcGreen = curSelGreen; DNbcBlue = curSelBlue; end
if sFrom == "RP" then RPbcAlpha = curSelAlpha; RPbcRed = curSelRed; RPbcGreen = curSelGreen; RPbcBlue = curSelBlue; end
if sFrom == "LP" then LPbcAlpha = curSelAlpha; LPbcRed = curSelRed; LPbcGreen = curSelGreen; LPbcBlue = curSelBlue; end
if sFrom == "PL" then PLbcAlpha = curSelAlpha; PLbcRed = curSelRed; PLbcGreen = curSelGreen; PLbcBlue = curSelBlue; end
if sFrom == "GT" then GTbcAlpha = curSelAlpha; GTbcRed = curSelRed; GTbcGreen = curSelGreen; GTbcBlue = curSelBlue; end
-- AU3 MARKER 3 - DO NOT REMOVE
if sFrom == "ASP" then ASPbcAlpha = curSelAlpha; ASPbcRed = curSelRed; ASPbcGreen = curSelGreen; ASPbcBlue = curSelBlue; end
if sFrom == "SOM" then SOMbcAlpha = curSelAlpha; SOMbcRed = curSelRed; SOMbcGreen = curSelGreen; SOMbcBlue = curSelBlue; end
if sFrom == "CGSP" then CGSPbcAlpha = curSelAlpha; CGSPbcRed = curSelRed; CGSPbcGreen = curSelGreen; CGSPbcBlue = curSelBlue; end
if sFrom == "GGB" then GGBbcAlpha = curSelAlpha; GGBbcRed = curSelRed; GGBbcGreen = curSelGreen; GGBbcBlue = curSelBlue; end
-- AU3 MARKER 3 END
end
endPK
oGJZ4 4 TitanBar/changelog.txtThis is a replacement for TitanBar v1.29.00 by Thorondor which replaced v1.24 by Habana.
You do not need the original files.
Todo:
- (requested by Modnar) Real time and/or In-game time alarm
- (requested by Modnar) User-defined control sizes
Known Issues:
- The percentages on the PlayerInfo control don't include equipment.
- Some missing translations. (Mostly French)
- Controls Thorondor added may not unload from submenu.
- Reputations for Dol Amroth don't max out at first rank.
- Some low res icons; searching for replacements.
====================================================================================================
v1.30.04 (Febuary 7, 2017)
Bug fix:
- Fixed https://github.com/Technical-13/HabnaPlugins/issues/4 :: "Set back color" bug
====================================================================================================
v1.30.02 (Febuary 5, 2017)
New:
- PlayerInfosToolTip now properly goes to level 105 (tappino)
- U18 reputation factions added. (tappino)
- "Chicken Chasing League of Eriador" reputation faction added. (technical_13)
Changed:
- "Turbine Point" to "LOTRO Point" update (technical_13)
- "Turbine" to "SSG" update where appropriate (technical_13)
Need translations!
If you notice an error, please send me a pm or post it on the boards.PK xDJ TitanBar/Class/PK
{DJb TitanBar/Class/Class.lua-- Class.lua
-- Written by Rod of Turbine, originally part of the LOTRO Lua Examples.
-- Compatible with Lua 5.1 (not 5.0).
_G.class = function( base )
if ( base ~= nil ) then
local baseType = type( base );
if ( baseType ~= 'table' ) then
error( "Base class is not a table. Base class was a " .. baseType );
end
end
-- The class definition table. Contains all of the actual class
-- methods, constructor, and an IsA function automatically
-- provided.
local c = { };
c.base = base;
c.IsA = function( self, klass )
local m = getmetatable( self );
while m do
if m == klass then
return true;
end
m = m.base;
end
return false;
end
-- The class definition metatable. This is used to hook up
-- base classes and then to register a call handler that is
-- used to construct new instances of the class.
local mt = { };
mt.__index = base;
mt.__call = function( class_tbl, ... )
if ( class_tbl.Abstract ) then
error "Abstract class cannot be constructed.";
end
-- Create the new class instance.
local instance = { };
setmetatable( instance, { __index = c } );
-- Invoke the constructor if it exists.
if ( ( instance.Constructor ~= nil ) and ( type( instance.Constructor ) == 'function' ) ) then
instance:Constructor( ... );
end
return instance;
end
setmetatable( c, mt );
return c;
end
PK
zDJz" " TitanBar/Class/ComboBox.lua-- ComboBox.lua
-- writen by Kragen, tweak by Habna for TitanBar
import "Turbine.UI";
ComboBox = class(Turbine.UI.Control);
-- colors
ComboBox.HighlightColor = Color["gold"];
ComboBox.SelectionColor = Color["rustedgold"];
ComboBox.ItemColor = Color["nicegold"];
ComboBox.DisabledColor = Color["lightgrey1"];
ComboBox.BlackColor = Color["black"];
ComboBox.BackHighlightColor = Color["lightgrey"];
-- create a var to store the open dropdown in
ComboBox.open = nil;
-- close any open dropdowns
ComboBox.Cleanup = function()
if (ComboBox.open ~= nil) then
ComboBox.open:CloseDropDown();
ComboBox.open = nil;
end
end
function ComboBox:Constructor()
Turbine.UI.Control.Constructor(self);
self:SetBackColor(ComboBox.DisabledColor);
--self:SetZOrder(5);
-- state
self.dropped = false;
self.selection = -1;
-- text label
self.label = Turbine.UI.Label();
self.label:SetParent(self);
self.label:SetFont(Turbine.UI.Lotro.Font.TrajanPro14);
self.label:SetForeColor(ComboBox.ItemColor);
self.label:SetBackColor(ComboBox.BlackColor);
self.label:SetOutlineColor(ComboBox.HighlightColor);
self.label:SetTextAlignment(Turbine.UI.ContentAlignment.MiddleCenter);
self.label:SetMouseVisible(false);
-- arrow
self.arrow = Turbine.UI.Control();
self.arrow:SetParent(self);
self.arrow:SetSize(16, 16);
self.arrow:SetZOrder(20);
self.arrow:SetBlendMode(4);
self.arrow:SetBackground(0x41007e1a);
self.arrow:SetMouseVisible(false);
-- drop down window
self.dropDownWindow = Turbine.UI.Window();
--self.dropDownWindow:SetParent(self);
self.dropDownWindow:SetBackColor(ComboBox.DisabledColor);
self.dropDownWindow:SetZOrder(20);
--self.dropDownWindow:SetMouseVisible(false);
self.dropDownWindow:SetVisible(false);
-- list scroll bar
self.scrollBar = Turbine.UI.Lotro.ScrollBar();
self.scrollBar:SetOrientation(Turbine.UI.Orientation.Vertical);
self.scrollBar:SetParent(self.dropDownWindow);
self.scrollBar:SetBackColor(ComboBox.BlackColor);
-- list to contain the drop down items
self.listBox = Turbine.UI.ListBox();
self.listBox:SetParent(self.dropDownWindow);
self.listBox:SetOrientation(Turbine.UI.Orientation.Horizontal);
self.listBox:SetVerticalScrollBar(self.scrollBar);
self.listBox:SetMaxItemsPerLine(1);
self.listBox:SetMouseVisible(false);
self.listBox:SetPosition(2, 2);
self.listBox:SetBackColor(ComboBox.BlackColor);
end
function ComboBox:MouseEnter(args)
if (not self:IsEnabled()) then return; end
self.label:SetFontStyle(Turbine.UI.FontStyle.Outline);
self.label:SetForeColor(ComboBox.ItemColor);
self.label:SetText(self.label:GetText());
self.arrow:SetBackground(( self.dropped and 0x41007e19 or 0x41007e1b ));
end
function ComboBox:MouseLeave(args)
if (not self:IsEnabled()) then return; end
self.label:SetFontStyle(Turbine.UI.FontStyle.None);
if (self.dropped) then
self.label:SetForeColor(ComboBox.SelectionColor);
end
self.label:SetText(self.label:GetText());
self.arrow:SetBackground(( self.dropped and 0x41007e18 or 0x41007e1a ));
end
function ComboBox:MouseClick(args)
if (not self:IsEnabled()) then return; end
if (args.Button == Turbine.UI.MouseButton.Left) then
if (self.dropped) then self:CloseDropDown();
else self:ShowDropDown(); end
end
end
function ComboBox:FireEvent()
if (type(self.ItemChanged) == "function") then
self:ItemChanged({selection=self:GetSelection()}); --Pass value to args.selection
end
end
function ComboBox:ItemSelected(index)
if (self.selection ~= -1) then
local old = self.listBox:GetItem(self.selection);
old:SetForeColor(ComboBox.ItemColor);
end
local item = self.listBox:GetItem(index);
self.selection = index;
item:SetForeColor(ComboBox.SelectionColor);
self.label:SetText(item:GetText());
self:CloseDropDown();
end
function ComboBox:AddItem(text, value)
local width, height = self.listBox:GetSize();
local listItem = Turbine.UI.Label();
listItem:SetSize(width, 20);
listItem:SetTextAlignment(Turbine.UI.ContentAlignment.MiddleCenter);
listItem:SetForeColor(ComboBox.ItemColor);
listItem:SetBackColorBlendMode(5);
listItem:SetFont(Turbine.UI.Lotro.Font.TrajanPro14);
listItem:SetOutlineColor(ComboBox.HighlightColor);
listItem:SetText(text);
listItem.MouseEnter = function(sender, args)
sender:SetFontStyle(Turbine.UI.FontStyle.Outline);
sender:SetForeColor(ComboBox.ItemColor);
sender:SetBackColor(ComboBox.BackHighlightColor); -- enable if want to highlight the background
sender:SetText(sender:GetText());
end
listItem.MouseLeave = function(sender, args)
sender:SetFontStyle(Turbine.UI.FontStyle.None);
if (self.listBox:IndexOfItem(sender) == self.selection) then
sender:SetForeColor(ComboBox.SelectionColor);
end
sender:SetBackColor(ComboBox.BlackColor); -- enable if want to highlight the background
sender:SetText(sender:GetText());
end
listItem.MouseClick = function(sender, args)
if (args.Button == Turbine.UI.MouseButton.Left) then
self:ItemSelected(self.listBox:GetSelectedIndex());
self:FireEvent();
end
end
listItem.value = value;
self.listBox:AddItem(listItem);
end
function ComboBox:SetSelection(value)
for i = 1, self.listBox:GetItemCount() do
local item = self.listBox:GetItem(i);
if (item.value == value) then
self:ItemSelected(i);
--self:FireEvent();
break;
end
end
end
function ComboBox:GetSelection()
if (self.selection == -1) then
return nil;
else
local item = self.listBox:GetItem(self.selection);
return item.value;
end
end
function ComboBox:SetSize(width, height)
Turbine.UI.Control.SetSize(self, width, height);
self:Layout();
end
function ComboBox:SetEnabled(enabled)
Turbine.UI.Control.SetEnabled(self, enabled);
if (enabled) then
self.label:SetForeColor(ComboBox.ItemColor);
self.arrow:SetBackground(0x41007e1a);
else
self:CloseDropDown();
self.label:SetForeColor(ComboBox.DisabledColor);
--self.arrow:SetBackground();--same as 0x41007e1a but disable (greyed)
end
end
function ComboBox:Layout()
local width, height = self:GetSize();
self.label:SetSize(width - 4, height - 4);
self.label:SetPosition(2, 2);
self.arrow:SetPosition(width - 2 - 16, 2 + ((height - 4 - 16) / 2));
end
function ComboBox:ShowDropDown()
-- close the existing drop down if one is open
ComboBox.Cleanup();
local itemCount = self.listBox:GetItemCount();
if ((itemCount > 0) and not (self.dropped)) then
self.dropped = true;
self.label:SetForeColor(ComboBox.SelectionColor);
self.arrow:SetBackground(0x41007e19);
local width, height = self:GetSize();
--width = width + 10;
-- max size
local maxItems = itemCount;
local scrollSize = 0;
if (maxItems > 5) then
maxItems = 5;
scrollSize = 12;
end
-- list item sizes
local listHeight = 0;
for i = 1, self.listBox:GetItemCount() do
local item = self.listBox:GetItem(i);
item:SetWidth(width - 4 - scrollSize);
if (i <= maxItems) then
listHeight = listHeight + item:GetHeight();
end
end
-- window size
self.listBox:SetSize(width - 4 - scrollSize, listHeight);
self.dropDownWindow:SetSize(width, listHeight + 4);
-- scrollbar
self.scrollBar:SetSize(scrollSize, listHeight);
self.scrollBar:SetPosition(width - 14, 2);
-- position
--local x, y = self:GetParent():PointToScreen(self:GetPosition());
--self.dropDownWindow:SetPosition(x, y + height + 2);
--self.dropDownWindow:SetPosition(self.label:GetLeft()-2, self.label:GetTop()-2 + height + 2);
self.dropDownWindow:SetVisible(true);
-- store the open drop down
ComboBox.open = self;
end
end
function ComboBox:CloseDropDown()
if (self.dropped) then
self.dropped = false;
self.dropDownWindow:SetVisible(false);
self.label:SetForeColor(ComboBox.ItemColor);
self.arrow:SetBackground(0x41007e1b);
end
end
PK
zDJU ; ; TitanBar/color.lua-- color.lua
-- Written By Habna
_G.Color = {}; -- Color table in _G
-- Color( Alpha, Red, Green, Blue ) or Color( Red, Green, Blue )
Color["silver"] = Turbine.UI.Color.Silver;
Color["blue"] = Turbine.UI.Color.Blue;
Color["trueblue"] = Turbine.UI.Color( 0.2, 0.5, 0.9 );
--Color["trueblue"] = Turbine.UI.Color.;
Color["stblue"] = Turbine.UI.Color( 1, 0, 0, 0.5 );
Color["niceblue"] = Turbine.UI.Color( 0, 0.66, 0.75)
Color["green"] = Turbine.UI.Color.Lime;
Color["nicegreen"] = Turbine.UI.Color( 0.33, 0.66, 0.33 );
Color["red"] = Turbine.UI.Color.Red;
Color["grey"] = Turbine.UI.Color( 0.5, 0.5, 0.5 );
Color["lightgrey"] = Turbine.UI.Color( 0.5, 0.5, 0.5, 0.5 );
Color["lightgrey1"] = Turbine.UI.Color( 0.4, 0.4, 0.4);
Color["verylightgrey"] = Turbine.UI.Color( 0.05, 0.5, 0.5, 0.5 );
Color["darkgrey"] = Turbine.UI.Color( 0.1, 0.1, 0.1 );
Color["gold"] = Turbine.UI.Color.Gold;
Color["rustedgold"] = Turbine.UI.Color( 0.7, 0.6, 0.2 );
Color["nicegold"] = Turbine.UI.Color(1, 0.9, 0.5);
Color["transparent"] = Turbine.UI.Color( 0.3, 0.3, 0.3, 0.3 ); --Not fully transparent
Color["ftransparent"] = Turbine.UI.Color ( 0, 0, 0, 0 ); -- Fully
Color["black"] = Turbine.UI.Color.Black;
Color["5black"] = Turbine.UI.Color( 0.5, 0, 0, 0 );
Color["3black"] = Turbine.UI.Color( 0.3, 0, 0, 0 );
Color["white"] = Turbine.UI.Color.White;
Color["orange"] = Turbine.UI.Color( 1, 0.7, 0 ); -- first age = orange
Color["cyan"] = Turbine.UI.Color( 0, 1, 1 ); -- second age = cyan
Color["purple"] = Turbine.UI.Color( 1, 0, 1 ); -- third age = purple
Color["yellow"] = Turbine.UI.Color( 1, 1, 0 );
Color["brown"] = Turbine.UI.Color( 0.5, 0.4, 0.2);
Color["menuborder"] = Turbine.UI.Color( 0.5, 0, 0.138, 0.863 );
Color["SSGWhite"] = Turbine.UI.Color(1, 0.9, 0.9, 0.9);
Color["SSGYellow"] = Turbine.UI.Color( 1, 231/255, 231/255, 69/231);
Color["TurineOrange"] = Turbine.UI.Color( 1, 190/255, 148/255, 0 );
Color["SSGLightYellow"] = Turbine.UI.Color( 1, 232/255, 229/255, 174/255 );
Color["SSGGrey"] = Turbine.UI.Color( 1, 0.5, 0.5, 0.5 );
Color["none"] = Turbine.UI.Color();PK 0EJ TitanBar/Control/PK
zDJg &