Utility/Font: Replace Listener system by Signals
Former-commit-id: 0391c506c039c7aeb7acf4a01faa8a979be16749
This commit is contained in:
@@ -95,15 +95,6 @@ class NAZARA_API NzFont : public NzRefCounted, public NzResource, NzNonCopyable
|
||||
static void SetDefaultGlyphBorder(unsigned int borderSize);
|
||||
static void SetDefaultMinimumStepSize(unsigned int minimumStepSize);
|
||||
|
||||
enum ModicationCode
|
||||
{
|
||||
ModificationCode_AtlasChanged,
|
||||
ModificationCode_AtlasLayerChanged,
|
||||
ModificationCode_GlyphCacheCleared,
|
||||
ModificationCode_KerningCacheCleared,
|
||||
ModificationCode_SizeInfoCacheCleared
|
||||
};
|
||||
|
||||
struct Glyph
|
||||
{
|
||||
NzRecti aabb;
|
||||
@@ -124,6 +115,13 @@ class NAZARA_API NzFont : public NzRefCounted, public NzResource, NzNonCopyable
|
||||
float underlineThickness;
|
||||
};
|
||||
|
||||
NazaraSignal(OnFontAtlasChanged, const NzFont*); //< Args: me
|
||||
NazaraSignal(OnFontAtlasLayerChanged, const NzFont*); //< Args: me
|
||||
NazaraSignal(OnFontGlyphCacheCleared, const NzFont*); //< Args: me
|
||||
NazaraSignal(OnFontKerningCacheCleared, const NzFont*); //< Args: me
|
||||
NazaraSignal(OnFontRelease, const NzFont*); //< Args: me
|
||||
NazaraSignal(OnFontSizeInfoCacheCleared, const NzFont*); //< Args: me
|
||||
|
||||
private:
|
||||
using GlyphMap = std::unordered_map<char32_t, Glyph>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user