Expand description
Experimental GUI library, powered by Bevy engine.
Example:
use bevy::prelude::*;
use famiq::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugins(FamiqPlugin::new()) // add plugin
.add_systems(Startup, setup_ui)
.run();
}
fn setup_ui(
mut fa_query: FaQuery, // required
mut famiq_res: ResMut<FamiqResource>, // required
) {
FamiqBuilder::new(&mut fa_query, &mut famiq_res).inject();
let txt = text!(text: "Hello world");
let btn = button!(text: "Press me");
container!(children: [txt, btn]);
// or
container!(children: [
text!(text: "Hello world"),
button!(text: "Press me")
]);
}Re-exports§
pub use prelude::*;
Modules§
- errors
- event_
writer - plugin
- Famiq’s plugin.
- prelude
- reactivity
- resources
- Famiq’s global resources, used by all modules.
- utils
- widgets
- Famiq’s built-in widgets.
Macros§
- button
- Macro for creating a button.
- button_
attributes - checkbox
- Macro for creating a checkbox.
- choices_
attributes - circular
- Macro for creating a spinning circular.
- circular_
attributes - common_
attributes - Macro for setting common attributes to a widget.
- container
- Macro for creating a container.
- container_
attributes - dialog
- Macro for creating a modal.
- dialog_
attributes - extract_
children - Macro to extract children’s entities from children attributes.
- fps
- Macro for creating fps count.
- fps_
text_ attributes - image
- Macro for creating an image.
- image_
attributes - progress_
bar - Macro for creating a progress bar.
- progress_
bar_ attributes - scroll
- Macro for creating a scrollable container.
- scroll_
attributes - selection
- Macro for creating a single choice selector.
- selection_
attributes - text
- Macro for creating a text.
- text_
attributes - text_
input - Macro for creating a single line text input. Clipboard is not supported yet on WASM.
- text_
input_ attributes