Quantcast
VGInterface.com
Search Downloads


Go Back   LoTROInterface > LotRO Libraries

Category: LotRO Libraries[Class] Drop Down Menu
Interface Information
Download
Galuhad's Portal Bug Reports Feature Requests
How do I install this? (FAQ)
Name: [Class] Drop Down Menu   Popular!
Author:
Date: 02-26-2014 08:05 AM
Size: 5.58 Kb
Version: 2.0
Rate File: 5 out of 5 with 4 votes  
Pictures
Click to enlarge 

Views: 0
Size: 12.63 Kb
Dimensions: 280 x 247
Dropdown menu
 
Description
This class has been updated making it easier to use, with more polished looking dropdowns that closer resemble those used in-game.
Note: There have been a number of changes made to the constructor and calls, if you upgrade an existing plugin using version 1.x of this class, you will have a bit of recoding to do (sorry).

Usage
someDropDown = DropDown(list,default) -- list is the table of strings to include, default [optional] is the string to display on creation.

Methods
DropDown:Close(); -- Forces the dropdown list to close, needed for customised lists
DropDown:GetAlignment(); -- Gets the alignment of the text
DropDown:GetListBox(); -- Returns the ListBox used in the dropdown for customised lists
DropDown:GetMaxItems(); -- Gets the number of items displayed in the dropdown before a scrollbar is used
DropDown:GetText(); -- Gets the text in the dropdown
DropDown:IsEnabled();
DropDown:Reset(); -- Scrolls back to the top item in the list
DropDown:SetAlignment(ContentAlignment); -- Sets the text alignment for the labels in the dropdown
DropDown:SetEnabled(value);
DropDown:SetParent(control);
DropDown:SetPosition(left,top);
DropDown:SetMaxItems(value); -- Sets the number of items displayed in the dropdown before a scrollbar is used
DropDown:SetText(string); -- Sets the text of the dropdown
DropDown:SetVisible(value);
DropDown:SetWidth(value);

Disabled Methods
SetHeight(), SetSize() -- Only width can be set using SetWidth(value)

Events
DropDown.ItemChanged(Sender,Args) -- Event Sender, Event Args (Args.Index,Args.Text)

Example
local listTable = {"First Label","Second Label","Third Label"}; -- table of strings used to create the dropdown
someDropDown = DropDown(listTable);
someDropDown:SetParent(control);
someDropDown:SetPosition(20,50);

someDropDown.ItemChanged = function (Sender,Args)
Turbine.Shell.WriteLine("Index: "..Args.Index..", Text: "..Args.Text);
end

The class comes with a fully functioning example which can be loaded in-game for demonstration purposes.
Archive List (Old Versions)
File Name
Version
Size
Author
Date
1.2
6.11 Kb
Galuhad
08-05-2011 04:23 PM
File Statistics
User Rating:
5 out of 5 with 4 votes
Downloads: 4667
Views: 16111
Favorites: 2
Uploaded By:
 
Last Modified: N/A

View Pictures. Download Now! Post A Comment


Post A Reply
Author Comments Comment Options
Unread 11-02-2014, 12:53 PM  
Thurallor
The Undying
 
Thurallor's Avatar
Interface Author - Click to view interfaces

Forum posts: 92
File comments: 78
Uploads: 8
Thanks Galuhad, I'm going to use this in SequenceBars.
Thurallor is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-05-2011, 02:57 PM  
Galuhad
The Unscathed
 
Galuhad's Avatar
Interface Author - Click to view interfaces

Forum posts: 19
File comments: 128
Uploads: 18
Quote:
It does a good job in my Carebear plugin.

One tiny thing i was missing was an implementation of SetEnabled(true/false). Currently i make it invisible that works as well but is different.
Thanks for the feedback I'm not sure why I hadn't thought of that before, will add in the option to SetEnabled on the next update.

Edit: Updated to version 1.2 which allows you to enable/disable a menu.

Last edited by Galuhad : 08-08-2011 at 05:13 PM.
Galuhad is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 08-04-2011, 07:45 PM  
ooz
The Wary
 
ooz's Avatar
Interface Author - Click to view interfaces

Forum posts: 0
File comments: 9
Uploads: 5
It does a good job in my Carebear plugin.

One tiny thing i was missing was an implementation of SetEnabled(true/false). Currently i make it invisible that works as well but is different.
ooz is offline Report comment to moderator   Reply With Quote Reply With Quote
Unread 07-29-2011, 05:03 AM  
Galuhad
The Unscathed
 
Galuhad's Avatar
Interface Author - Click to view interfaces

Forum posts: 19
File comments: 128
Uploads: 18
Has anyone tried using this yet besides myself? Just would like to know how people are finding it, is it easy to use? useful?
Thanks
Galuhad 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:12 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | VGInterface | LoTROInterface | MMOInterface | Swtorui