You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ADE_VIRTVAR(Filename, l_Font, "string", "Name of font (including extension)<br><b>Important:</b>This variable is deprecated. Use <i>Name</i> instead.", "string", NULL)
63
+
ADE_VIRTVAR(Filename, l_Font, "string", "Name of font (including extension)<br><b>Important:</b>This variable is deprecated. Use <i>Name</i> instead.", "string", nullptr)
64
64
{
65
-
font_h *fh = NULL;
65
+
font_h* fh = nullptr;
66
66
constchar* newname = nullptr;
67
67
if (!ade_get_args(L, "o|s", l_Font.GetPtr(&fh), &newname))
68
68
returnade_set_error(L, "s", "");
@@ -78,9 +78,9 @@ ADE_VIRTVAR(Filename, l_Font, "string", "Name of font (including extension)<br><
ADE_VIRTVAR(Name, l_Font, "string", "Name of font (including extension)", "string", NULL)
81
+
ADE_VIRTVAR(Name, l_Font, "string", "Name of font (including extension)", "string", nullptr)
82
82
{
83
-
font_h *fh = NULL;
83
+
font_h* fh = nullptr;
84
84
constchar* newname = nullptr;
85
85
if (!ade_get_args(L, "o|s", l_Font.GetPtr(&fh), &newname))
86
86
returnade_set_error(L, "s", "");
@@ -116,7 +116,7 @@ ADE_VIRTVAR(FamilyName, l_Font, "string", "Family Name of font. Bitmap fonts alw
116
116
117
117
ADE_VIRTVAR(Height, l_Font, "number", "Height of font (in pixels)", "number", "Font height, or 0 if the handle is invalid")
118
118
{
119
-
font_h *fh = NULL;
119
+
font_h* fh = nullptr;
120
120
int newheight = -1;
121
121
if (!ade_get_args(L, "o|i", l_Font.GetPtr(&fh), &newheight))
122
122
returnade_set_error(L, "i", 0);
@@ -134,7 +134,7 @@ ADE_VIRTVAR(Height, l_Font, "number", "Height of font (in pixels)", "number", "F
134
134
135
135
ADE_VIRTVAR(TopOffset, l_Font, "number", "The offset this font has from the baseline of textdrawing downwards. (in pixels)", "number", "Font top offset, or 0 if the handle is invalid")
136
136
{
137
-
font_h *fh = NULL;
137
+
font_h* fh = nullptr;
138
138
float newOffset = -1;
139
139
if (!ade_get_args(L, "o|f", l_Font.GetPtr(&fh), &newOffset))
140
140
returnade_set_error(L, "f", 0.0f);
@@ -152,7 +152,7 @@ ADE_VIRTVAR(TopOffset, l_Font, "number", "The offset this font has from the base
152
152
153
153
ADE_VIRTVAR(BottomOffset, l_Font, "number", "The space (in pixels) this font skips downwards after drawing a line of text", "number", "Font bottom offset, or 0 if the handle is invalid")
154
154
{
155
-
font_h *fh = NULL;
155
+
font_h* fh = nullptr;
156
156
float newOffset = -1;
157
157
if (!ade_get_args(L, "o|f", l_Font.GetPtr(&fh), &newOffset))
158
158
returnade_set_error(L, "f", 0.0f);
@@ -168,7 +168,25 @@ ADE_VIRTVAR(BottomOffset, l_Font, "number", "The space (in pixels) this font ski
ADE_FUNC(isValid, l_Font, NULL, "True if valid, false or nil if not", "boolean", "Detects whether handle is valid")
171
+
ADE_FUNC(hasAutoSize, l_Font, nullptr, "True if FSO will auto size this font, false or nil if not", "boolean", "Detects whether the font has Auto Size activated")
ADE_FUNC(hasCanScale, l_Font, nullptr, "True if this font is allowed to scale based on user settings, false or nil if not", "boolean", "Detects whether the font can scale")
0 commit comments