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. 14
      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 );
IUpdateCursorSize();
fCursor->SetVisible( true );
fCursor->SetVisible(!bCursorHidden);
fCursor->SetOpacity( fOpacity );
}
@ -510,9 +510,6 @@ void plMouseDevice::NewCursor(char* cursor)
fInstance->CreateCursor(cursor);
fInstance->SetCursorX(fInstance->GetCursorX());
fInstance->SetCursorY(fInstance->GetCursorY());
if (!plMouseDevice::bCursorHidden)
fInstance->fCursor->SetVisible( true );
}
void plMouseDevice::SetCursorOpacity( hsScalar opacity )

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

@ -253,15 +253,13 @@ void plInputInterfaceMgr::IUpdateCursor( Int32 newCursor )
{
char* mouseCursorResID;
fCurrentCursor = newCursor;
if( fCurrentCursor == plInputInterface::kCursorHidden )
if (newCursor == plInputInterface::kCursorHidden) {
plMouseDevice::HideCursor();
else
{
} else {
if (fCurrentCursor == plInputInterface::kCursorHidden)
plMouseDevice::ShowCursor();
switch( fCurrentCursor )
switch(newCursor)
{
case plInputInterface::kCursorUp: mouseCursorResID = CURSOR_UP; 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::kCursorUpward: mouseCursorResID = CURSOR_UPWARD; break;
default: mouseCursorResID = CURSOR_OPEN; break;
}
plMouseDevice::NewCursor(mouseCursorResID);
}
fCurrentCursor = newCursor;
}
//// IEval ///////////////////////////////////////////////////////////////////

Loading…
Cancel
Save