Announcement

Collapse
No announcement yet.

Definitive way to stop click-through ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Definitive way to stop click-through ?

    I saw several things posted about this and I'm not sure why there isn't more written about this... Is it a non-issue or do people only create FPS in UDK ?

    Solutions suggested so far:
    1, check 2D coords in US to filter out UI clicks
    2, rectangle in UDK under UI

    I'm thinking along the way of setting up a boolean that would be true on UI mouse events and informing US through external call to ignore that mouse event.

    Before I waste time implementing this, is there a definitive way to stop clicks from falling through UI ?
    What do the boys over at Scaleform and Epic suggest ?

    Thanks for your help!

    #2
    We didn't found a "Engine-solution" either. We ended up implementing our own handling from scratch.

    Here is what we do:

    Every GUI-container we create in flash has a "MouseEvent.ROLL_OVER" and a "MouseEvent.ROLL_OUT" event. Every time the mouse enters a GUI-container, it informs Unreal (via ExternalInterface.call), that the mouse is over the HUD currently and if the mouse moves out of the container, it informs Unreal that the mouse left the GUI.
    Unreal sets then a boolean in MyPlayerController extends GamePlayerController "mMouseIsOverHUD" to true and false. And then EVERY unreal action you do checks for this boolean:

    Code:
    if(!class'MyPlayerController'.static.GetInstance().IsMouseOverHUD())
    {
        // do action
    }
    else
    {
        // mouse is over hud, do nothing -> prevent clickthrough
    }

    Comment


      #3
      Thank you for your reply, I'm glad I was on the right track suggesting the boolean thingie.

      Comment

      Working...
      X