A little wrapper I've written for creating UI screens from files for the BevyEngine.

Related tags

GUI gerg-ui
Overview

UI Screens for BevyEngine

version downloads

This is a little thing I put together for creating simple UI screens using the BevyEngine. The idea is to define the screens in a sort of poor-man's markup and this crate will then provide some functions to create the UI 'objects'.

For example, the following in a file will create a screen looking like:

sample_picture

with the calling code:

let lines = gerg_ui::read_ui_file("screen1.ui");
let controls = gerg_ui::instantiate_controls(lines);
let _entities = gerg_ui::spawn_controls(&mut commands, asset_server, materials, controls), Vec2::new(1920.0, 1080.0);

or:

let controls = gerg_ui::instantiate_controls_from_file("screen1.ui");
let _entities = gerg_ui::spawn_controls(&mut commands, asset_server, materials, controls), Vec2::new(1920.0, 1080.0);
--global_settings--
font_name: CrimsonText-Regular.ttf
font_size: 30
color: #FFFFFF // can also use: 255;255;255 or WHITE
--end--

--picture_box--
name: frame1
texture_name: big_frame.png
size: 300;450
center_position: -800;300
draw_order: 0
--end--

--picture_box--
name: frame2
texture_name: small_frame.png
size: 200;300
draw_order: 0.1
dock_with: frame1.top_middle<->this.top_middle
offset: 0;-30
--end--

--picture_box--
name: frame3
texture_name: big_frame.png
size: 300;450
draw_order: 0.2
dock_with: frame1.center_right<->this.center_left
offset: 50;0
--end--

--label--
name: label1
size: 100;50
text_string: Test1
font_size: 50
color: CYAN
dock_with: frame2.top_left<->this.top_left
offset: 15;-15
--end--

--label--
name: label2
size: 100;50
text_string: Test2
font_name: CrimsonText-Bold.ttf
font_size: 50
color: AMERICAN ROSE
dock_with: label1.bottom_left<->this.top_left
--end--

--label--
name: label3
size: 270;420
text_string: How great was the West Indian cricket team of the 70''s and 80''s? Marshall, Holding, Garner, Croft, Roberts bowling... Richards, Greenidge, Haynes batting. Brilliant stuff. Were the Aussies of the 90''s, 2000''s better, I don''t think so, but Warne and McGrath made a formidable combination.
font_size: 25
color: CANARY YELLOW
dock_with: frame3.top_left<->this.top_left
offset: 15;-15
--end--
You might also like...
A chess engine written from scratch in Rust ♞
A chess engine written from scratch in Rust ♞

Walleye Walleye is a chess engine written completely in rust. Walleye is a UCI-compatible engine written using the classical alpha-beta style AI. It s

A floating, tag-based window manager written in Rust
A floating, tag-based window manager written in Rust

worm worm is a floating, tag-based window manager for X11. It is written in the Rust programming language, using the X11RB library. Install cargo buil

D3D9 Window overlay written in Rust

win-overlay (-rs) DirectX overlay written in Rust for various projects, wanted to easily create overlays across projects so decided to write my own im

Highly customizable finder with high performance. Written in Rust and uses GTK
Highly customizable finder with high performance. Written in Rust and uses GTK

Findex Highly customizable finder with high performance. Written in Rust and uses GTK Installation Automatic Binary Clone from https://aur.archlinux.o

A simple GUI version of the pH calibration tool written in egui, based on the eframe template.

caliphui A simple GUI version of the pH calibration tool written in egui, based on the eframe template. Usage Native binaries are provided under relea

GUI based tool to sort and categorize images written in Rust
GUI based tool to sort and categorize images written in Rust

ImageSieve GUI based tool to sort out images based on similarity, categorize them according to their creation date and archive them in a target folder

A simple note taking application written in Rust and GTK4
A simple note taking application written in Rust and GTK4

Rnote A simple note taking application written in Rust and GTK4. Rnote aims to be a simple but functional note taking application for freehand drawing

Cross-platform GUI toolkit written in Rust
Cross-platform GUI toolkit written in Rust

Tuix is a cross-platform GUI toolkit written in Rust. The driving principle behind tuix is to be a self-contained, small-as-possible, but still fast,

Winsafe-examples - Examples of native Windows applications written in Rust with WinSafe.
Winsafe-examples - Examples of native Windows applications written in Rust with WinSafe.

WinSafe examples This repo contains several examples of native Win32 applications written in Rust with WinSafe. All examples follow the same program s

Owner
Greg Moller
C#, Oracle, PostgreSQL BLOBA developer by day, frustrated game hobbyist developer by night.
Greg Moller
Sycamore - A reactive library for creating web apps in Rust and WebAssembly

Sycamore What is Sycamore? Sycamore is a modern VDOM-less web library with fine-grained reactivity. Lightning Speed: Sycamore harnesses the full power

Sycamore 1.8k Jan 5, 2023
A tool for creating egui Visuals (themes).

egui-visuals-utility A tool for creating egui Visuals (themes). The code is rather messy and might crash but it seems to work. To load the theme use s

null 7 Jan 13, 2023
Clear Coat is a Rust wrapper for the IUP GUI library.

Clear Coat Clear Coat is a Rust wrapper for the IUP GUI library. IUP uses native controls and has Windows and GTK backends. A macOS backend has been o

Jordan Miner 18 Feb 13, 2021
A desktop application wrapper for CovidValidator.app

A desktop application wrapper for CovidValidator.app Check EU Digitial Covid Certificates with ease and validate them against local or country rules.

Timo Koenig 2 Mar 15, 2022
Unsafe bindings and a safe wrapper for gtk4-layer-shell, automatically generated from a .gir file

gtk4-layer-shell: gtk4-layer-shell-sys: gtk4-layer-shell This is the safe wrapper for gtk4-layer-shell, automatically generated from its .gir file. Fo

null 3 Apr 30, 2023
A TUI to quickly find files in your Google Drive

A TUI to quickly find files in your Google Drive

David Somers 21 Nov 18, 2022
A small tool to display markdown files as a slideshow.

Rusty Slider A small tool to display markdown files as a slideshow. Demo Try out Rusty Slider online: Example slideshows. Download Rusty Slider is ava

Olle Wreede 37 Dec 21, 2022
An easy-to-use, 2D GUI library written entirely in Rust.

Conrod An easy-to-use, 2D GUI library written entirely in Rust. Guide What is Conrod? A Brief Summary Screenshots and Videos Feature Overview Availabl

PistonDevelopers 3.3k Jan 1, 2023
Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust

Relm Asynchronous, GTK+-based, GUI library, inspired by Elm, written in Rust. This library is in beta stage: it has not been thoroughly tested and its

null 2.2k Dec 31, 2022
SwiftUI Inspired UI Library written in rust

Mule (Definitely a Work in Progress) The night I started this project I was on the couch drinking a Moscow Mule.

null 40 Jun 22, 2022