Custom cursor still displays hardware cursor
by Tetraweb · in Torque Game Builder · 10/01/2007 (4:55 pm) · 26 replies
I noted this elsewhere, but I think it is a true bug so I am noting it here as well.
I have only tested this on the Mac so far, but when setting a custom GuiCursor, I get both the custom cursor displayed and the Mac's hardware cursor displays on top of it. The same code worked as expected in 1.1.3
Will test on PC tomorrow.
Greg
I have only tested this on the Mac so far, but when setting a custom GuiCursor, I get both the custom cursor displayed and the Mac's hardware cursor displays on top of it. The same code worked as expected in 1.1.3
Will test on PC tomorrow.
Greg
#2
Results in the hand being drawn under the traditional pointer. Very annoying. Also, the hand doesn't show up at all unless I call Canvas.showcursor(); somewhere, for now I stuck it in my GUI's onWake()
11/11/2007 (10:18 am)
Have this same problem on PC / windows. new GuiCursor(HandCursor)
{
hotspot = "0 0";
renderOffset = "0 0";
bitmapName = "~/gui/images/CUR_hand";
};Canvas.setCursor(HandCursor);
Results in the hand being drawn under the traditional pointer. Very annoying. Also, the hand doesn't show up at all unless I call Canvas.showcursor(); somewhere, for now I stuck it in my GUI's onWake()
#3
Greg
12/14/2007 (6:03 pm)
Bug still exists on 1.6, to my dismay. Custom cursor displayed with hardware cursor on top. Can anyone from GG verify this bug, and that it has unfortunately not been addresses in 1.6.Greg
#4
Greg
01/02/2008 (5:53 pm)
Any employee that can respond to this thread would be appreciated. Even a "I don't know" would be better than nothing.Greg
#5
If any GG employee could respond that would be great.
Greg
01/31/2008 (3:03 am)
Still this bug persists. Introduced in 1.5, and unfixed in 1.5.1, then 1.6, then 1.7.If any GG employee could respond that would be great.
Greg
#6
01/31/2008 (1:39 pm)
If you can whip up a quick project demonstrating the issue and send it to me (addy in my profile) I'll take a look at it.
#7
Greg
[Edit]
While you're in there, the new Vector Object doesn't work in 1.7 for Mac either. Trying to drag one onto the scene in the editor fails with errors in the console.
02/01/2008 (3:32 am)
Sent you a zipped test project. Thanks.Greg
[Edit]
While you're in there, the new Vector Object doesn't work in 1.7 for Mac either. Trying to drag one onto the scene in the editor fails with errors in the console.
#8
Step 1: GuiCanvas::setCursor (which can be found around line 305 of guiCanvass.cc) should be changed to this
Step 2: In macCarbEvents.cc, add
right after
Step 3: Again in macCarbEvents.cc, find void MacCarbCheckHideCursor (around line 54, it will be commented out)
Uncomment it, and change it to
Step 4: Again in macCarbEvents.cc, find _OnMouseMovedDragged (around line 215). At the end of the first if block, change
to
to
Step 5: Enjoy your hidden platform cursors which magically reappear when the mouse leaves the TGB window.
Note that this changes only affect the TGBGame versions of TGB, not the editor. I assume that's not really an issue. Also note that I have no clue what this'll do on Windows (beyond probably hide the platform cursor in games).
02/01/2008 (8:48 pm)
Rightyo.Step 1: GuiCanvas::setCursor (which can be found around line 305 of guiCanvass.cc) should be changed to this
void GuiCanvas::setCursor(GuiCursor *curs)
{
defaultCursor = curs;
if(mShowCursor)
Input::setCursorState(false);
}Step 2: In macCarbEvents.cc, add
#include "platformMacCarb/cocoaUtils.h"
right after
#include "platformMacCarb/platformMacCarb.h"
Step 3: Again in macCarbEvents.cc, find void MacCarbCheckHideCursor (around line 54, it will be commented out)
Uncomment it, and change it to
void MacCarbCheckHideCursor(S32 x=-1, S32 y=-1)
{
#ifndef TORQUE_TOOLS
bool shouldHide = false;
if(platState.mouseLocked || Video::isFullScreen())
{
shouldHide = true;
}
else
{
Point2I win = Platform::getWindowSize();
if(x >=0 && y>=0 && x<= win.x && y<= win.y)
shouldHide = true;
}
PlatStateMac::get().setHideCursor(shouldHide && !platState.minimized, true);
#endif
}Step 4: Again in macCarbEvents.cc, find _OnMouseMovedDragged (around line 215). At the end of the first if block, change
// we now use a native cursor, no need to hide it here. MacCarbCheckHideCursor();
to
MacCarbCheckHideCursor();At the end of the final else block, change
// we now use a native cursor, no need to hide it here. MacCarbCheckHideCursor();
to
MacCarbCheckHideCursor(where.h, where.v);
Step 5: Enjoy your hidden platform cursors which magically reappear when the mouse leaves the TGB window.
Note that this changes only affect the TGBGame versions of TGB, not the editor. I assume that's not really an issue. Also note that I have no clue what this'll do on Windows (beyond probably hide the platform cursor in games).
#9
Greg
02/02/2008 (2:59 am)
Thanks, but I don't have access to the source. I don't suppose you got this fix into the 1.7.1 release?Greg
#10
02/02/2008 (10:18 am)
Nope. I'm not part of the TGB team. I'll see what I can do though.
#13
I've just released my game "Yard Sale Junkie" PC on some major portals.
I'm having the same mouse cursor problem with the Mac version.
Did you happen to find a workaround it? I've been looking around trying to figure it out.
I won't be able to launch it with this bug and suppose to deliver the mac version this week.
ouch!!!!
05/27/2008 (3:08 pm)
Hi Tetraweb,I've just released my game "Yard Sale Junkie" PC on some major portals.
I'm having the same mouse cursor problem with the Mac version.
Did you happen to find a workaround it? I've been looking around trying to figure it out.
I won't be able to launch it with this bug and suppose to deliver the mac version this week.
ouch!!!!
#14
There is no non-source workaround.
Greg
05/27/2008 (6:45 pm)
If you have the source, the fix in this thread probably works. I have been talking to TGB about this simple to fix bug for 5 consecutive releases, to no avail. There is no non-source workaround.
Greg
#15
it works.
Thanks Alex.
05/28/2008 (3:06 pm)
I just bought TGB Pro and used the code provided by Alex to fix it.it works.
Thanks Alex.
#16
Greg
05/28/2008 (4:52 pm)
Unfortunately, if past trends hold true for future releases, you will have to do the same fix and recompile for the next five releases.Greg
#17
05/29/2008 (11:58 am)
You could try making a new thread to get some attention.
#18
06/17/2008 (10:17 am)
So, this occurs on both Mac and PC? We are looking into it guys.
#19
I used the fix provided by Alex and it worked.
Eyal.
06/17/2008 (10:28 am)
For me it only occurs on MAC. I used the fix provided by Alex and it worked.
Eyal.
#20
06/18/2008 (1:37 pm)
Tetraweb, I have sent you an email. We have the fix rolled into a build now and I wanted to get a hold of the test project that you sent to Alex Scarborough.
Torque Owner Tetraweb
Greg