Jump to content

How to fullscreen and unlock mouse please


Gengivas
 Share

Recommended Posts

I know this is a stupid question but how do order leadwerks to start a game in fullscreen instead a window? i have another question. how to unstuck the mouse?(when start in a window the game locks the mouse to game window only) i've tried but always get an error when i try fullscreen. i need the mouse unlocked to do a screen video for example, the mouse is stuck and i can't do anything

Link to comment
Share on other sites

To change all of these things you need to edit the Main.lua script which is located in the scripts folder in your assets, to make the game full screen change one of the top lines that reads "local windowstyle = window.Titlebar" to "local windowstyle = window.Fullscreen".

 

To change the windowed resolution change the "screenwidth","1024" and "screenheight","768" to for example "screenwidth","1280" and "screenheight","720", just change the numbers to what ever size you want.

 

To unhide the mouse change "window:HideMouse()" to "--window:HideMouse()" and that will comment out the hide mouse command.

 

If your mouse is locked to the center of the game screen then that is most likely in one of your scripts,

for instance if you are using the default FPSPlayer.lua then you would need to change "window:SetMousePosition(Math:Round(context:GetWidth()/2), Math:Round(context:GetHeight()/2))" to "--window:SetMousePosition(Math:Round(context:GetWidth()/2), Math:Round(context:GetHeight()/2))" under the --Mouse look comment in the UpdateWorld() function.

 

Though i must warn you that unlocking the mouse with the FPSPlayer will make the player look around very weirdly.

 

Hope this helps.

  • Upvote 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...