Closed Godnoken closed 7 months ago
Thanks for contributing to bevy_dev_console!
You can already change how the dev console looks by inserting the ConsoleConfig
resource via App::insert_resource
. (It doesn't matter if it's before or after the DevConsolePlugin
)
This works because App::init_resource::<ConsoleConfig>()
(what we use in DevConsolePlugin
) does not override the ConsoleConfig
resource if it was already defined.
Here's an example:
App::new()
.insert_resource(ConsoleConfig {
theme: ConsoleTheme::ONE_DARK,
open_key: KeyCode::Escape
})
.add_plugins((
ConsoleLogPlugin::default(),
DefaultPlugins.build().disable::<LogPlugin>(),
DevConsolePlugin,
))
.run();
So I don't think this PR is necessary in that case, since you could already customize it.
Doh! Had no idea that it was possible to do that.
Thank you very much for this crate, it will be very useful & time saving for me.
Thank you for using my crate, I'm glad you like it.
Objective
Let the user change the theme & 'open console' key.
Having a modifiable key is especially important, as the KeyCode::Grave simply isn't useable on my Swedish keyboard.
Solution
Add
ConsoleConfig
as a param toDevConsolePlugin
I don't have any real experience with how things should be written in this aspect, so let me know if anything ought to be done differently.