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 implemented in around 20 lines of code (If you don't use fancy bracket formatting)
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 *;
use *;
use modules;
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
Just remember the reason only the bugs are highlighted: there are way more things that work than things that don't.
Visual Issues
- [4] Button hover/click highlight only appears in unselected GUI; during text motion, only click highlight fails.
- [0] Lever module is not smooth.
- [6] (Plugin makers) Single insert mode overwrites image data of other modules. Use replace all instead.
Functional Issues
- [0] Text input auto selects a structure when clicking after the last character (first-time selection).
- [2] Text input can select itself through other windows.
- [6] Crank module rotation is slightly offset.
Planned Additions
- [4] Color picker missing.
- [4] Struct editor unfinished.
- [7] (Plugin makers) Return layers not supported.
- [3] Text input drag to select not yet implemented.
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:
- A lightweight registry system for modularity and plugin support
- Good performance for non GPU environments (Optional caching)
- Minimal integration effort
Default Modules (Alphabetically sorted):
Widgets (15-3):
- Button => Hover and click
- Checkbox => Click to cycle through any amount of states
- Color Picker => Unimplemented!
- 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
- List select => Unimplemented!
- Number display => Text module for numbers
- 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
- Struct Editor => Unimplemented!
- Text Input => Virtual text box (Supports custom keybinds)
- Text => Display text
Decoration (4):
- 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