mirror of
https://github.com/emilk/egui.git
synced 2026-06-26 22:53:14 -04:00
Rename Panel methods (#8192)
The three methods for showing a `Panel` are now: * `panel.show`: always show the panel. * `panel.show_collapsible`: show or hide the panel, with a slide animation in between. * `Panel::show_switched`: animate between two different panels: a thin/collapsed one and a thick/expanded one.
This commit is contained in:
@@ -9,7 +9,7 @@ fn main() -> eframe::Result {
|
||||
let options = eframe::NativeOptions::default();
|
||||
eframe::run_ui_native("My egui App", options, move |ui, _frame| {
|
||||
// A bottom panel to force the tooltips to consider if the fit below or under the widget:
|
||||
egui::Panel::bottom("bottom").show_inside(ui, |ui| {
|
||||
egui::Panel::bottom("bottom").show(ui, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
ui.vertical(|ui| {
|
||||
ui.label("Single tooltips:");
|
||||
@@ -33,7 +33,7 @@ fn main() -> eframe::Result {
|
||||
});
|
||||
});
|
||||
|
||||
egui::CentralPanel::default().show_inside(ui, |ui| {
|
||||
egui::CentralPanel::default().show(ui, |ui| {
|
||||
ui.horizontal(|ui| {
|
||||
if ui.button("Reset egui memory").clicked() {
|
||||
ui.memory_mut(|mem| *mem = Default::default());
|
||||
|
||||
Reference in New Issue
Block a user