Page 1 of 1

Help: How can I hide mouse cursor ingame?

Posted: 06 Oct 2007, 13:53
by Pendrokar
How can I hide mouse cursor ingame? :?

Posted: 06 Oct 2007, 14:13
by TradeMark
Create your own copy of the mod, and make the cursor with full transparent color (lila or etc). Thats how i hidded it for my videos.

Posted: 06 Oct 2007, 17:11
by Pendrokar
TradeMark wrote:Create your own copy of the mod, and make the cursor with full transparent color (lila or etc). Thats how i hidded it for my videos.
Is that the only way? :(

Posted: 06 Oct 2007, 17:19
by trepan

Code: Select all

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--
--  file:    gui_no_mouse.lua
--  brief:   removes the mouse cursor
--  author:  Dave Rodgers
--
--  Copyright (C) 2007.
--  Licensed under the terms of the GNU GPL, v2 or later.
--
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

function widget:GetInfo()
  return {
    name      = "NoMouse",      
    desc      = "Removes the mouse cursor",                               
    author    = "trepan",
    date      = "Oct 06, 2007",      
    license   = "GNU GPL, v2 or later",
    layer     = 99,    -- late drawing 
    enabled   = false  --  loaded by default?
  }
end

--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

function widget:DrawScreen()                                     
  Spring.SetMouseCursor('none')
end  
     
     
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------

Posted: 06 Oct 2007, 17:34
by trepan
And here's a version that allows you to use a text action:
http://trepan.bzflag.bz/spring/gui_no_mouse.lua

Use /luaui nomouse to toggle the display state (you could also bind
it to a keyset for easier access). The default state is to have the mouse
cursor visible in this version. That makes it easier to always have the
widget enabled (so that it can receive the 'nomouse' command, but not
have the mouse hiding ability enabled).

Posted: 06 Oct 2007, 17:35
by TradeMark
rotfl "Licensed under the terms of the GNU GPL, v2 or later."

one line of code XD

Posted: 06 Oct 2007, 17:40
by trepan
1. The second version has more than one line of code ;-)
2. Helluva lot easier to use than your trick, heh?

Posted: 06 Oct 2007, 18:20
by TradeMark
trepan wrote:2. Helluva lot easier to use than your trick, heh?
Yeah, i said it just because i wanted someone to make easier way :D

Posted: 07 Oct 2007, 10:15
by Pendrokar
Well a lua widget wasn't what I was looking for BUT WHO CARES! Thanks! :-)

Posted: 08 Oct 2007, 08:13
by Neuralize
Is there a lua widget that removes the mouse3 click crosshair? That is really want I need to be gone to make a decent video.

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 12:15
by Jazcash
Image

Trepans link to the second version is broked so I can't see if that works for what I need it for. Basically I just need a completely clear GUI with no healthbars, cursor or anything else that isn't the actual game.

I came across this whilst searching to see how I could hide the cursor. This only hides the cursor when the GUI is showing and I need it to hide the "Specrun" crosshair anyways....

What would be totally awesome is a widget which just auto hides everything that isn't the actual game when a certain key is pressed.

And if anybody could link me to trepans second version, that would be +10

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 14:29
by Master-Athmos
Actually you don't need any Lua at all as there is a command you type in which hides the crosshair cursor on the middle mouse button. Unfortunately I don't remember it right now...

EDIT:
/cross it is... :-)

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 14:40
by Jazcash
Hmm actually, I suppose I'll have to ask Regret if he could implement an option to hide the reticle as it's all drawn within the widget itself I guess...

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 15:17
by Jazcash
Hmm ok. So now I can have the cursor gone in every view apart from when Specmode is on and F5 is pressed to hide the GUI. I just have a dodgy cursor in the middle of the screen.

Imo F5 should completely get rid of everything not-part-of-the-game including the cursor.

Regret's done some tweaking to his widget but he's just managed to get rid of the green crosshair :( I would've thought this would have to be an engine change but I'm no coder so I guess there's still hope of a fix-widget :D

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 16:52
by Auswaschbar
Hide without using lua or any special tricks:
Press middle mouse button to go into cross mode -> "/cross 0"

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 17:06
by MelTraX
Btw, you could write a widget that temporarily overrides the widget handler Draw* methods with empty ones. That would disable everything drawn by LuaUI. Wouldn't hide the cursor or the default interface though.

Re: Help: How can I hide mouse cursor ingame?

Posted: 17 Aug 2009, 17:14
by Auswaschbar
MelTraX wrote:Btw, you could write a widget that temporarily overrides the widget handler Draw* methods with empty ones. That would disable everything drawn by LuaUI. Wouldn't hide the cursor or the default interface though.
Or you could press F5, wich hides everything (including Lua)