diff options
| author | Yuqian Yang <crupest@crupest.life> | 2025-12-06 20:06:10 +0800 |
|---|---|---|
| committer | Yuqian Yang <crupest@crupest.life> | 2025-12-07 19:52:05 +0800 |
| commit | 4a30bf58a48ed6f31f4c53473e8de70a8cd819da (patch) | |
| tree | 32aab619013cbe2d0557a212832ba24833d2cc36 /src/ui/components | |
| parent | 9a87e5cf786f3e8fddc933136d210edd4ef72c89 (diff) | |
| download | cru-4a30bf58a48ed6f31f4c53473e8de70a8cd819da.tar.gz cru-4a30bf58a48ed6f31f4c53473e8de70a8cd819da.tar.bz2 cru-4a30bf58a48ed6f31f4c53473e8de70a8cd819da.zip | |
Fix SDL popup window.
Diffstat (limited to 'src/ui/components')
| -rw-r--r-- | src/ui/components/Menu.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ui/components/Menu.cpp b/src/ui/components/Menu.cpp index c6be942a..ea1afc07 100644 --- a/src/ui/components/Menu.cpp +++ b/src/ui/components/Menu.cpp @@ -78,8 +78,7 @@ void Menu::AddTextItemAt(std::string text, Index index, PopupMenu::PopupMenu(controls::Control* attached_control) : attached_control_(attached_control) { menu_.SetOnItemClick([this](Index) { popup_->GetNativeWindow()->Close(); }); - popup_.reset(controls::Window::CreatePopup()); - popup_->SetAttachedControl(attached_control); + popup_.reset(controls::Window::CreatePopup(attached_control)); popup_->InsertChildAt(menu_.GetRootControl(), 0); } |
