mirror of
https://github.com/glest/glest-source.git
synced 2025-08-11 19:04:00 +02:00
Fix issue #116 - when fonts deleted and reloaded signal back immediately to all registered controls to refresh their font
This commit is contained in:
@@ -22,7 +22,7 @@ using std::string;
|
||||
//class Text;
|
||||
|
||||
namespace Shared { namespace Graphics {
|
||||
|
||||
|
||||
// =====================================================
|
||||
// class FontMetrics
|
||||
// =====================================================
|
||||
@@ -90,6 +90,7 @@ protected:
|
||||
FontMetrics metrics;
|
||||
|
||||
Text *textHandler;
|
||||
string fontUniqueId;
|
||||
|
||||
public:
|
||||
//constructor & destructor
|
||||
@@ -97,6 +98,9 @@ public:
|
||||
virtual ~Font();
|
||||
virtual void init()=0;
|
||||
virtual void end()=0;
|
||||
|
||||
void setFontUniqueId(string id) { fontUniqueId = id; }
|
||||
string getFontUniqueId() { return fontUniqueId; }
|
||||
|
||||
//get
|
||||
int getWidth() const;
|
||||
@@ -147,6 +151,12 @@ Font3D *ConvertFont2DTo3D(Font2D *font);
|
||||
|
||||
const char* findFont(const char *firstFontToTry=NULL,const char *firstFontFamilyToTry=NULL);
|
||||
|
||||
class FontChangedCallbackInterface {
|
||||
public:
|
||||
virtual void FontChangedCallback(std::string fontUniqueId, Font *font) = 0;
|
||||
virtual ~FontChangedCallbackInterface() {};
|
||||
};
|
||||
|
||||
}}//end namespace
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user