LinkButton.xml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="LinkButton" inherits="BaseButton" version="3.4">
  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. </methods>
  14. <members>
  15. <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="0" />
  16. <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" />
  17. <member name="text" type="String" setter="set_text" getter="get_text" default="&quot;&quot;">
  18. The button's text that will be displayed inside the button's area.
  19. </member>
  20. <member name="underline" type="int" setter="set_underline_mode" getter="get_underline_mode" enum="LinkButton.UnderlineMode" default="0">
  21. Determines when to show the underline. See [enum UnderlineMode] for options.
  22. </member>
  23. </members>
  24. <constants>
  25. <constant name="UNDERLINE_MODE_ALWAYS" value="0" enum="UnderlineMode">
  26. The LinkButton will always show an underline at the bottom of its text.
  27. </constant>
  28. <constant name="UNDERLINE_MODE_ON_HOVER" value="1" enum="UnderlineMode">
  29. The LinkButton will show an underline at the bottom of its text when the mouse cursor is over it.
  30. </constant>
  31. <constant name="UNDERLINE_MODE_NEVER" value="2" enum="UnderlineMode">
  32. The LinkButton will never show an underline at the bottom of its text.
  33. </constant>
  34. </constants>
  35. <theme_items>
  36. <theme_item name="focus" data_type="style" type="StyleBox">
  37. [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  38. </theme_item>
  39. <theme_item name="font" data_type="font" type="Font">
  40. [Font] of the [LinkButton]'s text.
  41. </theme_item>
  42. <theme_item name="font_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  43. Default text [Color] of the [LinkButton].
  44. </theme_item>
  45. <theme_item name="font_color_focus" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  46. 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.
  47. </theme_item>
  48. <theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  49. Text [Color] used when the [LinkButton] is being hovered.
  50. </theme_item>
  51. <theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  52. Text [Color] used when the [LinkButton] is being pressed.
  53. </theme_item>
  54. <theme_item name="underline_spacing" data_type="constant" type="int" default="2">
  55. The vertical space between the baseline of text and the underline.
  56. </theme_item>
  57. </theme_items>
  58. </class>