Jump to content

mouse grab release


photo

Recommended Posts

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

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
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
×
×
  • Create New...