RichTextLabel.xml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="RichTextLabel" inherits="Control" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Label that displays rich text.
  5. </brief_description>
  6. <description>
  7. Label that displays rich text. Rich text can contain custom text, fonts, images and some basic formatting. It also adapts itself to given width/heights.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_image">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="image" type="Texture">
  18. </argument>
  19. <description>
  20. </description>
  21. </method>
  22. <method name="add_text">
  23. <return type="void">
  24. </return>
  25. <argument index="0" name="text" type="String">
  26. </argument>
  27. <description>
  28. </description>
  29. </method>
  30. <method name="append_bbcode">
  31. <return type="int" enum="Error">
  32. </return>
  33. <argument index="0" name="bbcode" type="String">
  34. </argument>
  35. <description>
  36. </description>
  37. </method>
  38. <method name="clear">
  39. <return type="void">
  40. </return>
  41. <description>
  42. Clears the label's text.
  43. </description>
  44. </method>
  45. <method name="get_bbcode" qualifiers="const">
  46. <return type="String">
  47. </return>
  48. <description>
  49. Returns label's BBCode.
  50. </description>
  51. </method>
  52. <method name="get_line_count" qualifiers="const">
  53. <return type="int">
  54. </return>
  55. <description>
  56. Returns the number of lines in the text.
  57. </description>
  58. </method>
  59. <method name="get_percent_visible" qualifiers="const">
  60. <return type="float">
  61. </return>
  62. <description>
  63. Returns the text's visibility as a floating point value between 0.0 and 1.0.
  64. </description>
  65. </method>
  66. <method name="get_tab_size" qualifiers="const">
  67. <return type="int">
  68. </return>
  69. <description>
  70. </description>
  71. </method>
  72. <method name="get_text">
  73. <return type="String">
  74. </return>
  75. <description>
  76. Returns the label's text with the formatting removed.
  77. </description>
  78. </method>
  79. <method name="get_total_character_count" qualifiers="const">
  80. <return type="int">
  81. </return>
  82. <description>
  83. Returns the total number of characters.
  84. </description>
  85. </method>
  86. <method name="get_v_scroll">
  87. <return type="VScrollBar">
  88. </return>
  89. <description>
  90. </description>
  91. </method>
  92. <method name="get_visible_characters" qualifiers="const">
  93. <return type="int">
  94. </return>
  95. <description>
  96. </description>
  97. </method>
  98. <method name="get_visible_line_count" qualifiers="const">
  99. <return type="int">
  100. </return>
  101. <description>
  102. Returns the number of visible lines.
  103. </description>
  104. </method>
  105. <method name="is_meta_underlined" qualifiers="const">
  106. <return type="bool">
  107. </return>
  108. <description>
  109. </description>
  110. </method>
  111. <method name="is_overriding_selected_font_color" qualifiers="const">
  112. <return type="bool">
  113. </return>
  114. <description>
  115. </description>
  116. </method>
  117. <method name="is_scroll_active" qualifiers="const">
  118. <return type="bool">
  119. </return>
  120. <description>
  121. Returns [code]true[/code] if active scrolling is enabled.
  122. </description>
  123. </method>
  124. <method name="is_scroll_following" qualifiers="const">
  125. <return type="bool">
  126. </return>
  127. <description>
  128. </description>
  129. </method>
  130. <method name="is_selection_enabled" qualifiers="const">
  131. <return type="bool">
  132. </return>
  133. <description>
  134. Returns [code]true[/code] if the label's text can be selected.
  135. </description>
  136. </method>
  137. <method name="is_using_bbcode" qualifiers="const">
  138. <return type="bool">
  139. </return>
  140. <description>
  141. Returns [code]true[/code] if the label has BBCode.
  142. </description>
  143. </method>
  144. <method name="newline">
  145. <return type="void">
  146. </return>
  147. <description>
  148. Adds a newline to the end of the rich text.
  149. </description>
  150. </method>
  151. <method name="parse_bbcode">
  152. <return type="int" enum="Error">
  153. </return>
  154. <argument index="0" name="bbcode" type="String">
  155. </argument>
  156. <description>
  157. </description>
  158. </method>
  159. <method name="pop">
  160. <return type="void">
  161. </return>
  162. <description>
  163. </description>
  164. </method>
  165. <method name="push_align">
  166. <return type="void">
  167. </return>
  168. <argument index="0" name="align" type="int" enum="RichTextLabel.Align">
  169. </argument>
  170. <description>
  171. </description>
  172. </method>
  173. <method name="push_cell">
  174. <return type="void">
  175. </return>
  176. <description>
  177. </description>
  178. </method>
  179. <method name="push_color">
  180. <return type="void">
  181. </return>
  182. <argument index="0" name="color" type="Color">
  183. </argument>
  184. <description>
  185. </description>
  186. </method>
  187. <method name="push_font">
  188. <return type="void">
  189. </return>
  190. <argument index="0" name="font" type="Font">
  191. </argument>
  192. <description>
  193. </description>
  194. </method>
  195. <method name="push_indent">
  196. <return type="void">
  197. </return>
  198. <argument index="0" name="level" type="int">
  199. </argument>
  200. <description>
  201. </description>
  202. </method>
  203. <method name="push_list">
  204. <return type="void">
  205. </return>
  206. <argument index="0" name="type" type="int" enum="RichTextLabel.ListType">
  207. </argument>
  208. <description>
  209. </description>
  210. </method>
  211. <method name="push_meta">
  212. <return type="void">
  213. </return>
  214. <argument index="0" name="data" type="Variant">
  215. </argument>
  216. <description>
  217. </description>
  218. </method>
  219. <method name="push_table">
  220. <return type="void">
  221. </return>
  222. <argument index="0" name="columns" type="int">
  223. </argument>
  224. <description>
  225. </description>
  226. </method>
  227. <method name="push_underline">
  228. <return type="void">
  229. </return>
  230. <description>
  231. </description>
  232. </method>
  233. <method name="remove_line">
  234. <return type="bool">
  235. </return>
  236. <argument index="0" name="line" type="int">
  237. </argument>
  238. <description>
  239. </description>
  240. </method>
  241. <method name="scroll_to_line">
  242. <return type="void">
  243. </return>
  244. <argument index="0" name="line" type="int">
  245. </argument>
  246. <description>
  247. </description>
  248. </method>
  249. <method name="set_bbcode">
  250. <return type="void">
  251. </return>
  252. <argument index="0" name="text" type="String">
  253. </argument>
  254. <description>
  255. Sets the BBCode text to the label.
  256. </description>
  257. </method>
  258. <method name="set_meta_underline">
  259. <return type="void">
  260. </return>
  261. <argument index="0" name="enable" type="bool">
  262. </argument>
  263. <description>
  264. </description>
  265. </method>
  266. <method name="set_override_selected_font_color">
  267. <return type="void">
  268. </return>
  269. <argument index="0" name="override" type="bool">
  270. </argument>
  271. <description>
  272. </description>
  273. </method>
  274. <method name="set_percent_visible">
  275. <return type="void">
  276. </return>
  277. <argument index="0" name="percent_visible" type="float">
  278. </argument>
  279. <description>
  280. Sets the text's visibility. Takes a floating point value between 0.0 and 1.0.
  281. </description>
  282. </method>
  283. <method name="set_scroll_active">
  284. <return type="void">
  285. </return>
  286. <argument index="0" name="active" type="bool">
  287. </argument>
  288. <description>
  289. </description>
  290. </method>
  291. <method name="set_scroll_follow">
  292. <return type="void">
  293. </return>
  294. <argument index="0" name="follow" type="bool">
  295. </argument>
  296. <description>
  297. </description>
  298. </method>
  299. <method name="set_selection_enabled">
  300. <return type="void">
  301. </return>
  302. <argument index="0" name="enabled" type="bool">
  303. </argument>
  304. <description>
  305. If [code]true[/code] text can be selected.
  306. </description>
  307. </method>
  308. <method name="set_tab_size">
  309. <return type="void">
  310. </return>
  311. <argument index="0" name="spaces" type="int">
  312. </argument>
  313. <description>
  314. </description>
  315. </method>
  316. <method name="set_table_column_expand">
  317. <return type="void">
  318. </return>
  319. <argument index="0" name="column" type="int">
  320. </argument>
  321. <argument index="1" name="expand" type="bool">
  322. </argument>
  323. <argument index="2" name="ratio" type="int">
  324. </argument>
  325. <description>
  326. </description>
  327. </method>
  328. <method name="set_text">
  329. <return type="void">
  330. </return>
  331. <argument index="0" name="text" type="String">
  332. </argument>
  333. <description>
  334. </description>
  335. </method>
  336. <method name="set_use_bbcode">
  337. <return type="void">
  338. </return>
  339. <argument index="0" name="enable" type="bool">
  340. </argument>
  341. <description>
  342. </description>
  343. </method>
  344. <method name="set_visible_characters">
  345. <return type="void">
  346. </return>
  347. <argument index="0" name="amount" type="int">
  348. </argument>
  349. <description>
  350. </description>
  351. </method>
  352. </methods>
  353. <members>
  354. <member name="bbcode_enabled" type="bool" setter="set_use_bbcode" getter="is_using_bbcode">
  355. If [code]true[/code] the label uses BBCode formatting. Default value: [code]false[/code].
  356. </member>
  357. <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode">
  358. The label's text in BBCode format.
  359. </member>
  360. <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color">
  361. If [code]true[/code] the label uses the custom font color. Default value: [code]false[/code].
  362. </member>
  363. <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible">
  364. The text's visibility, as a [float] between 0.0 and 1.0.
  365. </member>
  366. <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters">
  367. The restricted number of characters to display in the label.
  368. </member>
  369. </members>
  370. <signals>
  371. <signal name="meta_clicked">
  372. <argument index="0" name="meta" type="Nil">
  373. </argument>
  374. <description>
  375. </description>
  376. </signal>
  377. </signals>
  378. <constants>
  379. <constant name="ALIGN_LEFT" value="0">
  380. </constant>
  381. <constant name="ALIGN_CENTER" value="1">
  382. </constant>
  383. <constant name="ALIGN_RIGHT" value="2">
  384. </constant>
  385. <constant name="ALIGN_FILL" value="3">
  386. </constant>
  387. <constant name="LIST_NUMBERS" value="0">
  388. </constant>
  389. <constant name="LIST_LETTERS" value="1">
  390. </constant>
  391. <constant name="LIST_DOTS" value="2">
  392. </constant>
  393. <constant name="ITEM_FRAME" value="0">
  394. </constant>
  395. <constant name="ITEM_TEXT" value="1">
  396. </constant>
  397. <constant name="ITEM_IMAGE" value="2">
  398. </constant>
  399. <constant name="ITEM_NEWLINE" value="3">
  400. </constant>
  401. <constant name="ITEM_FONT" value="4">
  402. </constant>
  403. <constant name="ITEM_COLOR" value="5">
  404. </constant>
  405. <constant name="ITEM_UNDERLINE" value="6">
  406. </constant>
  407. <constant name="ITEM_ALIGN" value="7">
  408. </constant>
  409. <constant name="ITEM_INDENT" value="8">
  410. </constant>
  411. <constant name="ITEM_LIST" value="9">
  412. </constant>
  413. <constant name="ITEM_TABLE" value="10">
  414. </constant>
  415. <constant name="ITEM_META" value="11">
  416. </constant>
  417. </constants>
  418. <theme_items>
  419. <theme_item name="bold_font" type="Font">
  420. </theme_item>
  421. <theme_item name="bold_italics_font" type="Font">
  422. </theme_item>
  423. <theme_item name="default_color" type="Color">
  424. </theme_item>
  425. <theme_item name="focus" type="StyleBox">
  426. </theme_item>
  427. <theme_item name="font_color_selected" type="Color">
  428. </theme_item>
  429. <theme_item name="italics_font" type="Font">
  430. </theme_item>
  431. <theme_item name="line_separation" type="int">
  432. </theme_item>
  433. <theme_item name="mono_font" type="Font">
  434. </theme_item>
  435. <theme_item name="normal" type="StyleBox">
  436. </theme_item>
  437. <theme_item name="normal_font" type="Font">
  438. </theme_item>
  439. <theme_item name="selection_color" type="Color">
  440. </theme_item>
  441. <theme_item name="table_hseparation" type="int">
  442. </theme_item>
  443. <theme_item name="table_vseparation" type="int">
  444. </theme_item>
  445. </theme_items>
  446. </class>