imgui-log
A logger that routes logs to an imgui window.
Supports both standalone mode (hook into your ui yourself), and an amethyst-imgui system (automatically rendered every frame).
Setup
Add this to your Cargo.toml
[]
= "0.1.0"
Basic Example
// Start the logger
let log = init;
// Create your UI
let ui: Ui = ... ;
// Render loop
loop
Configuring
A default config is provided, but you are free to customize the format string, coloring, etc if desired.
;
init_with_config
Amethyst usage
Enable the amethyst-system
feature.
[]
= { = "0.1.0", = ["amethyst-system"] }
Replace imgui::init
with imgui_log::create_system
and add it to your app's .with()
statements
Add the RenderImgui
plugin if it is not already being used.
(This is re-exported from the amethyst-imgui
crate for your convenience)
use RenderImgui;
/// ....
let app_root = application_root_dir?;
let display_config_path = app_root.join;
let game_data = default
.with_barrier
.with // <--- ADDED LINE
.with_bundle?
.with_bundle?;
build?.build?.run;