lotrointerface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 06-29-2011, 04:21 PM
Marll's Avatar
Marll Marll is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Jan 2010
Posts: 51
Plugin toggle buttons

So while I'm usually comfortable using chat box command line switches, my wife is less inclined to remember the commands to bring up options for a plugin. I like the fact that a button can be displayed so that you can toggle the window, but wondering if they can be made to be different sizes?

What would be cool to see is the option to allow for a smaller one, something small and round like the other icons that appear on the radar currently, that could be dragged and placed so that they look like part of the radar ring. Is this possible? If so, would it be easy to change the lua to accomodate this (as in myself) or is this something that authors might be able to build in, if they feel so inclined?
Reply With Quote
  #2  
Unread 06-29-2011, 04:53 PM
D.H1cks's Avatar
D.H1cks D.H1cks is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 162
Lua authors can set the size of buttons.

It would be up to the author to provide methods for the user to change the size of these buttons.
Reply With Quote
  #3  
Unread 06-29-2011, 05:55 PM
Marll's Avatar
Marll Marll is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Jan 2010
Posts: 51
What about in the Lua, does this information have to live in a certain place across all plugins? Is there a specific thing that I could look for to see if I can modify it?
Reply With Quote
  #4  
Unread 06-29-2011, 06:01 PM
Fortunis's Avatar
Fortunis Fortunis is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
Probably look for-

objectName = Turbine.UI.Lotro.Button

objectName being the name the author has given the button, but the author may have used many buttons so you may have a hard time.

besides that, if there is an image for the button in the plugin files, look for its name in the code and see what button is associated with it.
Then check objectName:SetSize and objectName:SetPosition
__________________
Author of Mouse Cursor Highlighter Advanced
Reply With Quote
  #5  
Unread 06-30-2011, 01:32 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Quote:
Originally Posted by Marll
What about in the Lua, does this information have to live in a certain place across all plugins? Is there a specific thing that I could look for to see if I can modify it?
The problem being - this could be different for every plugin in existence! Whilst you could do the search suggested above, buttons can be used for a variety of things as well.

Best to contact the plugin author and make a feature request.
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #6  
Unread 06-30-2011, 05:35 AM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
The easiest way to do it would be to simply add a alias to the command, and put it on your quickslots. As far as actually coding it yourself - this is what you'd need to do.

1) Find the name of the function that is called when you type in the slash command
2) Create a Turbine.UI.Lotro.Button, and place it at the coords you want it at
3) call the above mentioned function on that button's onclick handler


Being able to move it around is an entirely different ballgame that would entail

detecting whether alt, shift or ctrl is being pressed - depending on what modifier you want to "unlock" the button's position

setting whether your modifier is being pressed as a variable

having your button's "MouseDown" event handler check that variable, and then setting another variable as a flag to allow movement

if that flag is set to true (modifier pressed, and mouse button is down over the button, then change the button's position, relative to the mouse - on that button's MouseMove handler.

Obviously MouseUp and KeyUp handlers would be used to set the above mentioned flags to false.

Then of course, you have to keep in mind that if the author's plugin hides itself when you press f12, that you would have to put that button as a child of whatever window is hidden on that event. Otherwise, you'll still see that button after hiding the UI

Also, for best results, you'd probably want to use a Turbine.UI.Button instead, providing your own images for the three states (up, down and over) - as that way you'd be able to do a circular button, instead of the standard LotRO button.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote
  #7  
Unread 06-30-2011, 09:29 AM
Elentir's Avatar
Elentir Elentir is offline
The Unscathed
 
Join Date: Mar 2010
Posts: 18
Is it possible to create buttons that we can put into our quickslots like skills? I guess not for the moment cause otherwise you guys would have already implemented it by now.
Reply With Quote
  #8  
Unread 06-30-2011, 10:09 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Should be able to do this using alias'
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #9  
Unread 06-30-2011, 10:23 AM
Marll's Avatar
Marll Marll is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Jan 2010
Posts: 51
The alias isn't a bad idea, though I wish that Turbine allowed us to assign icons to them, but whatever I suppose.


Still think that it would be nice to have smaller ones that can be placed, or moved around (many of them do this already, just drag and drop) to be placed out of the way on the radar ring, just seems like a perfect place for them so they don't take up screen real estate, and like addons were in WoW when I used to play, the icons look like they belong on the radar ring.
Reply With Quote
  #10  
Unread 06-30-2011, 01:58 PM
Digital_Utopia's Avatar
Digital_Utopia Digital_Utopia is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Posts: 207
I've noticed that WoW addon authors have started using a slide out type of icon menu for their addons - presumably due to an alternative to mini-map icons, as you can only fit so many on there.

But anyway, that might be something worth looking into. It would require cooperation from individual authors, but it would certainly make things easier.

I'm not sure if global variables are confined to apartments, but that might be one way of doing it, without having to do any manual editing or whatnot.
__________________

Lord of the Rings Online
75 Fourohfour | 75 Artemedis | 60 Whiskeytango Foxtrot | 50 Mistah Boombastic | 56 Appetizer | 25 Aggromi
61 Onepointtwentyone Gigawatts


World of Warcraft
90 Downlo 85 Gravetaxi 85 Ümad 85 Artemedis 85 Guthuros
Reply With Quote
Reply



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
Visible Buttons dinatius DDO Wish List (D) 1 08-23-2009 11:26 PM
Buttons wont show wackafoo Interface Help (L) 2 08-11-2009 03:06 PM
Missing two buttons at housing Wicked Mouse XML modification help (L) 0 04-03-2008 11:22 AM
Toggle Quickbars Skill description Deewe LotRO Wish List (L) 0 10-10-2007 08:40 AM
Mouselook Toggle feature Siknu Interface Requests (L) 1 04-04-2007 05:21 PM


All times are GMT -5. The time now is 01:35 PM.


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