doonv / bevy_dev_console

Source-inspired developer console plugin for the Bevy game engine.
Apache License 2.0
121 stars 11 forks source link

Render dev console in any container #25

Closed cschram closed 2 months ago

cschram commented 5 months ago

What problem does this solve or what need does it fill?

Some programs may want to integrate the dev console into another UI as part of a more complete debugging/development interface. Currently the is not possible with bevy_dev_console.

What solution would you like?

Provide a function that will render the dev console UI (what is currently contained only within the console window in ui::render_ui) inside any egui UI. This could look something like this:

pub fn ui_for_dev_console(
    log: &[(LogMessage, bool)],
    command: &mut String,
    // ... any other dependencies - `ConsoleConfig`, etc.
    ui: &mut egui::Ui,
) {
    // ...
}

What alternative(s) have you considered?

¯_(ツ)_/¯

Additional context

The manual UI functions that bevy_inspector_egui provides are a good example of how this would work.