mirror of
https://github.com/emilk/egui.git
synced 2026-09-02 06:40:06 -04:00
Fix incorrect documentation for Response::context_menu
Closes https://github.com/emilk/egui/issues/1882
This commit is contained in:
@@ -524,8 +524,9 @@ impl Response {
|
|||||||
/// Response to secondary clicks (right-clicks) by showing the given menu.
|
/// Response to secondary clicks (right-clicks) by showing the given menu.
|
||||||
///
|
///
|
||||||
/// ```
|
/// ```
|
||||||
|
/// # use egui::{Label, Sense};
|
||||||
/// # egui::__run_test_ui(|ui| {
|
/// # egui::__run_test_ui(|ui| {
|
||||||
/// let response = ui.label("Right-click me!");
|
/// let response = ui.add(Label::new("Right-click me!").sense(Sense::click()));
|
||||||
/// response.context_menu(|ui| {
|
/// response.context_menu(|ui| {
|
||||||
/// if ui.button("Close the menu").clicked() {
|
/// if ui.button("Close the menu").clicked() {
|
||||||
/// ui.close_menu();
|
/// ui.close_menu();
|
||||||
|
|||||||
Reference in New Issue
Block a user