ToolButton.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ToolButton" inherits="Button" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  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" overrides="Button" default="true" />
  19. </members>
  20. <constants>
  21. </constants>
  22. <theme_items>
  23. <theme_item name="font_color" data_type="color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
  24. Default text [Color] of the [ToolButton].
  25. </theme_item>
  26. <theme_item name="font_color_disabled" data_type="color" type="Color" default="Color( 0.9, 0.95, 1, 0.3 )">
  27. Text [Color] used when the [ToolButton] is disabled.
  28. </theme_item>
  29. <theme_item name="font_color_focus" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  30. Text [Color] used when the [ToolButton] is focused. Only replaces the normal text color of the button. Disabled, hovered, and pressed states take precedence over this color.
  31. </theme_item>
  32. <theme_item name="font_color_hover" data_type="color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )">
  33. Text [Color] used when the [ToolButton] is being hovered.
  34. </theme_item>
  35. <theme_item name="font_color_pressed" data_type="color" type="Color" default="Color( 1, 1, 1, 1 )">
  36. Text [Color] used when the [ToolButton] is being pressed.
  37. </theme_item>
  38. <theme_item name="hseparation" data_type="constant" type="int" default="3">
  39. The horizontal space between [ToolButton]'s icon and text.
  40. </theme_item>
  41. <theme_item name="font" data_type="font" type="Font">
  42. [Font] of the [ToolButton]'s text.
  43. </theme_item>
  44. <theme_item name="disabled" data_type="style" type="StyleBox">
  45. [StyleBox] used when the [ToolButton] is disabled.
  46. </theme_item>
  47. <theme_item name="focus" data_type="style" type="StyleBox">
  48. [StyleBox] used when the [ToolButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect.
  49. </theme_item>
  50. <theme_item name="hover" data_type="style" type="StyleBox">
  51. [StyleBox] used when the [ToolButton] is being hovered.
  52. </theme_item>
  53. <theme_item name="normal" data_type="style" type="StyleBox">
  54. Default [StyleBox] for the [ToolButton].
  55. </theme_item>
  56. <theme_item name="pressed" data_type="style" type="StyleBox">
  57. [StyleBox] used when the [ToolButton] is being pressed.
  58. </theme_item>
  59. </theme_items>
  60. </class>