Skip to content

fixed examples #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 5 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,8 @@ copypasta = "0.8"
glium = { version = "0.35.0", default-features = true }
image = "0.23"

imgui = { version = "0.12", features = ["tables-api"] }
imgui-glium-renderer = "0.13.0"
imgui-winit-support = "0.13.0"

# Since the examples aren't included, it's very convenient to
# make a patch here to test various things
# [patch.crates-io]
# imgui = { path = "path/to/local/imgui/here" }
imgui-glium-renderer = { version = "0.13.0", git = "https://github.com/imgui-rs/imgui-glium-renderer" }
imgui = { git = "https://github.com/imgui-rs/imgui-rs", version = "0.12", features = [
"tables-api",
] }
imgui-winit-support = { version = "0.13", git = "https://github.com/imgui-rs/imgui-winit-support" }
8 changes: 0 additions & 8 deletions examples/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,6 @@ fn main() {
home_counter += 1;
}
ui.text(format!("Home has been pressed for {} frames", home_counter));
// It is important to remember that unlike using
// `imgui::Key`, there is nothing enforcing the index
// is the key you expect. For example if you hardcode
// your key ID's and switch backends, you may be
// querying different keys!
if ui.io().keys_down[123] {
// A mystery key is down!
}

// It is also possible to use the `is_key_...` methods
// with arbitrary key indexes. For example, to check
Expand Down
2 changes: 1 addition & 1 deletion examples/test_window_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ fn show_example_menu_file(ui: &Ui, state: &mut FileMenuState) {

ui.child_window("child")
.size([0.0, 60.0])
.border(true)
.child_flags(ChildFlags::BORDERS)
.build(|| {
for i in 0..10 {
ui.text(format!("Scrolling Text {}", i));
Expand Down