lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > General Discussion & Support > Interface Requests (L)

Reply
Thread Tools Display Modes
  #1  
Unread 07-08-2012, 12:27 PM
Vald's Avatar
Vald Vald is offline
The Undying
 
Join Date: Oct 2010
Posts: 22
Locked Icon Module

Several of the plugins I use create an icon to access the plugin's features. Unfortunately, some of these icons are not locked in place, which is a real pain the the butt. Clicking them often moves them slightly, so I', regularly having to move them back into position.

Two examples are Galuhad's ChatEdit and Raid Assistant. Galuhad hasn't responded in some time, so asking him to add this feature hasn't helped.

So, is it possible to add a standard block of code which could be added to any plugin file with an icon to lock in in place? Some icons are moved with the standard CNTRL+\, others by holding down a second button and dragging, etc.

I don't much care how the loch feature works, I just don't want to have to wait for an author to decide to lock his icon (if ever). I'd like to be able to add the code myself but just don't know how.

If anyone can help, I'd sure appreciate it.
Reply With Quote
  #2  
Unread 07-08-2012, 04:23 PM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
This is one of the reasons I use DeusDictums Dragbar class - it matches the locking code to the standard "ctrl+#".
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #3  
Unread 07-08-2012, 06:08 PM
Vald's Avatar
Vald Vald is offline
The Undying
 
Join Date: Oct 2010
Posts: 22
I have that class installed. Is there some block of code that ties to it that could be inserted into any plugin file to lock the icon?
Reply With Quote
  #4  
Unread 07-08-2012, 07:06 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
Try this:

First, put this near the start of the code for the icon:
Code:
import "Deusdictum.UI";
Then add this somewhere in the setup for the icon:

Code:
   self.DragBar = Deusdictum.UI.DragBar( self, "{name of icon}" );
I think that is all there is to it, let me know how it works.
Reply With Quote
  #5  
Unread 07-08-2012, 10:29 PM
Vald's Avatar
Vald Vald is offline
The Undying
 
Join Date: Oct 2010
Posts: 22
I can't seem to get this right. I added the import code to main.lue and the icon code to IconWindow.lua for Raid Assistant. When I try to load it in game, I keep getting this error code:

...f the Rings Online\Plugins\Deusdictum\UI\DragBar.lua:59: attempt to index field 'wndTarget' (a nil value)

Does that mean I'm getting the icon name wrong? I can't seem to tell what it is, if that's the case.
Reply With Quote
  #6  
Unread 07-09-2012, 04:59 AM
D.H1cks's Avatar
D.H1cks D.H1cks is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 162
I think it should be placed in the IconWindow.lua file, but you will need to change the second line to:

Code:
wIcon.DragBar = Deusdictum.UI.DragBar( wIcon, "{name of icon}" );
I would try it myself but I am on the way out the door for work. If it doesn't work I will figure it out for sure tonight.

If it does work, you will need to delete the section of code that handles moving the icon, it starts with:

Code:
wIcon.MouseMove = function (sender, args)

Last edited by D.H1cks : 07-09-2012 at 05:01 AM.
Reply With Quote
  #7  
Unread 07-09-2012, 06:20 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
Ok, tried it out and here is what I found to make it work properly.

First, added the line following line to the very start of the IconWindow.lua file:

Code:
import "Deusdictum.UI";
Added the following right before the 'wIcon.MouseEnter = function (sender, args)' line:

Code:
wIcon.DragBar = Deusdictum.UI.DragBar( wIcon, "R.A. Icon" );
Completely removed the MouseMove function. Then added the following in its place:


Code:
	wIcon.PositionChanged = function(sender, args )
		SETTINGS.ICONX, SETTINGS.ICONY = wIcon:GetPosition();

		if SETTINGS.ICONX < 0 then SETTINGS.ICONX = 0 end
		if SETTINGS.ICONX > (SCREENWIDTH-32) then SETTINGS.ICONX = (SCREENWIDTH-32) end
		if SETTINGS.ICONY < 0 then SETTINGS.ICONY = 0 end
		if SETTINGS.ICONY > (SCREENHEIGHT-32) then SETTINGS.ICONY = (SCREENHEIGHT-32) end

		wIcon:SetPosition(SETTINGS.ICONX,SETTINGS.ICONY);
	end
Everything appears to be working.
Reply With Quote
  #8  
Unread 07-09-2012, 09:40 PM
Vald's Avatar
Vald Vald is offline
The Undying
 
Join Date: Oct 2010
Posts: 22
Thank you very much, D. I got that one working. ChatEdit (also by Galuhad) is much harder. It has "parent" and "child" windows. So far, I've been able to disable the current drag function but can't seem to get DragBar working with it.
Reply With Quote
  #9  
Unread 07-10-2012, 05:27 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
I have been looking at ChatEdit and for some reason it will not attach the dragbar to the bOpen window, which is the icon.

Now to find out why....
Reply With Quote
Reply


Thread Tools
Display Modes

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
DDO - Module 7 now Live! Cairenn News 1 08-28-2009 11:21 PM
DDO: Release Notes: Module 8 Cairenn News 0 12-01-2008 04:53 PM
DDO - Download-able Updater available now for Module 7, which goes live June 3 Cairenn News 0 05-30-2008 04:31 PM
DDO: Module 7 Feature Preview: Pimp My Warforged! Cairenn News 0 04-01-2008 03:54 AM
DDO - Final Release Notes: Module 6: The Thirteenth Eclipse Cairenn Chit Chat 1 01-30-2008 03:19 PM


All times are GMT -5. The time now is 02:00 PM.


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