Engine/src/Graphics/DX12/ApplicationDX12.cpp
// Convert the message ID into a MouseButton ID
Convert the message ID into a MouseButton ID
Convert the message ID into a MouseButton ID
static MouseButton DecodeMouseButton( UINT messageID )
{
    MouseButton mouseButton = MouseButton::None;
    switch ( messageID )
    {
    case WM_LBUTTONDOWN:
    case WM_LBUTTONUP:
    case WM_LBUTTONDBLCLK:
    {
        mouseButton = MouseButton::Left;
    }
    break;
    case WM_RBUTTONDOWN:
    case WM_RBUTTONUP:
    case WM_RBUTTONDBLCLK:
    {
        mouseButton = MouseButton::Right;
    }
    break;
    case WM_MBUTTONDOWN:
    case WM_MBUTTONUP:
    case WM_MBUTTONDBLCLK:
    {
        mouseButton = MouseButton::Middel;
    }
    break;
    }
    return mouseButton;
}
static MouseButton DecodeMouseButton ( UINT messageID ) { MouseButton mouseButton = MouseButton :: None ; switch ( messageID ) { case WM_LBUTTONDOWN : case WM_LBUTTONUP : case WM_LBUTTONDBLCLK : { mouseButton = MouseButton :: Left ; } break ; case WM_RBUTTONDOWN : case WM_RBUTTONUP : case WM_RBUTTONDBLCLK : { mouseButton = MouseButton :: Right ; } break ; case WM_MBUTTONDOWN : case WM_MBUTTONUP : case WM_MBUTTONDBLCLK : { mouseButton = MouseButton :: Middel ; } break ; } return mouseButton ; }
Convert the message ID into a MouseButton ID
Convert the message ID into a MouseButton ID