| Crates.io | egui_float_scroller |
| lib.rs | egui_float_scroller |
| version | 0.1.1 |
| created_at | 2024-11-07 04:01:26.096619+00 |
| updated_at | 2024-11-07 04:14:45.851581+00 |
| description | A fixed-size scrollbar widget for egui |
| homepage | |
| repository | https://github.com/yourusername/egui-fixed-scrollbar |
| max_upload_size | |
| id | 1439462 |
| size | 108,098 |
A fixed-size scrollbar widget for egui that provides a simple way to add scrollbars to your egui applications which modify floats.
Add to your Cargo.toml:
[dependencies]
egui-fixed-scrollbar = "0.1.0"
Basic usage:
use egui_fixed_scrollbar::FixedScrollbar;
let scrollbar = FixedScrollbar::new(0.0);
// As a side panel:
scrollbar.show_in_side_panel(ctx, "my_scrollbar");
// As a floating element:
scrollbar.show_floating(ui, egui::pos2(100.0, 100.0));
// Or docked to an area:
let area = ui.available_rect_before_wrap();
scrollbar.show_docked(ui, area);
// Or directly added to a UI:
ui.add(scrollbar);
Licensed under either of
at your option.
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.