1
0
mirror of https://github.com/emilk/egui.git synced 2026-06-26 22:53:14 -04:00

Add Context::open_url and Context::copy_text (#3380)

* Add Context::open_url

* Add `Context::copy_text`

* Fix doctest

* Fix another doctest
This commit is contained in:
Emil Ernerfeldt
2023-09-24 09:31:21 +02:00
committed by GitHub
parent d77c446572
commit 99a1b5b62e
10 changed files with 48 additions and 23 deletions

View File

@@ -28,7 +28,7 @@ impl eframe::App for MyApp {
ui.horizontal(|ui| {
ui.monospace(cmd);
if ui.small_button("📋").clicked() {
ui.output_mut(|o| o.copied_text = cmd.into());
ui.ctx().copy_text(cmd.into());
}
});