1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-02 06:40:06 -04:00

feat: Derive (de)serialize for Key (#213)

This commit is contained in:
Ridan Vandenbergh
2021-03-08 22:09:30 +01:00
committed by GitHub
parent 44cd304cdf
commit f1c6d2b59c

View File

@@ -170,6 +170,7 @@ impl Modifiers {
/// Many keys are omitted because they are not always physical keys (depending on keyboard language), e.g. `;` and `§`, /// Many keys are omitted because they are not always physical keys (depending on keyboard language), e.g. `;` and `§`,
/// and are therefor unsuitable as keyboard shortcuts if you want your app to be portable. /// and are therefor unsuitable as keyboard shortcuts if you want your app to be portable.
#[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)] #[derive(Clone, Copy, Debug, Eq, Ord, PartialEq, PartialOrd, Hash)]
#[cfg_attr(feature = "persistence", derive(serde::Deserialize, serde::Serialize))]
pub enum Key { pub enum Key {
ArrowDown, ArrowDown,
ArrowLeft, ArrowLeft,