mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-14 23:18:28 +00:00
35 lines
929 B
Markdown
35 lines
929 B
Markdown
# imgui-rs: Rust bindings for ImGui
|
|
|
|
**Ultra hyper turbo cyber mega extra über experimental!!!**
|
|
|
|

|
|
|
|
```rust
|
|
frame.window()
|
|
.name(im_str!("Hello world"))
|
|
.size((300.0, 100.0), ImGuiSetCond_FirstUseEver)
|
|
.build(|| {
|
|
frame.text(im_str!("Hello world!"));
|
|
frame.text(im_str!("This...is...imgui-rs!"));
|
|
frame.separator();
|
|
let mouse_pos = frame.imgui().mouse_pos();
|
|
frame.text(im_str!("Mouse Position: ({:.1},{:.1})", mouse_pos.0, mouse_pos.1));
|
|
})
|
|
```
|
|
|
|
## Compiling and running the demos
|
|
|
|
git clone https://github.com/Gekkio/imgui-rs
|
|
cd imgui-rs
|
|
git submodule update --init --recursive
|
|
cargo test
|
|
|
|
target/debug/examples/hello_world
|
|
target/debug/examples/test_window
|
|
|
|
## License
|
|
|
|
imgui-rs is licensed under the MIT license.
|
|
|
|
Uses [ImGui](https://github.com/ocornut/imgui) and [cimgui](https://github.com/Extrawurst/cimgui).
|