Blue Engine egui plugin
To get started, create a new struct that will contain your GUI code. For our example:
Then We'll implement the
Gui trait of the plugin:
And finally your EGUI code:
// Create a new egui window to contain the UI new.show;
One more steps is left to be done to have the plugin working. We need to initialize the plugin before update loop:
let gui_context = EGUInew;
This will essentially initializes the egui and create things required to run the plugin. The engine will then run it twice, once before everything else to fetch all inputs and events, and then during render, so that it displays the GUI. And all that's left, is to add the plugin to the engine:
Congrats now you have a working GUI!
The guide will come soon, it's cool I promise!
Check the examples folder for potential UIs and as template for your new projects.
blue_engine: Used obiously for exporting some components and struct declrations required to design the API
egui-wgpu: Used to assist in applying egui to wgpu graphics backend. Which is same graphics backend used in Blue Engine.
egui-winit: Support for Winit windowing. Which is same windowing system used in Blue Engine.
egui: The egui itself, required to obtain components and declrations for api design.