lotrointerface.com
Search Downloads


Go Back   LoTROInterface > Outdated LotRO Interfaces

Category: Outdated LotRO Interfaces[Class] DragBar with Examples
Interface Information
Download
How do I install this? (FAQ)
Name: [Class] DragBar with Examples   Popular!
Author:
Date: 01-04-2011 01:21 AM
Size: 21.40 Kb
Version: 1.3b-All
Rate File: 4 out of 5 with 7 votes  
Pictures
Click to enlarge 

Views: 0
Size: 4.30 Kb
Dimensions: 230 x 112
Example of a DragBar Attached to a Window
 
Description
Version 1.3b

REQUIRES TURBINE UTILITIES!

This is a utility class that adds dragging and ui hiding functionality similar to in game ui elements. It is used by attaching it to any parent window. If self is your parent window, you could attach it as follows:
Code:
self.DragBar = Deusdictum.UI.DragBar( self, "DragBar Demo Window" );
This results in something like the attached screenshot from the included demo plugin.

The class also looks for the following functions on the window it's attached to and calls them when appropriate. You do not have to define them, but if they are defined, they will be called:
  • HUDShow() - when the UI is un-hidden (F12)
  • HUDHide() - when the UI is hidden (F12)
  • DragEnable() - when dragging is enabled (CTRL + \)
  • DragDisable() - when dragging is disabled (CTRL + \)
  • DragStart() - when dragging begins
  • DragEnd() - when dragging ends
  • RotateStart() - when the user presses the mouse button down on the rotate icon / rotation begins
  • Rotating() - when the user moves the mouse after pressing the mouse button down on the rotate icon
  • RotateEnd() - when the user releases the mouse button after pressing it on the rotate icon / rotation ends; fires regardless of where the mouse pointer is in relation to the rotate icon
  • Rotate() - when the user releases the mouse button after pressing it on the rotate icon / rotation should be executed; fires only if the mouse pointer is positioned appropriately over the rotate icon

Let me know if you have any suggestions or encounter any bugs.

Known Issues:
  • API LIMITATION: The API does not allow you to determine whether the client is in layout mode (CTRL + \) or not. DragBar assumes you are not in layout mode when the plugin is loaded. Creating a DragBar while in layout mode will result in a DragBar that displays/hides when it should be doing the opposite.
  • The size and position of a window should be initialized before the DragBar class is attached to it, otherwise it will not correctly detect the window's size and shape when it is displayed.
  • If the target window changes Size or changes its Position directly (instead of through the DragBar class), it should call one of the Recalculate methods or the Refresh method. Otherwise, the DragBar may be displayed in the wrong location or be incorrectly sized.

Features:
  • The default resources can be overridden to provide the look of your choosing.
  • Option of displaying a button that will trigger Rotate events on the target.
  • Option of placing the DragBar below the target instead of above it. Left and Right placement will not happen until we can do vertical text.
  • Methods for disabling/enabling HUD toggling and Dragging. You can use it for combat only quickslots and other controls that only appear/should be able to be dragged based on some condition.
  • Three demo plugins showing how it is used:
    • DragBarDemoOne - demo with a rotate button
    • DragBarDemoTwo - a complex way of dealing with windows that only open under certain conditions; another class tracks whether the target should be visible or hidden and the DragBar events are monitored so that the control is correctly hidden or displayed
    • DragBarDemoThree - a simple way of dealing with windows that only open under certain conditions; the demo window only appears during combat, but still responds appropriately to the DragBar control during combat

Available Methods: (well, the ones I expect developers to use, anyway...):
  • G/Set = There's a Get version of the Set method, usually w/no arguments
  • I/Set = There's an Is version of the Set method, usually w/no arguments
  • Constructor( ctlAttachTo, sName, bBarOnTop, tResources ) - self-explanatory except look at the local defaultDragBarResources table in DragBar.lua for the structure of tResources if you want to override the default ones.
  • SetRotatorOffset( oX, oY ) - if the Rotator has been initialized, determines the location of the rotate icon
  • SetRotator( boolean, tResources ) - show/hide the rotate icon, allowing customization of resources
  • SetBarOnTop( boolean ) - pass false to put the DragBar beneath the target window
  • G/SetAllowsDragging( boolean )
  • G/SetAllowsHUDHiding( boolean, boolean ) - optional 2nd argument; if true, will unhide the control if you are turning off HUD hiding. (use false or omit for conditional appearance of a control, e.g. combat quickslots)
  • HideTargetIfHUDHidden()
  • I/SetDraggable( boolean )
  • I/SetHUDVisible( boolean )
  • ToggleDraggable()
  • ToggleHUDVisible()
  • RecalculatePosition()
  • RecalculateSize()
  • Refresh() - just calls the two Recalculate methods

