Game & Forum Discussion > Game Suggestions & Ideas

mouse capture so we wont have to hold right click all time

(1/1)

kinfuyuki789:
it is just a cool feature suggestion to add some immersion, to add a hotkey it is easy, i saw this game was made probably in c++ since is made in ogre and have irrlicht sound lib

so do something like this:


switch (input){
 case key_mouselock:
  mouselocked=!mouselocked;
  lookaround=mouselocked;
  mouse.x=200;
  mouse.y=200;
  break;
 case mouse_move:
  if (!mouselocked) movepointer();
  break;
 case rightmouse:
  if (!mouselocked) lookaround=!lookaround;
  break;
}

(it took a while to color everything but it looks great at least)

as you can see i made like... all input things i said being handled here so its easier to understand what i mean ^^

Navigation

[0] Message Index

Go to full version