lightmap Posted August 24, 2017 Share Posted August 24, 2017 Hello What mouse related methods are called when user press ~tilda or ESC I'm tried this methods engine.gui.setMouseGrab(1); engine.controls.setMouseEnabled(0);//freeze engine.app.setMouseShow(1);//windows mouse camera.setHandled(false); camera.setEnabled(false); camera.getControls().release(); camera.setControlled(1); camera.setControls(0);tag code has infinite loading for me but with no success I need area on screen, where user click will not grab mouse and not hide cursor Link to comment
silent Posted August 24, 2017 Share Posted August 24, 2017 Hi Mikhail, You can try to pass MOUSE_SOFT define at the engine stratrup via -extern_define MOUSE_SOFT parameter. That should prevent mouse cursor from disappearing. Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
lightmap Posted August 24, 2017 Author Share Posted August 24, 2017 thanks with -extern_define MOUSE_SOFT winapi cursor rendered always, but grabbing mouse, like fps mage mode, are disabled - which is no good is mouse code for Unigine when pressed ~tilda or ESC are classified?) Link to comment
sinbizkit Posted August 25, 2017 Share Posted August 25, 2017 18 hours ago, lightmap said: thanks with -extern_define MOUSE_SOFT winapi cursor rendered always, but grabbing mouse, like fps mage mode, are disabled - which is no good is mouse code for Unigine when pressed ~tilda or ESC are classified?) ESC or tilda keys have special meanings for a mouse behavior only if you didn't provide any related preprocessor defines. You can add MOUSE_SOFT or MOUSE_USER defines and process all grab/release logic by yourself. In the first case, a cursor will be disappeared shortly after user inactivity. In the second case, a cursor will be visible all the time. You can check the code inside the Unigine SDK - "data/core/scripts/system/system.h". Link to comment
Recommended Posts