Browse Source

Don't update to visible arrow when cursor should be hidden

tickets/37/37/1
Adam Johnson 3 years ago committed by ZarothYe
parent
commit
51b6b4750b
  1. 5
      Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp
  2. 16
      Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp

5
Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp

@ -408,7 +408,7 @@ void plMouseDevice::CreateCursor( char* cursor )
fCursor->SetPosition( 0, 0, 0 ); fCursor->SetPosition( 0, 0, 0 );
IUpdateCursorSize(); IUpdateCursorSize();
fCursor->SetVisible( true ); fCursor->SetVisible(!bCursorHidden);
fCursor->SetOpacity( fOpacity ); fCursor->SetOpacity( fOpacity );
} }
@ -510,9 +510,6 @@ void plMouseDevice::NewCursor(char* cursor)
fInstance->CreateCursor(cursor); fInstance->CreateCursor(cursor);
fInstance->SetCursorX(fInstance->GetCursorX()); fInstance->SetCursorX(fInstance->GetCursorX());
fInstance->SetCursorY(fInstance->GetCursorY()); fInstance->SetCursorY(fInstance->GetCursorY());
if (!plMouseDevice::bCursorHidden)
fInstance->fCursor->SetVisible( true );
} }
void plMouseDevice::SetCursorOpacity( hsScalar opacity ) void plMouseDevice::SetCursorOpacity( hsScalar opacity )

16
Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp

@ -253,15 +253,13 @@ void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
{ {
char* mouseCursorResID; char* mouseCursorResID;
if (newCursor == plInputInterface::kCursorHidden) {
fCurrentCursor = newCursor;
if( fCurrentCursor == plInputInterface::kCursorHidden )
plMouseDevice::HideCursor(); plMouseDevice::HideCursor();
else } else {
{ if (fCurrentCursor == plInputInterface::kCursorHidden)
plMouseDevice::ShowCursor(); plMouseDevice::ShowCursor();
switch( fCurrentCursor ) switch(newCursor)
{ {
case plInputInterface::kCursorUp: mouseCursorResID = CURSOR_UP; break; case plInputInterface::kCursorUp: mouseCursorResID = CURSOR_UP; break;
case plInputInterface::kCursorLeft: mouseCursorResID = CURSOR_LEFT; break; case plInputInterface::kCursorLeft: mouseCursorResID = CURSOR_LEFT; break;
@ -286,12 +284,12 @@ void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
case plInputInterface::kCursorHand: mouseCursorResID = CURSOR_HAND; break; case plInputInterface::kCursorHand: mouseCursorResID = CURSOR_HAND; break;
case plInputInterface::kCursorUpward: mouseCursorResID = CURSOR_UPWARD; break; case plInputInterface::kCursorUpward: mouseCursorResID = CURSOR_UPWARD; break;
default: mouseCursorResID = CURSOR_OPEN; break; default: mouseCursorResID = CURSOR_OPEN; break;
} }
plMouseDevice::NewCursor(mouseCursorResID);
plMouseDevice::NewCursor( mouseCursorResID );
} }
fCurrentCursor = newCursor;
} }
//// IEval /////////////////////////////////////////////////////////////////// //// IEval ///////////////////////////////////////////////////////////////////

Loading…
Cancel
Save