A sdbclient/assets/ui.ess => sdbclient/assets/ui.ess +39 -0
@@ 0,0 1,39 @@
+/* default font size */
+* {
+ font: "fonts/FiraMono-Regular.ttf";
+ font-size: 38px;
+}
+
+.menu {
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ width: 100%;
+ height: 100%;
+}
+
+.menutitle {
+ font-size: 60px;
+ margin: 40px;
+ color: #E6E6E6;
+}
+
+.menubutton {
+ width: 200px;
+ height: 65px;
+ margin: 20px;
+}
+
+.menubutton .button-foreground {
+ background-color: #262626;
+ color: #E6E6E6;
+}
+
+.menubutton:hover .button-foreground {
+ background-color: #404040;
+}
+
+.menubutton:pressed .button-foreground {
+ background-color: #59BF59;
+}
+
M sdbclient/src/main.rs => sdbclient/src/main.rs +4 -1
@@ 18,7 18,7 @@ use bevy_mod_scripting::prelude::*;
use iyes_loopless::prelude::*;
-use belly::prelude::BellyPlugin;
+use belly::prelude::{BellyPlugin, StyleSheet};
mod api;
mod cfg;
@@ 105,6 105,9 @@ fn main() {
fn setup(mut commands: Commands) {
// Spawn a camera
commands.spawn(Camera3dBundle::default());
+
+ // Load in a stylesheet for the UI
+ commands.add(StyleSheet::load("ui.ess"));
}
/// Utility function do despawn an entity and all its children