Sdk/Canvas: Add basic keyboard handler
This commit is contained in:
@@ -8,6 +8,7 @@ namespace Ndk
|
||||
{
|
||||
inline Canvas::Canvas(WorldHandle world, Nz::EventHandler& eventHandler) :
|
||||
m_hoveredWidget(nullptr),
|
||||
m_keyboardOwner(nullptr),
|
||||
m_world(std::move(world))
|
||||
{
|
||||
m_canvas = this;
|
||||
@@ -16,10 +17,16 @@ namespace Ndk
|
||||
m_mouseButtonReleasedSlot.Connect(eventHandler.OnMouseButtonReleased, this, &Canvas::OnMouseButtonRelease);
|
||||
m_mouseMovedSlot.Connect(eventHandler.OnMouseMoved, this, &Canvas::OnMouseMoved);
|
||||
m_mouseLeftSlot.Connect(eventHandler.OnMouseLeft, this, &Canvas::OnMouseLeft);
|
||||
m_textEnteredSlot.Connect(eventHandler.OnTextEntered, this, &Canvas::OnTextEntered);
|
||||
}
|
||||
|
||||
inline const WorldHandle& Canvas::GetWorld() const
|
||||
{
|
||||
return m_world;
|
||||
}
|
||||
|
||||
inline void Ndk::Canvas::SetKeyboardOwner(BaseWidget* widget)
|
||||
{
|
||||
m_keyboardOwner = widget;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user