WIP
This commit is contained in:
committed by
Jérôme Leclercq
parent
481702c109
commit
05c78da22a
@@ -30,7 +30,23 @@ namespace Nz
|
||||
inline void ImageWidget::SetMaterial(const std::shared_ptr<Material>& texture)
|
||||
{
|
||||
m_sprite->SetMaterial(texture);
|
||||
UpdatePreferredSize();
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureCoords(const Rectf& coords)
|
||||
{
|
||||
m_sprite->SetTextureCoords(coords);
|
||||
UpdatePreferredSize();
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureRect(const Rectf& rect)
|
||||
{
|
||||
m_sprite->SetTextureRect(rect);
|
||||
UpdatePreferredSize();
|
||||
}
|
||||
|
||||
inline void ImageWidget::UpdatePreferredSize()
|
||||
{
|
||||
const Rectf& textureCoords = GetTextureCoords();
|
||||
|
||||
Vector2f textureSize = Vector2f(Vector2ui(m_sprite->GetTextureSize()));
|
||||
@@ -39,16 +55,6 @@ namespace Nz
|
||||
|
||||
SetPreferredSize(textureSize);
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureCoords(const Rectf& coords)
|
||||
{
|
||||
m_sprite->SetTextureCoords(coords);
|
||||
}
|
||||
|
||||
inline void ImageWidget::SetTextureRect(const Rectf& rect)
|
||||
{
|
||||
m_sprite->SetTextureRect(rect);
|
||||
}
|
||||
}
|
||||
|
||||
#include <Nazara/Widgets/DebugOff.hpp>
|
||||
|
||||
Reference in New Issue
Block a user