Move SDK include and source to base
This commit is contained in:
47
include/NazaraSDK/Widgets/ImageWidget.inl
Normal file
47
include/NazaraSDK/Widgets/ImageWidget.inl
Normal file
@@ -0,0 +1,47 @@
|
||||
// Copyright (C) 2017 Samy Bensaid
|
||||
// This file is part of the "Nazara Development Kit"
|
||||
// For conditions of distribution and use, see copyright notice in Prerequisites.hpp
|
||||
|
||||
#include <NazaraSDK/Widgets/ImageWidget.hpp>
|
||||
|
||||
namespace Ndk
|
||||
{
|
||||
inline const Nz::Color& ImageWidget::GetColor() const
|
||||
{
|
||||
return m_sprite->GetColor();
|
||||
}
|
||||
|
||||
inline const Nz::TextureRef& ImageWidget::GetTexture() const
|
||||
{
|
||||
return m_sprite->GetMaterial()->GetDiffuseMap();
|
||||
}
|
||||
|
||||
inline const Nz::Rectf& ImageWidget::GetTextureCoords() const
|
||||
{
|
||||
return m_sprite->GetTextureCoords();
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetColor(const Nz::Color& color)
|
||||
{
|
||||
m_sprite->SetColor(color);
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTexture(const Nz::TextureRef& texture)
|
||||
{
|
||||
m_sprite->SetTexture(texture, false);
|
||||
|
||||
Nz::Vector2f textureSize = Nz::Vector2f(Nz::Vector2ui(m_sprite->GetMaterial()->GetDiffuseMap()->GetSize()));
|
||||
SetMinimumSize(textureSize);
|
||||
SetPreferredSize(textureSize);
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureCoords(const Nz::Rectf& coords)
|
||||
{
|
||||
m_sprite->SetTextureCoords(coords);
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureRect(const Nz::Rectui& rect)
|
||||
{
|
||||
m_sprite->SetTextureRect(rect);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user