mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 22:30:03 -04:00
Add web location info to egui_web/epi (#1258)
This adds all parts of the web "location" (URL) to frame.info().web_info, included a HashMap of the query parameters, percent-decoded and ready to go. This lets you easily pass key-value pairs to your eframe web app.
This commit is contained in:
@@ -172,6 +172,12 @@ impl BackendPanel {
|
||||
|
||||
show_integration_name(ui, &frame.info());
|
||||
|
||||
if let Some(web_info) = &frame.info().web_info {
|
||||
ui.collapsing("Web info (location)", |ui| {
|
||||
ui.monospace(format!("{:#?}", web_info.location));
|
||||
});
|
||||
}
|
||||
|
||||
// For instance: `egui_web` sets `pixels_per_point` every frame to force
|
||||
// egui to use the same scale as the web zoom factor.
|
||||
let integration_controls_pixels_per_point = ui.input().raw.pixels_per_point.is_some();
|
||||
|
||||
Reference in New Issue
Block a user