-
Notifications
You must be signed in to change notification settings - Fork 7
CloseButton
Refaltor77 edited this page Mar 29, 2026
·
1 revision
Pre-built close button extending Bedrock's common_dialogs.common_close_button_holder.
use refaltor\ui\elements\utils\CloseButton;
$close = CloseButton::create("my_close_button");$close->setDefaultTextureButton("textures/ui/close_default");
$close->setHoverTextureButton("textures/ui/close_hover");
$close->setPressedTextureButton("textures/ui/close_pressed");$close = CloseButton::create("close_btn")
->setAnchorFrom(Element::ANCHOR_TOP_RIGHT)
->setAnchorTo(Element::ANCHOR_TOP_RIGHT)
->setOffset(-5, 5);
$mainPanel->addChild($close);