Version History:
  • 1.3b - The Rotator, if enabled, should now stay on top of the DragBar after it has been moved.
  • 1.3a - Removed all references to Turbine.Utils for US November 2010 update.
Archive List (Old Versions)
File Name
Version
Size
Author
Date
1.3a-All
21.35 Kb
Deusdictum
12-05-2010 02:07 AM
1.3-All
21.37 Kb
Deusdictum
09-09-2010 09:30 AM
File Statistics
User Rating:
4 out of 5 with 7 votes
Downloads: 159432
Views: 151113
Favorites: 82
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 09-09-2010, 11:51 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Brilliant! I was hoping you would post this here!

Thanks again for your work on this one... (Saved me a heck of a lot...)
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-10-2010, 12:13 PM  
Urailas
The Wary

Forum posts: 0
File comments: 3
Uploads: 0
Hiding the dragbar default

Is there a way to hide the default dragbar so it stops popping up everytime I enter combat?
Urailas is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-10-2010, 02:32 PM  
Deusdictum
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 25
Uploads: 4
Re: Hiding the dragbar default

Quote:
Is there a way to hide the default dragbar so it stops popping up everytime I enter combat?
By default, the DragBar does not display when you enter combat. Can you give me more information so I can help you?

This is a class meant to be used by other developers and the examples aren't intended to be run during normal gameplay.

If you have the 3rd demo loaded, this would explain what you are seeing, as this example shows one way you can get the DragBar to function with a window that appears/hides based on your combat status.
Deusdictum is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-10-2010, 04:19 PM  
Urailas
The Wary

Forum posts: 0
File comments: 3
Uploads: 0
Re: Re: Hiding the dragbar default

Ah, nevermind. I was having issues with BuffBars and not being able to move the bars (when unlocking the UI I was getting an error). I installed DragBar and loaded it and which allowed me to move the buffbars around. I have since unloaded DragBar and I am still able to move my BuffBars so I think it was a user error when originally downloading that I've since solved.
Urailas is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-11-2010, 04:23 PM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
I think your issue was caused by having the UI unlocked when you loaded the plugins causing the "unlock" to be inverted for the frames registered to the dragbars.
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-17-2010, 01:18 PM  
grezgorz
The Indomitable

Forum posts: 13
File comments: 13
Uploads: 0
Hi, this looks like a very interesting plugin

Will it allow me to make the main toolbar (the one with the default quickslots, buttons, auto-attack icon, and fervor/focus bar) moveable? I'm primarily interested in moving the fervor/focus display to line up along the top of the character portrait of the player vitals.

I've been messing around with a skin that repositions the toolbar elements but I can't seem to get everything lined up the way I want. There seems to be a problem with moving the fervor/focus display more than 200 pixels away from the rest of the toolbar elements, and I was hoping this could be a short-cut that would also allow the flexibility of repositioning in-game and without editing xml files.
grezgorz is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 09-17-2010, 01:41 PM  
Deusdictum
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 25
Uploads: 4
Quote:
Will it allow me to make the main toolbar ... moveable?
Sorry, no, it won't. Currently, the DragBar can only be attached to other plugin controls and must be attached via Lua code.

This means it will primarily be used by other developers as a shortcut to providing the DragBar functionality in their own plugins. For example, BuffBars (http://www.lotrointerface.com/downlo...-BuffBars.html) will use a DragBar if you have it installed.
Deusdictum is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 11-29-2010, 06:05 PM  
maradakia
The Unscathed
 
maradakia's Avatar

Forum posts: 16
File comments: 27
Uploads: 0
I just downloaded version 1.3 - extracted all to the Plugins folder. Told it to overwrite Yes to All.

In game I did a /plugins refresh

and now I have:

DragBarDemoOne (1.3)
DragBarDemoThree (1.2)
DragBarDemoTwo (1.2)

Am I supposed to have these three?
Only DemoOne is 1.3 ?

If somethings wrong - what do I need to change please?
maradakia is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-04-2010, 05:08 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
To get this working on the current US live server I have had to make the following changes;

Under Plugins/DeusDictum/UI

Code:
DragBar.lua; Change line 7 to --import "Turbine.Utils";
DeltaButtonControl.lua; Change line 6 to --import "Turbine.Utils";
DeltaButtonWindow.lua; Change line 6 to --import "Turbine.Utils";
Then all is well!

You may not need to make these changes, so panic not!
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-05-2010, 01:39 AM  
Deusdictum
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 25
Uploads: 4
Quote:
now I have:

DragBarDemoOne (1.3)
DragBarDemoThree (1.2)
DragBarDemoTwo (1.2)

Am I supposed to have these three?
Only DemoOne is 1.3 ?

If somethings wrong - what do I need to change please?
If you are only using DragBar because some other plugin requires it, you technically don't need these so it doesn't matter what version these are and you can delete their folders and .plugin files from your Plugins\Deusdictum folder.

If you are going to be writing a plugin / Lua code using the DragBar class, these three plugins are simply demos. It does not matter that only one is 1.3. When I wrote these a) I was notorious for forgetting to update the version number and b) just because I updated one demo didn't mean I updated all three. So, I think that is actually correct. The last time I updated the demos, I only updated DemoOne, so it is 1.3 and the rest are still 1.2.
Deusdictum is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-05-2010, 01:40 AM  
Deusdictum
The Wary
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 25
Uploads: 4
Quote:
To get this working on the current US live server I have had to make the following changes;

