Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make io related enums to support serde Serialize/Deserialize #769

Open
ruby3141 opened this issue Mar 27, 2024 · 0 comments
Open

Make io related enums to support serde Serialize/Deserialize #769

ruby3141 opened this issue Mar 27, 2024 · 0 comments

Comments

@ruby3141
Copy link

Is your feature request related to a problem? Please describe.

Because imgui::Key does not support serde, this kind of thing is not possible.

use serde::{Deserialize, Serialize};
use imgui::Key;

#[derive(Serialize, Deserialize)]
pub struct HoykeyConfig {
    some_hotkey: Key,
    // ...
}

Providing proxy enum to use #[serde(remote="...")] is kind of viable, but not recommendable since imgui::Key has 140 entries.

Describe the solution you'd like

Make io related enums of this crate to derive serde::{Serialize, Deserialize}.

ruby3141 added a commit to ruby3141/DJMAXPlus that referenced this issue Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant