ToolButton.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ToolButton" inherits="Button" version="3.3">
  3. <brief_description>
  4. Flat button helper class.
  5. </brief_description>
  6. <description>
  7. This is a helper class to generate a flat [Button] (see [member Button.flat]), creating a [ToolButton] is equivalent to:
  8. [codeblock]
  9. var btn = Button.new()
  10. btn.flat = true
  11. [/codeblock]
  12. </description>
  13. <tutorials>
  14. </tutorials>
  15. <methods>
  16. </methods>
  17. <members>
  18. <member name="flat" type="bool" setter="set_flat" getter="is_flat" override="true" default="true" />
  19. </members>
  20. <constants>
  21. </constants>
  22. <theme_items>
  23. <theme_item name="disabled" type="StyleBox">
  24. [StyleBox] used when the [ToolButton] is disabled.
  25. </theme_item>
  26. <theme_item name="focus" type="StyleBox">
  27. [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  28. </theme_item>
  29. <theme_item name="font" type="Font">
  30. [Font] of the [ToolButton]'s text.
  31. </theme_item>
  32. <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  33. Default text [Color] of the [ToolButton].
  34. </theme_item>
  35. <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )">
  36. Text [Color] used when the [ToolButton] is disabled.
  37. </theme_item>
  38. <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  39. Text [Color] used when the [ToolButton] is being hovered.
  40. </theme_item>
  41. <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )">
  42. Text [Color] used when the [ToolButton] is being pressed.
  43. </theme_item>
  44. <theme_item name="hover" type="StyleBox">
  45. [StyleBox] used when the [ToolButton] is being hovered.
  46. </theme_item>
  47. <theme_item name="hseparation" type="int" default="3">
  48. The horizontal space between [ToolButton]'s icon and text.
  49. </theme_item>
  50. <theme_item name="normal" type="StyleBox">
  51. Default [StyleBox] for the [ToolButton].
  52. </theme_item>
  53. <theme_item name="pressed" type="StyleBox">
  54. [StyleBox] used when the [ToolButton] is being pressed.
  55. </theme_item>
  56. </theme_items>
  57. </class>