Sdk/Widget: Add Canvas system, mouse movement event for widgets (buttons react to hovering)
Former-commit-id: 685295853d1f0edf28c36b2f698eca881da25ea2 [formerly f65f951ed3d2edfd9c12d390837cd13e5691eaa3] [formerly 5e239f37c28bf5e93a71cba29a94f0de680a79a2 [formerly 38346fa5d68c7bf79ddebc1990959e7c56617640]] Former-commit-id: 92da4ed40fb63fe0b02c7543ea64cebda0575623 [formerly 2db1fe5fca87a1461ceb8314709d764af079a7be] Former-commit-id: 77d61a99fd5a2bb21701fbe4a4b4451c3655663a
This commit is contained in:
22
SDK/include/NDK/Canvas.inl
Normal file
22
SDK/include/NDK/Canvas.inl
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright (C) 2015 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Development Kit"
|
||||
// For conditions of distribution and use, see copyright notice in Prerequesites.hpp
|
||||
|
||||
#include <NDK/Canvas.hpp>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
inline Canvas::Canvas(WorldHandle world, Nz::EventHandler& eventHandler) :
|
||||
m_hoveredWidget(nullptr),
|
||||
m_world(std::move(world))
|
||||
{
|
||||
m_canvas = this;
|
||||
|
||||
m_mouseMovedSlot.Connect(eventHandler.OnMouseMoved, this, &Canvas::OnMouseMoved);
|
||||
}
|
||||
|
||||
inline const WorldHandle& Canvas::GetWorld() const
|
||||
{
|
||||
return m_world;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user