Window examples
The engine's window examples: what each one shows, whether it runs in a browser and the command that runs it.
Window settings, multiple windows, cursors, transparency, scale factors and screenshots. There are 11 examples on this page. For the concepts behind them, see Windows.
Run any of them from the engine core's workspace (the folder of the engine source that holds the neo crate's Cargo.toml); see Run an example.
Examples#
| Example | What it shows | Web | Run |
|---|---|---|---|
| Clear Color | Creates a solid color window | Yes | cargo run --example clear_color |
| Custom Cursor Image | Demonstrates creating an animated custom cursor from an image | Yes | cargo run --example custom_cursor_image --features custom_cursor |
| Low Power | Demonstrates settings to reduce power use for neo applications | Yes | cargo run --example low_power |
| Monitor info | Displays information about available monitors (displays). | No | cargo run --example monitor_info |
| Multiple Windows | Demonstrates creating multiple windows, and rendering to them | No | cargo run --example multiple_windows |
| Scale Factor Override | Illustrates how to customize the default window settings | Yes | cargo run --example scale_factor_override |
| Screenshot | Shows how to save screenshots to disk | Yes | cargo run --example screenshot |
| Transparent Window | Illustrates making the window transparent and hiding the window decoration | No | cargo run --example transparent_window |
| Window Drag Move | Demonstrates drag move and drag resize without window decoration | No | cargo run --example window_drag_move |
| Window Resizing | Demonstrates resizing and responding to resizing a window | Yes | cargo run --example window_resizing |
| Window Settings | Demonstrates customizing default window settings | Yes | cargo run --example window_settings |