MenuButton.xml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="MenuButton" inherits="Button" category="Core" version="3.1.2">
  3. <brief_description>
  4. Special button that brings up a [PopupMenu] when clicked.
  5. </brief_description>
  6. <description>
  7. Special button that brings up a [PopupMenu] when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_popup" qualifiers="const">
  13. <return type="PopupMenu">
  14. </return>
  15. <description>
  16. Returns the [PopupMenu] contained in this button.
  17. </description>
  18. </method>
  19. <method name="set_disable_shortcuts">
  20. <return type="void">
  21. </return>
  22. <argument index="0" name="disabled" type="bool">
  23. </argument>
  24. <description>
  25. </description>
  26. </method>
  27. </methods>
  28. <members>
  29. <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover">
  30. If [code]true[/code], when the cursor hovers above another MenuButton within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current MenuButton and open the other one.
  31. </member>
  32. </members>
  33. <signals>
  34. <signal name="about_to_show">
  35. <description>
  36. Emitted when [PopupMenu] of this MenuButton is about to show.
  37. </description>
  38. </signal>
  39. </signals>
  40. <constants>
  41. </constants>
  42. <theme_items>
  43. <theme_item name="disabled" type="StyleBox">
  44. </theme_item>
  45. <theme_item name="focus" type="StyleBox">
  46. </theme_item>
  47. <theme_item name="font" type="Font">
  48. </theme_item>
  49. <theme_item name="font_color" type="Color">
  50. </theme_item>
  51. <theme_item name="font_color_disabled" type="Color">
  52. </theme_item>
  53. <theme_item name="font_color_hover" type="Color">
  54. </theme_item>
  55. <theme_item name="font_color_pressed" type="Color">
  56. </theme_item>
  57. <theme_item name="hover" type="StyleBox">
  58. </theme_item>
  59. <theme_item name="hseparation" type="int">
  60. </theme_item>
  61. <theme_item name="normal" type="StyleBox">
  62. </theme_item>
  63. <theme_item name="pressed" type="StyleBox">
  64. </theme_item>
  65. </theme_items>
  66. </class>