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.hex = "NIL";
self:SetVisible(true);
-- set up quickslot
self.quickslot = Turbine.UI.Lotro.Quickslot();
self.quickslot:SetParent(self);
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:SetOpacity(0);
-- 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)
local newx = ref.x;
local newy = ref.y;
local newparent = ref.parent;
self:SetVisible(false);
ref:SetPosition( (self.x - 1) * 35, (self.y - 1) * 35 );
ref:SetParent(self.parent);
ref.parent.quickslots[ref.x]:SetVisible( true );
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
Compare with Previous |
Blame
All times are GMT -5. The time now is 01:49 PM.