MenuButton.xml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="MenuButton" inherits="Button" category="Core" version="3.1">
  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. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_popup" qualifiers="const">
  15. <return type="PopupMenu">
  16. </return>
  17. <description>
  18. Return the [PopupMenu] contained in this button.
  19. </description>
  20. </method>
  21. <method name="set_disable_shortcuts">
  22. <return type="void">
  23. </return>
  24. <argument index="0" name="disabled" type="bool">
  25. </argument>
  26. <description>
  27. </description>
  28. </method>
  29. </methods>
  30. <members>
  31. <member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover">
  32. 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.
  33. </member>
  34. </members>
  35. <signals>
  36. <signal name="about_to_show">
  37. <description>
  38. Emitted when [PopupMenu] of this MenuButton is about to show.
  39. </description>
  40. </signal>
  41. </signals>
  42. <constants>
  43. </constants>
  44. <theme_items>
  45. <theme_item name="disabled" type="StyleBox">
  46. </theme_item>
  47. <theme_item name="focus" type="StyleBox">
  48. </theme_item>
  49. <theme_item name="font" type="Font">
  50. </theme_item>
  51. <theme_item name="font_color" type="Color">
  52. </theme_item>
  53. <theme_item name="font_color_disabled" type="Color">
  54. </theme_item>
  55. <theme_item name="font_color_hover" type="Color">
  56. </theme_item>
  57. <theme_item name="font_color_pressed" type="Color">
  58. </theme_item>
  59. <theme_item name="hover" type="StyleBox">
  60. </theme_item>
  61. <theme_item name="hseparation" type="int">
  62. </theme_item>
  63. <theme_item name="normal" type="StyleBox">
  64. </theme_item>
  65. <theme_item name="pressed" type="StyleBox">
  66. </theme_item>
  67. </theme_items>
  68. </class>