Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Dear Mirl Gui
A registry-based, retained-mode, modular GUI library for Mirl, inspired by Dear ImGui.
Or in simpler terms: A debug window crate designed and tailored to work with Mirl. It can be inserted into a standart drawing routine in less than 20 lines of code
It is by no means as good as Dear Imgui or its native rust ports but I have yet to see one of them run smoothly on the cpu.
Default modules are listed at the bottom
Integration:
Further infos about every available module can be found within the docstring of that module.
How to use:
use *; // Global functions for module management
use modules; // All the modules that are provided by default
use *; // Default mirl windowing traits
// You can also use these two lines
// use mirl::prelude::*;
// use dear_mirl_gui::prelude::*;
Examples (Used for internally for testing of modules)
You can use either of these:
- 'cargo test -p dear_mirl_gui --features debug-window -- --nocapture'
- 'cargo test -p dear_mirl_gui --release --features debug-window -- --nocapture'
Or if you also want to see experimental features use these:
- 'cargo test -p dear_mirl_gui --features experimental -- --nocapture'
- 'cargo test -p dear_mirl_gui --release --features experimental -- --nocapture'
Currently Known Problems
Currently known issues are listed within the docstring of lib.rs to avoid error-syncing issues
Design Philosophy
The goal of the lib is to be both as extendable as possible (using a single trait) while also providing seamless working conditions for devs. It's built with these purposes in mind:
For users:
- Minimal integration efforts due to being optimized for mirl
- Good performance for non GPU environments (Optional caching)
For plugin devs (Api details):
- Every module has freedom over only themselves by default, no worrying about other modules messing up values
- Every window updates containing modules, providing relative mouse positions and container id
- Module can choose wether it wants to look the same on all windows or have unique looks/behaviour with automatic caching.
- Module can define custom offsets when default formatting is insufficient
Default Modules (Alphabetically sorted):
Widgets (16-3):
- Button => Hover and click
- Checkbox => Click to cycle through any amount of states
- Crank => Get rotational data
- Image button => A button that instead of showing text, displays an image
- Image => A static image
- Lever => Up or Down, boolean input
- Number display => Text module specifically for numbers
- Number Input => A virtual textbox that only accepts numbers (No float support yet)
- Progress bar => From 0% to 100% (Can be vertical)
- Selection => Radio Buttons with the option of selecting multiple options
- Slider => Slider from 0 to 1 supporting custom ranges
- Text Input => Virtual text box (Supports custom keybinds)
- Text Display => Display text
To be added (3):
- Color Picker => Pick a rgb(a) color
- List select => Select a value from a list of strings
- Struct Editor => Visually edit a struct
Decoration (4-1):
- Custom Offset => Set custom offset between modules
- Line => A simple divider
- Reset Offset => Returns further modules back to the front of the container
- Same line => Puts the next module on the same height as the previous ones
To be added (1):
- Tooltip => Show a piece of text when hovering over an area for a while