mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add default parameters to Text
and TextEx
This commit is contained in:
parent
f0c295b2d3
commit
a160364b77
|
@ -823,7 +823,7 @@ public:
|
|||
pCursor->m_Y = y;
|
||||
}
|
||||
|
||||
void Text(float x, float y, float Size, const char *pText, float LineWidth) override
|
||||
void Text(float x, float y, float Size, const char *pText, float LineWidth = -1.0f) override
|
||||
{
|
||||
CTextCursor Cursor;
|
||||
SetCursor(&Cursor, x, y, Size, TEXTFLAG_RENDER);
|
||||
|
@ -918,7 +918,7 @@ public:
|
|||
return m_SelectionColor;
|
||||
}
|
||||
|
||||
void TextEx(CTextCursor *pCursor, const char *pText, int Length) override
|
||||
void TextEx(CTextCursor *pCursor, const char *pText, int Length = -1) override
|
||||
{
|
||||
const unsigned OldRenderFlags = m_RenderFlags;
|
||||
m_RenderFlags |= TEXT_RENDER_FLAG_ONE_TIME_USE;
|
||||
|
|
|
@ -229,7 +229,7 @@ public:
|
|||
ColorRGBA DefaultSelectionColor() const { return ColorRGBA(0, 0, 1.0f, 1.0f); }
|
||||
|
||||
//
|
||||
virtual void TextEx(CTextCursor *pCursor, const char *pText, int Length) = 0;
|
||||
virtual void TextEx(CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
|
||||
virtual bool CreateTextContainer(int &TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
|
||||
virtual void AppendTextContainer(int TextContainerIndex, CTextCursor *pCursor, const char *pText, int Length = -1) = 0;
|
||||
// either creates a new text container or appends to a existing one
|
||||
|
@ -262,7 +262,7 @@ public:
|
|||
virtual void TextOutlineColor(ColorRGBA rgb) = 0;
|
||||
virtual void TextSelectionColor(float r, float g, float b, float a) = 0;
|
||||
virtual void TextSelectionColor(ColorRGBA rgb) = 0;
|
||||
virtual void Text(float x, float y, float Size, const char *pText, float LineWidth) = 0;
|
||||
virtual void Text(float x, float y, float Size, const char *pText, float LineWidth = -1.0f) = 0;
|
||||
virtual float TextWidth(float Size, const char *pText, int StrLength = -1, float LineWidth = -1.0f, int Flags = 0, float *pHeight = nullptr, float *pAlignedFontSize = nullptr, float *pMaxCharacterHeightInLine = nullptr) = 0;
|
||||
virtual STextBoundingBox TextBoundingBox(float Size, const char *pText, int StrLength = -1, float LineWidth = -1.0f, int Flags = 0) = 0;
|
||||
virtual vec2 CaretPosition(float Size, const char *pText, int StrLength = -1, float LineWidth = -1.0f, int Flags = 0) = 0;
|
||||
|
|
Loading…
Reference in a new issue