1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 21:30:03 -04:00

Add support for hyperlinks

This commit is contained in:
Emil Ernerfeldt
2020-04-23 19:15:17 +02:00
parent 25b06a6ff0
commit b39555bb23
18 changed files with 211 additions and 55 deletions

View File

@@ -84,6 +84,28 @@ impl GuiInput {
}
}
#[derive(Clone, Default, Serialize)]
pub struct Output {
pub cursor_icon: CursorIcon,
/// If set, open this url.
pub open_url: Option<String>,
}
#[derive(Clone, Copy, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum CursorIcon {
Default,
/// Pointing hand, used for e.g. web links
PointingHand,
ResizeNwSe,
}
impl Default for CursorIcon {
fn default() -> Self {
CursorIcon::Default
}
}
// ----------------------------------------------------------------------------
#[derive(Clone, Copy, Debug, Default, Serialize)]