HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: BUG - setting GUIScrollablePanel offset in onMouseWheel  (Read 1501 times)

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile

Hi!
Question to HE engineers. Can this be classified as a bug?

I am setting the offset of my GUIScrollablePanel in the mouseWheel event of the window in order to get the standard issue window scroll via the mouse wheel.

The problem is that when the mouse pointer gets moved from some control via the scroll mechanism (for example from standard issue panel), the OnMouseLeave event of that control does not get called <---- this is a problem.

As a consequence i'm getting multiple row highlights in the window while scrolling it (the correct behaviour is to have only one row highlighted):

https://youtu.be/tzQCFUAUR4c




Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #1 on: Apr 19, 15, 02:30:43 AM »

OK, i think i have a better insight in what happens here.

As i see it, the problem is that if you have simultaneously a lot of OnMouseWheel events (produced with a mouse wheel scroll) versus one OnMouseLeave event, the OnMouseLeave will in most cases get pushed out by the OnMouseWheel events and never get called.

If this is true, than some kind of prioritization for the events has to be implemented, i.e. OnMouseLeave should have priority which is greater then OnMouseWheel event.


Does this hold water?
« Last Edit: Apr 19, 15, 03:53:41 AM by AWW_boss »
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #2 on: Apr 19, 15, 02:43:02 AM »

Just to emphasize what i'm talking about and show you the repro steps, i made some printouts on a plain GUIPanel:

Here is the output when i move the cursor in and out of the GUIPanel couple of times:
09:37:27: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseEnter
09:37:29: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseLeave
09:37:30: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseEnter
09:37:32: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseLeave
09:37:33: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseEnter
09:37:33: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseLeave

And here is the output when i simultaneously scroll the mouse wheel and move the cursor out the GUIPanel once:
09:41:07: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseEnter
09:41:08: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseWheel
09:41:08: SCRIPT:[MUD_GUICommonButtonClassMethods]:OnMouseWheel
<--- no OnMouseLeave event, this is the problem

Please notice how the OnMouseLeave event did not get called in this scenario.
Logged

Thazager

  • General Accounts
  • *
  • Posts: 1125
  • Never stop learning
    • View Profile
    • Heroes and Villains MMORPG
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #3 on: Apr 19, 15, 01:42:13 PM »

I have noticed the same effect (shown in the video) on some of the mouse scrolling panels I have made. The mouse wheel moves the background panel before clearing the current panel it is over, then it shows as a highlighted panel along with the newly highlighted panel the mouse is currently over. One way to fix this is - once the mouse wheel function is entered, clear any previous mouse over panels, then go through the movement for the wheel. If its not over any panel when going through the mousewheel function, it should be ok as clearing just sets the value back to normal.

method OnMouseWheel()

// clear mouse over
  me.OnMouseLeave()  // make sure its pointing at the current panel

// move the panel
...

.
Logged

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #4 on: Apr 19, 15, 02:32:29 PM »

Thanks.  I'm glad to see i'm not the only one having this problem. The more people see it, the greater the chance it gets fixed.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #5 on: Apr 19, 15, 04:00:14 PM »

did you set the proper levels of ignore mouse input. I find often times you can fix / resolve a lot of it if you make sure controls that have no means or needs for mouse are told to ignore it. Then just build your tiers or stacks of GUI controls in methodic setup.

Or if they need to deal with input then making sure you null override non needed functions.
at the control class level.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

HE-HERB

  • HeroEngine
  • *****
  • Posts: 530
    • View Profile
    • HeroEngine
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #6 on: Apr 20, 15, 06:10:39 PM »

Confirmed issue, thanks.  We need to determine the best corrective action

Cheers
Logged
herb marselas
graphics guy

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #7 on: Apr 21, 15, 01:44:06 AM »

Great, thank you very much!
Logged

HE-HERB

  • HeroEngine
  • *****
  • Posts: 530
    • View Profile
    • HeroEngine
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #8 on: Apr 21, 15, 06:20:26 PM »

This looks like it will require both client engine and HSL engine engine changes.

In reviewing a bunch of mouse handling HSL from various worlds, I believe that in most cases changes won't be required and everything will just "work better" (tm).

At this point, we don't have an ETA on the fix.  However, I would expect it in one of the short term updates.

Cheers
Logged
herb marselas
graphics guy

AWW_boss

  • General Accounts
  • *
  • Posts: 846
  • gdfgd
    • View Profile
Re: BUG - setting GUIScrollablePanel offset in onMouseWheel
« Reply #9 on: Apr 27, 15, 01:33:19 PM »

Hi Cooper, could you please move this issue to the "Issues being investigated" thread, as it is easier to keep track, and that it doesn't get lost.

Cheers!
Logged