lotrointerface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 05-07-2012, 09:15 AM
Vinny Vinny is offline
The Indomitable
Interface Author - Click to view interfaces
 
Join Date: Dec 2010
Posts: 13
Scrollable menus?

Does anyone have a good example of how to add a scroll bar to a ContextMenu? I've got a menu that is getting way to long and need to add a scroll bar to it.
Reply With Quote
  #2  
Unread 05-07-2012, 09:31 AM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
The Turbine ContextMenu isn't a Control or ScrollableControl, it's just an Object so it doesn't have any of the functionality (like size and position methods) that would normally allow you to add a scrollbar. You'd have to build your own menu class which is a bit of a pain.

Can you instead group some of your functionality into submenus and build a two tier menu where you use one context menu as your main menu and its MenuItems pop up submenus where needed which would also be a context menus (kind of like how the in-game system menu works)? Then you would have the benefits of auto positioning and visibility control without having to build your own menu class.
Reply With Quote
  #3  
Unread 05-07-2012, 12:49 PM
Vinny Vinny is offline
The Indomitable
Interface Author - Click to view interfaces
 
Join Date: Dec 2010
Posts: 13
Yes, a sub-menu would also work. Is there anything tricky about it?
Reply With Quote
  #4  
Unread 05-07-2012, 03:37 PM
Garan's Avatar
Garan Garan is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Oct 2010
Posts: 340
Nothing tricky about a sub-menu. You don't even have to hide the main menu, context menus automatically replace any other context menu that was previously showing. You just use the Click event of the MenuItem in the main menu to show the sub menu. Bear in mind, most of Turbine's objects have a "MouseClick" event, but for MenuItems it is the "Click" event.
Reply With Quote
  #5  
Unread 05-08-2012, 01:34 PM
Vinny Vinny is offline
The Indomitable
Interface Author - Click to view interfaces
 
Join Date: Dec 2010
Posts: 13
I found a good example of using sub-menus in Turbine's CombatQuickslots. The sub-menus pop off to the side as you mouse over the selections with no clicking required. It makes it much nicer for browsing multiple subcategories.

You'd never guess how to do this from just reading the limited documentation on context menus.
Reply With Quote
  #6  
Unread 05-08-2012, 02:04 PM
magill's Avatar
magill magill is offline
The Undying
 
Join Date: Sep 2010
Location: Philadelphia PA
Posts: 85
Quote:
Originally Posted by Vinny
Does anyone have a good example of how to add a scroll bar to a ContextMenu? I've got a menu that is getting way to long and need to add a scroll bar to it.
I think the Tonic Bars control panel does that....

Check and let me know if that is what you mean. I have access to the code, but am not a programmer my self.
__________________
Bill Magill Mac Player
(OTG)
Val - Man Minstrel (107)
Valalin - Dwarf Minsrel (69)
Valamar - Dwarf Hunter (118)
Valanne - Beorning (105)
Valhad - Elf LM (65)
Valkeeper - Elf RK (85)
Valdicta - Dwarf RK (105)
Valwood - Dwarf RK (80)

Valhunt - Dwarf Hunter (68)
Ninth - Man Warden (65)

"Laid back, not so serious, no drama.
All about the fun!"

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
Ultima-like bags menus? halderas Interface Requests (L) 0 06-11-2008 05:40 PM


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


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