diff options
author | HampusM <hampus@hampusmat.com> | 2024-10-17 00:53:41 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-10-17 00:53:41 +0200 |
commit | fba9e553cc663881f22a2a5da8fbc21433837e35 (patch) | |
tree | 86c6c64610cffaa1b15fa451a016cc42c4ebb799 | |
parent | ee5aa421f1d17f59fa8ee6df973d510dc02825ab (diff) |
feat(glfw): add variants associated array to Key enum
-rw-r--r-- | glfw/src/window.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/glfw/src/window.rs b/glfw/src/window.rs index eaa0c56..5c30c16 100644 --- a/glfw/src/window.rs +++ b/glfw/src/window.rs @@ -5,7 +5,7 @@ use std::io::{stdout, Write}; use std::ptr::null_mut; use bitflags::bitflags; -use util_macros::FromRepr; +use util_macros::{FromRepr, VariantArr}; use crate::init::{initialize, Glfw}; use crate::{get_glfw_error, Error}; @@ -525,7 +525,8 @@ pub enum CursorMode Normal = crate::ffi::GLFW_CURSOR_NORMAL, } -#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromRepr)] +#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, FromRepr, VariantArr)] +#[variant_arr(name = KEYS)] #[repr(i32)] pub enum Key { |