1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
|
---@meta
---@class cc.Label :cc.Node@all parent class: Node,LabelProtocol,BlendProtocol
local Label={ }
cc.Label=Label
---*
---@return boolean
function Label:isClipMarginEnabled () end
---* Enable shadow effect to Label.<br>
---* todo Support blur for shadow effect.
---@return self
function Label:enableShadow () end
---* Sets the untransformed size of the Label in a more efficient way.
---@param width float
---@param height float
---@return self
function Label:setDimensions (width,height) end
---*
---@return float
function Label:getWidth () end
---* Return the text the Label is currently displaying.
---@return string
function Label:getString () end
---*
---@return float
function Label:getHeight () end
---@overload fun(int:int):self
---@overload fun():self
---@param effect int
---@return self
function Label:disableEffect (effect) end
---* Sets a new TTF configuration to Label.<br>
---* see `TTFConfig`
---@param ttfConfig cc._ttfConfig
---@return boolean
function Label:setTTFConfig (ttfConfig) end
---* Returns type of label<br>
---* warning Not support system font.<br>
---* return the type of label<br>
---* since v3.18.0
---@return int
function Label:getLabelType () end
---* Returns the text color of the Label.
---@return color4b_table
function Label:getTextColor () end
---*
---@return cc.BlendFunc
function Label:getBlendFunc () end
---* Toggle wrap option of the label.<br>
---* Note: System font doesn't support manually toggle wrap.<br>
---* param enable Set true to enable wrap and false to disable wrap.
---@param enable boolean
---@return self
function Label:enableWrap (enable) end
---* Makes the Label exactly this untransformed width.<br>
---* The Label's width be used for text align if the value not equal zero.
---@param width float
---@return self
function Label:setWidth (width) end
---* Returns the additional kerning of the Label.<br>
---* warning Not support system font.<br>
---* since v3.2.0
---@return float
function Label:getAdditionalKerning () end
---* Return the user define BMFont size.<br>
---* return The BMFont size in float value.
---@return float
function Label:getBMFontSize () end
---*
---@return float
function Label:getMaxLineWidth () end
---* Returns the Label's text horizontal alignment.
---@return int
function Label:getHorizontalAlignment () end
---* Return shadow effect offset value.
---@return size_table
function Label:getShadowOffset () end
---*
---@return float
function Label:getLineSpacing () end
---* Clips upper and lower margin to reduce height of Label.
---@param clipEnabled boolean
---@return self
function Label:setClipMarginEnabled (clipEnabled) end
---* Sets the text that this Label is to display.
---@param text string
---@return self
function Label:setString (text) end
---* Sets a new system font to Label.<br>
---* param font A font file or a font family name.<br>
---* warning
---@param font string
---@return self
function Label:setSystemFontName (font) end
---* Query the wrap is enabled or not.<br>
---* Note: System font will always return true.
---@return boolean
function Label:isWrapEnabled () end
---* Return the outline effect size value.
---@return float
function Label:getOutlineSize () end
---* Sets a new bitmap font to Label
---@param bmfontFilePath string
---@param imageOffset vec2_table
---@param fontSize float
---@return boolean
function Label:setBMFontFilePath (bmfontFilePath,imageOffset,fontSize) end
---@overload fun(string0:cc._ttfConfig,string:string,float2:int,size_table3:int):self
---@overload fun(string:string,string:string,float:float,size_table:size_table,int:int,int:int):self
---@param text string
---@param fontFilePath string
---@param fontSize float
---@param dimensions size_table
---@param hAlignment int
---@param vAlignment int
---@return boolean
function Label:initWithTTF (text,fontFilePath,fontSize,dimensions,hAlignment,vAlignment) end
---*
---@return cc.FontAtlas
function Label:getFontAtlas () end
---* Sets the line height of the Label.<br>
---* warning Not support system font.<br>
---* since v3.2.0
---@param height float
---@return self
function Label:setLineHeight (height) end
---*
---@param fontSize float
---@return self
function Label:setSystemFontSize (fontSize) end
---* Change the label's Overflow type, currently only TTF and BMFont support all the valid Overflow type.<br>
---* Char Map font supports all the Overflow type except for SHRINK, because we can't measure it's font size.<br>
---* System font only support Overflow::Normal and Overflow::RESIZE_HEIGHT.<br>
---* param overflow see `Overflow`
---@param overflow int
---@return self
function Label:setOverflow (overflow) end
---* Enables strikethrough.<br>
---* Underline and Strikethrough cannot be enabled at the same time.<br>
---* Strikethrough is like an underline but at the middle of the glyph
---@return self
function Label:enableStrikethrough () end
---* Update content immediately.
---@return self
function Label:updateContent () end
---* Return length of string.
---@return int
function Label:getStringLength () end
---* Specify what happens when a line is too long for Label.<br>
---* param breakWithoutSpace Lines are automatically broken between words if this value is false.
---@param breakWithoutSpace boolean
---@return self
function Label:setLineBreakWithoutSpace (breakWithoutSpace) end
---* Return the number of lines of text.
---@return int
function Label:getStringNumLines () end
---* Enable outline effect to Label.<br>
---* warning Limiting use to only when the Label created with true type font or system font.
---@param outlineColor color4b_table
---@param outlineSize int
---@return self
function Label:enableOutline (outlineColor,outlineSize) end
---* Return the shadow effect blur radius.
---@return float
function Label:getShadowBlurRadius () end
---* Return current effect color value.
---@return color4f_table
function Label:getEffectColor () end
---*
---@param cleanup boolean
---@return self
function Label:removeAllChildrenWithCleanup (cleanup) end
---@overload fun(string0:cc.Texture2D,int:int,int:int,int:int):self
---@overload fun(string:string,int:int,int:int,int:int):self
---@overload fun(string:string):self
---@param charMapFile string
---@param itemWidth int
---@param itemHeight int
---@param startCharMap int
---@return boolean
function Label:setCharMap (charMapFile,itemWidth,itemHeight,startCharMap) end
---*
---@return size_table
function Label:getDimensions () end
---* Makes the Label at most this line untransformed width.<br>
---* The Label's max line width be used for force line breaks if the value not equal zero.
---@param maxLineWidth float
---@return self
function Label:setMaxLineWidth (maxLineWidth) end
---* Returns the system font used by the Label.
---@return string
function Label:getSystemFontName () end
---* Sets the Label's text vertical alignment.
---@param vAlignment int
---@return self
function Label:setVerticalAlignment (vAlignment) end
---*
---@param height float
---@return self
function Label:setLineSpacing (height) end
---* Returns font size
---@return float
function Label:getRenderingFontSize () end
---* Returns the line height of this Label.<br>
---* warning Not support system font.<br>
---* since v3.2.0
---@return float
function Label:getLineHeight () end
---* Return the shadow effect color value.
---@return color4f_table
function Label:getShadowColor () end
---* Returns the TTF configuration object used by the Label.<br>
---* see `TTFConfig`
---@return cc._ttfConfig
function Label:getTTFConfig () end
---* Enable italics rendering
---@return self
function Label:enableItalics () end
---* Sets the text color of Label.<br>
---* The text color is different from the color of Node.<br>
---* warning Limiting use to only when the Label created with true type font or system font.
---@param color color4b_table
---@return self
function Label:setTextColor (color) end
---* Provides a way to treat each character like a Sprite.<br>
---* warning No support system font.
---@param lettetIndex int
---@return cc.Sprite
function Label:getLetter (lettetIndex) end
---* Makes the Label exactly this untransformed height.<br>
---* The Label's height be used for text align if the value not equal zero.<br>
---* The text will display incomplete if the size of Label is not large enough to display all text.
---@param height float
---@return self
function Label:setHeight (height) end
---* Return whether the shadow effect is enabled.
---@return boolean
function Label:isShadowEnabled () end
---* Enable glow effect to Label.<br>
---* warning Limiting use to only when the Label created with true type font.
---@param glowColor color4b_table
---@return self
function Label:enableGlow (glowColor) end
---* Query the label's Overflow type.<br>
---* return see `Overflow`
---@return int
function Label:getOverflow () end
---* Returns the Label's text vertical alignment.
---@return int
function Label:getVerticalAlignment () end
---* Sets the additional kerning of the Label.<br>
---* warning Not support system font.<br>
---* since v3.2.0
---@param space float
---@return self
function Label:setAdditionalKerning (space) end
---* Returns the bitmap font path used by the Label.
---@return float
function Label:getSystemFontSize () end
---*
---@param blendFunc cc.BlendFunc
---@return self
function Label:setBlendFunc (blendFunc) end
---* Returns the Label's text horizontal alignment.
---@return int
function Label:getTextAlignment () end
---* Returns the bitmap font used by the Label.
---@return string
function Label:getBMFontFilePath () end
---* Sets the Label's text horizontal alignment.
---@param hAlignment int
---@return self
function Label:setHorizontalAlignment (hAlignment) end
---* Enable bold rendering
---@return self
function Label:enableBold () end
---* Enable underline
---@return self
function Label:enableUnderline () end
---* Return current effect type.
---@return int
function Label:getLabelEffectType () end
---@overload fun(int:int,int:int):self
---@overload fun(int:int):self
---@param hAlignment int
---@param vAlignment int
---@return self
function Label:setAlignment (hAlignment,vAlignment) end
---* warning This method is not recommended for game developers.
---@return self
function Label:requestSystemFontRefresh () end
---* Change font size of label type BMFONT<br>
---* Note: This function only scale the BMFONT letter to mimic the font size change effect.<br>
---* param fontSize The desired font size in float.
---@param fontSize float
---@return self
function Label:setBMFontSize (fontSize) end
---* Allocates and initializes a Label, with a bitmap font file.<br>
---* param bmfontPath A bitmap font file, it's a FNT format.<br>
---* param text The initial text.<br>
---* param hAlignment Text horizontal alignment.<br>
---* param maxLineWidth The max line width.<br>
---* param imageOffset<br>
---* return An automatically released Label object.<br>
---* see setBMFontFilePath setMaxLineWidth
---@param bmfontPath string
---@param text string
---@param hAlignment int
---@param maxLineWidth int
---@param imageOffset vec2_table
---@return self
function Label:createWithBMFont (bmfontPath,text,hAlignment,maxLineWidth,imageOffset) end
---* Allocates and initializes a Label, with default settings.<br>
---* return An automatically released Label object.
---@return self
function Label:create () end
---@overload fun(string0:cc.Texture2D,int:int,int:int,int:int):self
---@overload fun(string:string,int:int,int:int,int:int):self
---@overload fun(string:string):self
---@param charMapFile string
---@param itemWidth int
---@param itemHeight int
---@param startCharMap int
---@return self
function Label:createWithCharMap (charMapFile,itemWidth,itemHeight,startCharMap) end
---* Allocates and initializes a Label, base on platform-dependent API.<br>
---* param text The initial text.<br>
---* param font A font file or a font family name.<br>
---* param fontSize The font size. This value must be > 0.<br>
---* param dimensions<br>
---* param hAlignment The text horizontal alignment.<br>
---* param vAlignment The text vertical alignment.<br>
---* warning It will generate texture by the platform-dependent code.<br>
---* return An automatically released Label object.
---@param text string
---@param font string
---@param fontSize float
---@param dimensions size_table
---@param hAlignment int
---@param vAlignment int
---@return self
function Label:createWithSystemFont (text,font,fontSize,dimensions,hAlignment,vAlignment) end
---*
---@param renderer cc.Renderer
---@param transform mat4_table
---@param flags unsigned_int
---@return self
function Label:draw (renderer,transform,flags) end
---*
---@return boolean
function Label:isOpacityModifyRGB () end
---*
---@param mask unsigned short
---@param applyChildren boolean
---@return self
function Label:setCameraMask (mask,applyChildren) end
---*
---@param child cc.Node
---@param cleanup boolean
---@return self
function Label:removeChild (child,cleanup) end
---*
---@param renderer cc.Renderer
---@param parentTransform mat4_table
---@param parentFlags unsigned_int
---@return self
function Label:visit (renderer,parentTransform,parentFlags) end
---*
---@return string
function Label:getDescription () end
---*
---@param isOpacityModifyRGB boolean
---@return self
function Label:setOpacityModifyRGB (isOpacityModifyRGB) end
---*
---@param parentOpacity unsigned_char
---@return self
function Label:updateDisplayedOpacity (parentOpacity) end
---* set ProgramState of current render command
---@param programState cc.backend.ProgramState
---@return self
function Label:setProgramState (programState) end
---*
---@return size_table
function Label:getContentSize () end
---*
---@return rect_table
function Label:getBoundingBox () end
---*
---@param parentColor color3b_table
---@return self
function Label:updateDisplayedColor (parentColor) end
---*
---@param globalZOrder float
---@return self
function Label:setGlobalZOrder (globalZOrder) end
|