egui_grid
Create dynamic grid layouts for egui.
Grids are flexible, easy to create, with behavior similar to egui_extra's strip creation. They're compact and allow for more complex layouts using less indentation, with functionalities like nesting grids and aligning cells within a row.
Installing
Add this to your Cargo.toml:
[]
= "0.5.1"
Example
// Quick example, by no means does it fully demo
// how flexible building grids can be.
use GridBuilder;
use Size;
new
// Allocate a new row
.new_row
// Give this row a couple cells
.cell
.cell
// Allocate another row
.new_row
// Batch method, allocate multiple cells at once
.cells
.show;
Grid Nesting Example
// You can nest grids, allowing for complex layouts without much indentation
use GridBuilder;
use Size;
// The grid which will be nested
let nested_grid = new
// 2 rows, with 1 cell each
.new_row.cell
.new_row.cell;
// The main grid, of which one cell will receive the nested grid
new
// One row with 3 cells
.new_row
.cell
.cell .nest // Nesting the grid in the middle cell
.cell
.show;
Usage
Check the docs for details and more info on usage.
Issues
Currently this is feature complete. Bug fixes, optimizations, and staying up to date with egui releases are the only ways this crate will be expanding for the foreseeable future.
While you are free to open an issue, contacting me (@mythit) on the egui discord server might be more worth your time.