[Solved] Panorama HUD grabbing input

edited November 2015 in Questions

When I interact with a panorama HUD element with the mouse, it grabs the focus of any keys I press; stuff like abilities, items, camera panning etc. all stop responding until I click on the map again. Is this behavior a bug or intended, also can I stop it?

(note that space is my ult key, I know, I'm weird)

Comments

  • edited November 2015 Posts: 13

    i think that's because the button comsume the Space Event,you should choose continue_process_event,go to check the rpg_example's rpg_example_main.js file,and the SetMouseCallback function

  • edited November 2015 Posts: 213
    // var CONTINUE_PROCESSING_EVENT = false;
    GameUI.SetMouseCallback( function() {return false;} );
    
    // var CONSUME_EVENT = true;
    GameUI.SetMouseCallback( function() {return true;} );
    

    I tried both of these (separately), and I don't think that's the issue. With CONTINUE_PROCESSING_EVENT, I see the same behavior, whereas CONSUME_EVENT disables mouse ingame entirely (although I could still interact with my panorama button).

  • edited April 2016 Posts: 213

    Found the cause; it'll sound dumb, but in my defense the documentation ain't great. I was dropping my element directly under the <root> of my .xml file. Once I encompassed it in a <Panel> element, it behaved normally.