bevy_pages 0.3.2

A lightweight and elegant framework to upgrade your Bevy UI experience.
Documentation

bevy_pages

A lightweight and elegant framework to upgrade your Bevy UI experience.


crates.io docs.rs Following released Bevy versions


This is a crate extending bevy to add support for XML-based UI pages. Kinda like an HTML page, but with XML

Features

  • 🪽 Lightweight: Bevy is already huge enough. This crate focuses on extending bevy with minimum overhead and quick compilation, so it only has a few core dependencies and even the XML parsing is partially done manually.

  • ⚡ Fast: The only existent overhead is parsing the XML files, which is already very fast. The plugin itself only adds basic functionality for handling events and elements.

  • 📜 Expressive: Use the power of XML to create dynamic and interactive UIs with ease and simple syntax.

  • ✒️ Fully documented: I added my signature #[warn(missing_docs)] 😊

  • 👁️ Built-in Auto-Completion: Use the official XSD Schema to enable auto-completion inside your favorite IDE.

  • ✨ Extended Widget Catalog: The framework has a lot of complex extra widgets like a dropdown, a scroll view or a text input widget.

Getting Started

After adding bevy_pages to your project, you can start coding your XML pages.

An XML page roughly looks like this:

<?xml version="1.0" encoding="utf-8"?>
<Page
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="https://raw.githubusercontent.com/DraftedDev/bevy_pages/master/schema.xsd">
    <!-- Your page content here -->
</Page>

NOTE: If you have issues with the remote schema.xsd, you are free to download it locally and link it in your XML.

You will also need to add the PagesPlugin to your app and use the PageSpawner to spawn your page:

fn spawn_my_page(assets: Res<AssetServer>, mut spawner: ResMut<PageSpawner>) {
    let page = assets.load("my_page.xml");

    spawner.spawn(page);
}

Learning Resources

Bevy Support

The following table shows the supported bevy versions:

bevy bevy_pages
0.19 0.1.0 - latest