mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-10 08:23:22 +00:00
Fix font bounds calculation
BitmapFont::getActualWidth() is still a bit less than getStringWidth(), but won't fix that now since it shouldn't cause any issues... hopefully.
This commit is contained in:
parent
d41375d5d2
commit
26549f84b7
11 changed files with 118 additions and 73 deletions
|
@ -10,12 +10,12 @@ public:
|
|||
BaseText() { addType(SCO_TEXT); }
|
||||
virtual ~BaseText() {}
|
||||
virtual void setText(const std::string& text) = 0;
|
||||
virtual void setWidth(int width) = 0;
|
||||
virtual void setFontSize(int sz) = 0;
|
||||
virtual void setWidth(float width) = 0;
|
||||
virtual void setFontSize(float sz) = 0;
|
||||
virtual void setAlign(Align a) = 0;
|
||||
virtual float getHeight() = 0;
|
||||
virtual float getStringWidth(const std::string& text) = 0;
|
||||
|
||||
virtual float getHeight() = 0; // total height
|
||||
virtual float getStringWidth(const std::string& text) = 0; // width of string when not auto-wrapped
|
||||
virtual float getActualWidth() = 0; // width of text after wrapping
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue