class-description NEWS COMMUNITY STORE TUTORIALS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE TUTORIALS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeCanvasItemControlBaseButtonButton MenuButton
A button that brings up a PopupMenu when clicked.

A button that brings up a PopupMenu when clicked. To create new items inside this PopupMenu, use get_popup().add_item("My Item Name"). You can also create them directly from Godot editor's inspector.

See also BaseButton which contains common properties and methods associated with this node.

about_to_popup about_to_popup<>():about_to_popup

Emitted when the PopupMenu of this MenuButton is about to show.

int item_count<>():int

The number of items currently in the list.

bool switch_on_hover<>():bool

If true, when the cursor hovers above another MenuButton within the same parent which also has switch_on_hover enabled, it will close the current MenuButton and open the other one.

PopupMenu get_popup<>():PopupMenu

Returns the PopupMenu contained in this button.

Warning: This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their Window.visible property.

void set_disable_shortcuts<>( bool disabled=, disabled:bool=, ):void

If true, shortcuts are disabled and cannot be used to trigger the button.

void show_popup<>():void

Adjusts popup position and sizing for the MenuButton, then shows the PopupMenu. Prefer this over using get_popup().popup().




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...