LinkButton.xml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LinkButton" inherits="BaseButton" version="4.0">
  3. <brief_description>
  4. Simple button used to represent a link to some resource.
  5. </brief_description>
  6. <description>
  7. This kind of button is primarily used when the interaction with the button causes a context change (like linking to a web page).
  8. See also [BaseButton] which contains common properties and methods associated with this node.
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="clear_opentype_features">
  14. <return type="void" />
  15. <description>
  16. Removes all OpenType features.
  17. </description>
  18. </method>
  19. <method name="get_opentype_feature" qualifiers="const">
  20. <return type="int" />
  21. <argument index="0" name="tag" type="String" />
  22. <description>
  23. Returns OpenType feature [code]tag[/code].
  24. </description>
  25. </method>
  26. <method name="set_opentype_feature">
  27. <return type="void" />
  28. <argument index="0" name="tag" type="String" />
  29. <argument index="1" name="value" type="int" />
  30. <description>
  31. Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
  32. </description>
  33. </method>
  34. </methods>
  35. <members>
  36. <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
  37. <member name="language" type="String" setter="set_language" getter="get_language" default="&quot;&quot;">
  38. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  39. </member>
  40. <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="2" />
  41. <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0">
  42. Set BiDi algorithm override for the structured text.
  43. </member>
  44. <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" default="[]">
  45. Set additional options for BiDi override.
  46. </member>
  47. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  48. The button's text that will be displayed inside the button's area.
  49. </member>
  50. <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
  51. Base text writing direction.
  52. </member>
  53. <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0">
  54. Determines when to show the underline. See [enum UnderlineMode] for options.
  55. </member>
  56. </members>
  57. <constants>
  58. <constant name="UNDERLINE_MODE_ALWAYS" value="0" enum="UnderlineMode">
  59. The LinkButton will always show an underline at the bottom of its text.
  60. </constant>
  61. <constant name="UNDERLINE_MODE_ON_HOVER" value="1" enum="UnderlineMode">
  62. The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
  63. </constant>
  64. <constant name="UNDERLINE_MODE_NEVER" value="2" enum="UnderlineMode">
  65. The LinkButton will never show an underline at the bottom of its text.
  66. </constant>
  67. </constants>
  68. <theme_items>
  69. <theme_item name="focus" data_type="style" type="StyleBox">
  70. [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  71. </theme_item>
  72. <theme_item name="font" data_type="font" type="Font">
  73. [Font] of the [LinkButton]'s text.
  74. </theme_item>
  75. <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)">
  76. Default text [Color] of the [LinkButton].
  77. </theme_item>
  78. <theme_item name="font_focus_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
  79. Text [Color] used when the [LinkButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
  80. </theme_item>
  81. <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)">
  82. Text [Color] used when the [LinkButton] is being hovered.
  83. </theme_item>
  84. <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  85. The tint of text outline of the [LinkButton].
  86. </theme_item>
  87. <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
  88. Text [Color] used when the [LinkButton] is being pressed.
  89. </theme_item>
  90. <theme_item name="font_size" data_type="font_size" type="int">
  91. Font size of the [LinkButton]'s text.
  92. </theme_item>
  93. <theme_item name="outline_size" data_type="constant" type="int" default="0">
  94. The size of the text outline.
  95. </theme_item>
  96. <theme_item name="underline_spacing" data_type="constant" type="int" default="2">
  97. The vertical space between the baseline of text and the underline.
  98. </theme_item>
  99. </theme_items>
  100. </class>