@@ -210,18 +210,18 @@ impl MenuBar {
210
210
211
211
self . handle_clipboard ( ctx, state, errors) ;
212
212
213
- egui:: menu :: bar ( ui, |ui| {
213
+ egui:: MenuBar :: new ( ) . ui ( ui, |ui| {
214
214
ui. menu_button ( "File" , |ui| {
215
215
if ui. button ( "Open" ) . clicked ( ) {
216
216
self . choose_file ( FileType :: Instructions , future_helper, MenuEvent :: file_open) ;
217
- ui. close_menu ( ) ;
217
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
218
218
}
219
219
220
220
ui. menu_button ( "Import" , |ui| {
221
221
for import_format in IMPORT_FORMATS {
222
222
if ui. button ( import_format. name ( ) ) . clicked ( ) {
223
223
self . current_import_options = Some ( ( import_format. into ( ) , None ) ) ;
224
- ui. close_menu ( ) ;
224
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
225
225
}
226
226
}
227
227
} ) ;
@@ -234,7 +234,7 @@ impl MenuBar {
234
234
ui. separator ( ) ;
235
235
if ui. button ( "Quit" ) . clicked ( ) {
236
236
ctx. send_viewport_cmd ( egui:: ViewportCommand :: Close ) ;
237
- ui. close_menu ( ) ;
237
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
238
238
}
239
239
}
240
240
} ) ;
@@ -257,7 +257,7 @@ impl MenuBar {
257
257
ui. menu_button ( "Help" , |ui| {
258
258
if ui. button ( "About" ) . clicked ( ) {
259
259
self . about_open = true ;
260
- ui. close_menu ( ) ;
260
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
261
261
}
262
262
} ) ;
263
263
} ) ;
@@ -479,12 +479,12 @@ mod selection_menu {
479
479
ui. menu_button ( M :: NAME , |ui| {
480
480
if ui. button ( "Open" ) . clicked ( ) {
481
481
menu_bar. choose_file ( M :: FILE_TYPE , future_helper, MenuEvent :: file_open) ;
482
- ui. close_menu ( ) ;
482
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
483
483
}
484
484
#[ cfg( not( target_arch = "wasm32" ) ) ]
485
485
if ui. button ( "Import" ) . clicked ( ) {
486
486
menu_bar. choose_file ( M :: FILE_TYPE , future_helper, MenuEvent :: file_import) ;
487
- ui. close_menu ( ) ;
487
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
488
488
}
489
489
490
490
ui. separator ( ) ;
@@ -544,7 +544,7 @@ mod selection_menu {
544
544
. inner ;
545
545
if select_button. clicked ( ) {
546
546
actions. push ( Action :: Set ( id. to_string ( ) ) ) ;
547
- ui. close_menu ( ) ;
547
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
548
548
}
549
549
550
550
// Render delete button
@@ -666,7 +666,7 @@ pub mod export {
666
666
. clicked ( )
667
667
{
668
668
self . export_settings . show ( ) ;
669
- ui. close_menu ( ) ;
669
+ ui. close_kind ( egui :: UiKind :: Menu ) ;
670
670
}
671
671
}
672
672
0 commit comments