//----------------------------------------------------
		//----------------------------------------------------
		void PointerSystem::OnTouchDown(s32 in_systemId, const ChilliSource::Vector2& in_location)
		{
			ChilliSource::Vector2 touchLocation(in_location.x, m_screen->GetResolution().y - in_location.y);
			ChilliSource::Pointer::Id pointerId = AddPointerCreateEvent(touchLocation);
			AddPointerDownEvent(pointerId, ChilliSource::Pointer::InputType::k_touch);
			m_systemIdToPointerIdMap.emplace(in_systemId, pointerId);
		}
示例#2
0
		//----------------------------------------------
		//----------------------------------------------
		void PointerSystem::OnMouseButtonEvent(sf::Mouse::Button in_button, SFMLWindow::MouseButtonEvent in_event, s32 in_xPos, s32 in_yPos)
		{
            ChilliSource::Pointer::InputType type = ButtonIdToInputType(in_button);
            if (type == ChilliSource::Pointer::InputType::k_none)
            {
                return;
            }

            switch (in_event)
            {
            case SFMLWindow::MouseButtonEvent::k_pressed:
                AddPointerDownEvent(m_pointerId, type);
                break;
            case SFMLWindow::MouseButtonEvent::k_released:
                AddPointerUpEvent(m_pointerId, type);
                break;
            }
		}