lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Unread 09-08-2012, 11:21 AM
Radicus's Avatar
Radicus Radicus is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: Aug 2012
Posts: 5
Help with assigning Alias to a Button (possible?)

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.
__________________
Radicus Hood - Protectors of Middle Earth, Riddermark

http://www.anotherworld.com.au/lotro...0Signature.jpg
Reply With Quote
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can i get a Button working? Haupthir Lua Programming Help (L) 2 11-14-2011 01:21 PM
pressed button and mouse over button problem Marzio XML modification help (L) 3 09-24-2011 07:03 PM
Alias editor Tyrolit Interface Requests (L) 2 06-20-2011 12:44 PM
Need help reskinning mount button..... Thayilis Interface Help (L) 3 10-24-2010 07:35 PM
Attack Button Kailvine LotRO Wish List (L) 2 09-05-2007 07:56 PM


All times are GMT -5. The time now is 07:59 AM.


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