Quantcast Control.MouseWheel() event not working for you? - LoTROInterface
VGInterface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 09-26-2010, 08:22 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
Send a message via MSN to Digital_Utopia Send a message via Yahoo to Digital_Utopia
Control.MouseWheel() event not working for you?

If you've ever had a reason to try to track the mousewheel, and couldn't seem to get it to fire while using a Window or a Control, that's because neither of these elements are set up to use the mousewheel.

Instead, use something that does, like a ListBox control - size it/color it just like you would for a control, and it will do the job nicely.

Yes, that's right - the event ListBox inherits from the Control class, doesn't actually work for the Control class.
__________________

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

Last edited by Digital_Utopia : 09-26-2010 at 08:27 PM.
Reply With Quote
  #2  
Unread 06-13-2011, 02:29 PM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Thanks for the tip!
Reply With Quote
  #3  
Unread 06-13-2011, 02:58 PM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Meh, this is hopeless for me, I wanted to use an invisible listbox to catch mouse wheel events, but it won't catch them unless it's in front of everything else, unlike MouseEnter/MouseLeave events. Once in front of everything else, of course, nothing else is getting mouse events. Argh.
Reply With Quote
  #4  
Unread 06-16-2011, 08:44 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
Send a message via MSN to Digital_Utopia Send a message via Yahoo to Digital_Utopia
Quote:
Originally Posted by Equendil
Meh, this is hopeless for me, I wanted to use an invisible listbox to catch mouse wheel events, but it won't catch them unless it's in front of everything else, unlike MouseEnter/MouseLeave events. Once in front of everything else, of course, nothing else is getting mouse events. Argh.
Well, I'm not exactly sure what you're trying to do - but keep in mind that you can kinda fake mouse events - as Lua event functions can be called like any other function, and if all else fails - just compare the x,y coords of the mouse pointer to the relative location of the child control.
__________________

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
  #5  
Unread 06-17-2011, 11:13 AM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Well, I was writing a listbox class more to my liking (never liked those list boxes that store their items, and as a consequence, handle the list structure/order which should be left to the client), mouse events would have to be redirected generically to control trees, and I can see myself rewriting the entire Turbine.UI.* API from that point.

As tempting as it might be, I'll just forget about MouseWheel events for the time being, I think

Edit: Or I might try to use a listbox as a master control for my listbox, that might actually work.

Last edited by Equendil : 06-17-2011 at 11:17 AM.
Reply With Quote
  #6  
Unread 06-18-2011, 08:12 PM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Alright, I sorted my mouse wheel problem in the following way:

- Using a Turbine.UI.Button as a parent control.
- Stealing MouseWheel events from child controls, as in Turbine.UI.Control controls, they *do* get mouse wheel events with a Turbine.UI.Button as parent ...

Grabbing events from child controls is inelegant at best and it still doesn't solve the more general problem that child controls (with mouse visibility set to true) prevent their parent controls from receiving any mouse event other than Enter/Hover/Leave (so in my situation, a checkbox within a control within my listbox would prevent scrolling), but as a kludge, it does the trick.
Reply With Quote
  #7  
Unread 06-19-2011, 12:18 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
Send a message via MSN to Digital_Utopia Send a message via Yahoo to Digital_Utopia
Quote:
Originally Posted by Equendil
Alright, I sorted my mouse wheel problem in the following way:

- Using a Turbine.UI.Button as a parent control.
- Stealing MouseWheel events from child controls, as in Turbine.UI.Control controls, they *do* get mouse wheel events with a Turbine.UI.Button as parent ...

Grabbing events from child controls is inelegant at best and it still doesn't solve the more general problem that child controls (with mouse visibility set to true) prevent their parent controls from receiving any mouse event other than Enter/Hover/Leave (so in my situation, a checkbox within a control within my listbox would prevent scrolling), but as a kludge, it does the trick.
To be perfectly honest, how advanced a plugin is, is directly proportional to the number of kludges used within it

By the way, since I was just on the lotro forums and noticed it, nice job on Bootstrap! Definitely one of the best looking, most advanced in-game plugin managers I've seen
__________________

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
  #8  
Unread 06-20-2011, 12:42 PM
Equendil Equendil is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2011
Posts: 52
Quote:
Originally Posted by Digital_Utopia
To be perfectly honest, how advanced a plugin is, is directly proportional to the number of kludges used within it
Haha, yeah, there is some truth to that

Quote:
By the way, since I was just on the lotro forums and noticed it, nice job on Bootstrap! Definitely one of the best looking, most advanced in-game plugin managers I've seen
Thanks !
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
Checkbox not working Marll Interface Help (L) 0 09-04-2010 01:51 PM
What I have been working on... MrJackdaw Beta Interfaces (L) 7 06-05-2010 08:39 AM
Can UI mods control which music is played? Vair Interface Requests (L) 2 06-13-2009 11:05 AM
UI not working after today maintenance Bulletsix Interface Help (L) 0 09-26-2007 06:22 AM
Shrinking LetterBox not working... Kailvine Interface Help (L) 3 07-04-2007 05:30 AM


All times are GMT -5. The time now is 08:13 PM.


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