Browse Source

Merge branch 'ticket/37'

closes #37
tickets/37/37/2
rarified 3 years ago
parent
commit
b9af23e458
  1. 5
      Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp
  2. 18
      Sources/Plasma/PubUtilLib/plInputCore/plInputInterfaceMgr.cpp

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

@ -406,7 +406,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 );
} }
@ -508,9 +508,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 )

18
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