Crates.io | arcdps-imgui |
lib.rs | arcdps-imgui |
version | 0.8.0 |
source | src |
created_at | 2022-02-27 03:47:23.388652 |
updated_at | 2022-02-27 03:47:23.388652 |
description | High-level Rust bindings to dear imgui; forked for use in arcdps addons |
homepage | https://github.com/gw2scratch/imgui-rs |
repository | https://github.com/gw2scratch/imgui-rs |
max_upload_size | |
id | 540211 |
size | 519,712 |
Addons for arcdps are restricted to an older version of Dear ImGui. This is a fork of imgui-rs 0.8.0 that is compatible with Dear ImGui 1.80 intended for use by arcdps addons.
input_text
widget not resizing
the buffer correctly and segfaulting.Window::new("Hello world")
.size([300.0, 100.0], Condition::FirstUseEver)
.build(&ui, || {
ui.text("Hello world!");
ui.text("こんにちは世界!");
ui.text("This...is...imgui-rs!");
ui.separator();
let mouse_pos = ui.io().mouse_pos;
ui.text(format!(
"Mouse Position: ({:.1},{:.1})",
mouse_pos[0], mouse_pos[1]
));
});
winit
crate (latest by default, but earlier versions are supported via feature flags)imgui
crateglium
crateAdditionally, the following are no longer maintained, but might work still:
gfx
crate (not
the new gfx-hal crate)glow
/ glium
The MSRV for imgui-rs
and all of the backend crates is 1.54. We update our MSRV periodically, and issue a minor bump for it.
Almost every application that uses imgui-rs needs two additional components in
addition to the main imgui
crate: a backend platform, and a renderer.
The backend platform is responsible for integrating imgui-rs with the operating system and its window management. Its responsibilities include the following:
The renderer is responsible for taking generic, renderer-agnostic draw lists generated by imgui-rs, and rendering them using some graphics API. Its responsibilities include the following:
The most tested platform/renderer combination is imgui-glium-renderer
+
glium
+ imgui-winit-support
+ winit
, but this is not the only possible
combination. There's also imgui-glow-renderer
, which will increasingly replace
glium
, and you can find additional 3rd party crates that provide a wider
support for more libraries (e.g. raw OpenGL, SDL2). You can also write your own
support code if you have a more advanced use case, because imgui-rs is not tied to any specific graphics / OS API.
git clone https://github.com/imgui-rs/imgui-rs
cd imgui-rs
git submodule update --init --recursive
Main examples are located in the imgui-examples
directory.
# At the reposity root
cd imgui-examples
cargo test
cargo run --example hello_world
cargo run --example test_window
cargo run --example test_window_impl
Examples for the gfx backend are under the imgui-gfx-examples directory.
cd imgui-gfx-examples
cargo test
cargo run --example gfx_hello_world
cargo run --example gfx_test_window
Note to Windows users: You will need to use the MSVC ABI version of the Rust compiler along with its associated dependencies to build this libary and run the examples.
Change or add something
Make sure you're using the latest stable Rust
Run rustfmt to guarantee code style conformance
rustup component add rustfmt
cargo fmt
Open a pull request in Github
Licensed under either of
at your option.
Uses Dear ImGui and cimgui.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.