Utility/SimpleTextDrawer: Fix movement

Former-commit-id: f5086d1ca281f31a3b89d5cd535f9aeaa9b2a929
This commit is contained in:
Lynix
2015-08-19 23:23:19 +02:00
parent 2b48917176
commit 831b9358ef
2 changed files with 50 additions and 13 deletions

View File

@@ -19,7 +19,7 @@ class NAZARA_UTILITY_API NzSimpleTextDrawer : public NzAbstractTextDrawer
public:
NzSimpleTextDrawer();
NzSimpleTextDrawer(const NzSimpleTextDrawer& drawer);
NzSimpleTextDrawer(NzSimpleTextDrawer&&) = default;
NzSimpleTextDrawer(NzSimpleTextDrawer&& drawer);
virtual ~NzSimpleTextDrawer();
const NzRectui& GetBounds() const;
@@ -39,10 +39,15 @@ class NAZARA_UTILITY_API NzSimpleTextDrawer : public NzAbstractTextDrawer
void SetStyle(nzUInt32 style);
void SetText(const NzString& str);
NzSimpleTextDrawer& operator=(const NzSimpleTextDrawer& drawer) = default;
NzSimpleTextDrawer& operator=(NzSimpleTextDrawer&& drawer);
static NzSimpleTextDrawer Draw(const NzString& str, unsigned int characterSize, nzUInt32 style = nzTextStyle_Regular, const NzColor& color = NzColor::White);
static NzSimpleTextDrawer Draw(NzFont* font, const NzString& str, unsigned int characterSize, nzUInt32 style = nzTextStyle_Regular, const NzColor& color = NzColor::White);
private:
void ConnectFontSlots();
void DisconnectFontSlots();
void OnFontAtlasLayerChanged(const NzFont* font, NzAbstractImage* oldLayer, NzAbstractImage* newLayer);
void OnFontInvalidated(const NzFont* font);
void OnFontRelease(const NzFont* object);