lotrointerface.com
Search Downloads


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

Reply
Thread Tools Display Modes
  #1  
Unread 07-08-2011, 01:43 PM
Fortunis's Avatar
Fortunis Fortunis is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
MouseWheel Event

Does anyone know how to check for MouseWheel up and down events (seperatly), or if its even possible?
__________________
Author of Mouse Cursor Highlighter Advanced
Reply With Quote
  #2  
Unread 07-08-2011, 03:21 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
I know they work, but I'll be damned if I can remember how I used them!
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #3  
Unread 07-08-2011, 03:39 PM
Fortunis's Avatar
Fortunis Fortunis is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
Thx for your response MrJackdaw

Spent ages trying to figure it out, without any luck. Ive moved onto dragging the window instead of mousewheel scrolling, but still looking for an answer to the mousewheel scrolling.

btw its not a window setup that can use an effecient scrollbar. It has one but can only operate it while having mouse pointer on the scrollbar :s

Turbine seriously need to improve functionality of the API. Theres many things ive come across that should work but they just dont make sense.

Take [SetStretchMode] for instance. An image needs [SetStretchMode] if its to be altered in size but in using [SetStretchMode], its FORCED to be visible outside its parent window boundary
__________________
Author of Mouse Cursor Highlighter Advanced
Reply With Quote
  #4  
Unread 07-08-2011, 05:35 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
As far as I know there is only one event, but you can tell which direction by the value given. One direction will give you a positive value, the other negative.

Code:
if(args.Direction == -1) then
That is what I do to check.
Reply With Quote
  #5  
Unread 07-08-2011, 06:15 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
Also, make sure you're using a ListBox. Mousewheel events will not fire on a Control or a Window.
__________________

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
  #6  
Unread 07-08-2011, 06:29 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 use labels and quickslots to capture some mouse wheel events......
Reply With Quote
  #7  
Unread 07-08-2011, 07:02 PM
Fortunis's Avatar
Fortunis Fortunis is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
Thanks for that, guys. I'll check args.direction tomorrow and report back

I use labels as interior windows. A listbox isnt really the thing to use for what im doing ... Im not scrolling just text, which is how the default scrollbars are setup usually. Im scrolling images, labels, checkboxes, other scrollbars, buttons... Why didnt i just say everything lol!

Alot of obstacles to get past due to the API problems, as im sure your aware
__________________
Author of Mouse Cursor Highlighter Advanced
Reply With Quote
  #8  
Unread 07-08-2011, 08:40 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 D.H1cks
I use labels and quickslots to capture some mouse wheel events......
Quote:
Originally Posted by Fortunis
Thanks for that, guys. I'll check args.direction tomorrow and report back

I use labels as interior windows. A listbox isnt really the thing to use for what im doing ... Im not scrolling just text, which is how the default scrollbars are setup usually. Im scrolling images, labels, checkboxes, other scrollbars, buttons... Why didnt i just say everything lol!

Alot of obstacles to get past due to the API problems, as im sure your aware
Ah ok, never even imagined that labels would work for that, but I guess if I did more that required text input I'd have seen that. But, yeah - just because something would make sense - doesn't mean that it applies to the API
__________________

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
  #9  
Unread 07-09-2011, 01:32 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
Don't know if this is any use, but this comes from when I was fooling around trying to understand the MouseWheel event;
Code:
NewQuickslot=class (Turbine.UI.Lotro.Quickslot)
function NewQuickslot:Constructor (size)
	Turbine.UI.Lotro.Quickslot.Constructor(self)
	self.size=size
	self.ShortcutChanged=function()
		if self.size~=36 then self:SetStretchMode(1) end
		self:SetSize(self.size,self.size)
	end
end

Window={}
Window=Turbine.UI.Window()
Window:SetVisible(true)
Window:SetSize(100,100)
Window:SetPosition(0,0)

Window.Quickslot=NewQuickslot(36)
Window.Quickslot:SetPosition(0,0)
Window.Quickslot:SetParent(Window)

Window.Quickslot.MouseWheel=function(sender, args)
Turbine.Debug.Table.Dump(args)
Turbine.Shell.WriteLine(args.Direction)
end
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #10  
Unread 07-09-2011, 04:38 AM
Fortunis's Avatar
Fortunis Fortunis is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Mar 2011
Location: Leeds, UK
Posts: 72
Quote:
Originally Posted by MrJackdaw
Don't know if this is any use, but this comes from when I was fooling around trying to understand the MouseWheel event;

Code:
Window.MouseWheel=function(sender, args)
Turbine.Shell.WriteLine(args.Direction)
end

if(args.Direction == -1) then
Are you kidding? This is perfect!!! Thanks MrJackdaw and D.H1cks

Ive learnt something new. I wonder what else you/i could find with debug dump. I did try to WriteLine(args) but got empty line printed (before making this thread). So i guess in the future when i get an empty line, it signifies that there is debug info attached to it.

__________________
Author of Mouse Cursor Highlighter Advanced

Last edited by Fortunis : 07-09-2011 at 05:00 AM.
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
Control.MouseWheel() event not working for you? Digital_Utopia Lua Programming Help (L) 7 06-20-2011 12:42 PM


All times are GMT -5. The time now is 07:14 PM.


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