Just wondering it's possible to add an alias to a button rather than a quickslot, or somehow tie the two together?
I'm trying to code a button to send an emote when pressed. I've had a look at the coding for ChatEdit by Galuhad, but can't decipher is coding easily. I've noticed when you create some text it updates the button so that when you hover the mouse over the button, it displays what the alias is and sends it to the chat channel when clicked.
Can someone offer an alternative piece of code to achieve this? Here's my effort so far.
eg.
Code:
-- Create Emote Button
myWindow.EmoteButton=Turbine.UI.Lotro.Button();
myWindow.EmoteButton:SetParent(myWindow);
myWindow.EmoteButton:SetSize(190,30);
myWindow.EmoteButton:SetPosition(myWindow:GetWidth()/4+30,265)
myWindow.EmoteButton:SetText("Send Emote");
-- The next line doesn't work, but I was hoping it would:
-- myWindow.EmoteButton:SetShortcut(Turbine.UI.Lotro.Shortcut(Turbine.UI.Lotro.ShortcutType.Alias, "/flirt"));
-- When Clicked
-- This creates a quickslot button that works, but would like to bind the alias to the button above instead.
myWindow.EmoteButton.MouseClick=function()
qsButton = Turbine.UI.Lotro.Quickslot();
qsButton:SetParent(myWindow);
qsButton:SetShortcut(Turbine.UI.Lotro.Shortcut(Turbine.UI.Lotro.ShortcutType.Alias, "/flirt"));
qsButton:SetVisible(true);
end
Any help appreciated.