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:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user