Under Plugins/DeusDictum/UI

Code:
DragBar.lua; Change line 7 to --import "Turbine.Utils";
DeltaButtonControl.lua; Change line 6 to --import "Turbine.Utils";
DeltaButtonWindow.lua; Change line 6 to --import "Turbine.Utils";
Then all is well!

You may not need to make these changes, so panic not!
Ah! Thanks for catching this. I completely missed this because I simply unzipped the new Turbine Utilities over the old Turbine Utilities and didn't notice that Turbine.Utils doesn't exist in the new file structure.
Deusdictum is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 12-05-2010, 10:52 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Quote:
Ah! Thanks for catching this. I completely missed this because I simply unzipped the new Turbine Utilities over the old Turbine Utilities and didn't notice that Turbine.Utils doesn't exist in the new file structure.
A pleasure! After all - none of my plugins would work without this, so thanks for your work!
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-13-2011, 10:15 AM  
NuclearTonic
The Undefeated
 
NuclearTonic's Avatar
Interface Author - Click to view interfaces

Forum posts: 8
File comments: 247
Uploads: 1
Request

I have a request. I would like to allow people to use DragBar along with TonicBars (basically if it's there it'll use it, and if not, it'll use my basic tabs). But I was working out bar names / titles and I can't seem to change the name after it's created. That's an issue as people can change the names of my bars on the fly and expect to see the value changed.

So, can you please add a way for me to change the bar name without having to create a new one? Thanks.
NuclearTonic is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 02-27-2011, 09:11 AM  
MrJackdaw
The Undying
 
MrJackdaw's Avatar
Interface Author - Click to view interfaces

Forum posts: 249
File comments: 422
Uploads: 19
Re: Request

Quote:
I have a request. I would like to allow people to use DragBar along with TonicBars (basically if it's there it'll use it, and if not, it'll use my basic tabs). But I was working out bar names / titles and I can't seem to change the name after it's created. That's an issue as people can change the names of my bars on the fly and expect to see the value changed.

So, can you please add a way for me to change the bar name without having to create a new one? Thanks.
I use the following lines...
Code:
	self.Window.DragBar.sName=s
	self.Window.DragBar.Label:SetText( s )
MrJackdaw is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 06-27-2011, 06:42 PM  
Bloodpact
The Wary

Forum posts: 0
File comments: 2
Uploads: 0
Little help

Hello there In order for Tonicbars to work I have had to use an older version then the current v2.5b Because you can not make bar extensions.

In v2.5b Tonicbars and Dragbars seem to be meshing ok.

But I am using Tonicbars v2.4 and for some reason I can not move my TonicBars.

I have Dragbars 1.3b Installed I have changed the lines as per previous posts in this thread.
I use plugin manager and I can see DragBar Demo 1,2,3 there but when I type in /plugins load Dragbar or /plugins load Dragbars it says unable to load.

Also on a smaller note I do not see much on how this program works. I see a post that says I use the following lines:
self.Window.DragBar.sName=s
self.Window.DragBar.Label:SetText( s )
But I have no idea what that means and what I should put, to me it sounds like its targeting "self" as in my character and do I put some name in like my bar name where you have written sName=s? If there was just a basic guide of any kind, I can not seem to find one however.

Any Ideas?

PS I see that this is for developers to use on there plugins, So I am guessing I will have to wait for Tonicbars to be working correctly. btw I tried Tonicbars r120 aswell no go

Last edited by Bloodpact : 06-27-2011 at 07:27 PM.
Bloodpact is offline Report comment to moderator   Reply With Quote Reply With Quote
Post A Reply

 
Category Jump:
Search this Category:
 

All times are GMT -5. The time now is 05:47 PM.


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