Compare with Previous |
Blame |
View Log
import "Turbine.UI";
import "Turbine.UI.Lotro";
import "KragenPlugs.Utils";
import "KragenPlugs.Utils.Extensions";
import "KragenPlugs.KragenBars";
BlankSlot = class ( KragenPlugs.Utils.Extensions.SimpleWindow );
function BlankSlot:Constructor ( parent, x, y )
KragenPlugs.Utils.Extensions.SimpleWindow.Constructor( self );
-- declare variables
self.parent = parent;
self.x = x;
self.y = y;
self.blank = true;
-- set up quickslot
self.quickslot = Turbine.UI.Lotro.Quickslot();
self.quickslot:SetParent(self);
self.quickslot:SetSize(35, 35);
self.quickslot:SetShortcut( Turbine.UI.Lotro.Shortcut( Turbine.UI.Lotro.ShortcutType.Undefined, "" ) );
self.quickslot:SetVisible(true);
-- set properties
self:SetParent( parent );
self:SetPosition( (x - 1) * 35, (y - 1) * 35 );
self:SetVisible(true);
self:SetOpacity(0);
self:SetZOrder(-20);
-- swap positions when skill is dropped on the skill slot
self.quickslot.DragDrop = function (sender, args)
KragenBars:SwapSlots(self, args.DragDropInfo:GetShortcut():GetData());
end
end
-- swap positions with other skillslot (ref)
function BlankSlot:SwapPosition(ref)
ref:SetPosition( (self.x - 1) * 35, (self.y - 1) * 35 );
ref:SetParent(self.parent);
ref.x = self.x;
ref.y = self.y;
ref.parent = self.parent;
end
-- reset quickslot hex
function BlankSlot:ResetQuickslot()
self.quickslot:SetShortcut( Turbine.UI.Lotro.Shortcut( Turbine.UI.Lotro.ShortcutType.Undefined, "" ) );
end
function BlankSlot:Rotate()
newx = self.y;
newy = self.x;
self:SetPosition( (newx - 1) * 35, (newy - 1) * 35 );
self.x = newx;
self.y = newy;
end
function BlankSlot:Move(x, y)
self:SetPosition( (x - 1) * 35, (y - 1) * 35 );
self.x = x;
self.y = y;
end
Compare with Previous |
Blame
All times are GMT -5. The time now is 08:32 PM.