From 205111d25f509be2effba0aafcc7f60c53a035e7 Mon Sep 17 00:00:00 2001 From: Robert Garrett Date: Fri, 22 Aug 2025 19:26:08 -0500 Subject: [PATCH] Outline some modules for coming steps The UI parts will end up in "widgets.rs". Buttons, labels, etc. The "contsants.rs" module is meant to have compile-time configurables. Bevy's reflection abilities make it possible to alter these at runtime, which means this module will actually have the startup defaults rather than true program constants. --- src/constants.rs | 12 ++++++++++++ src/main.rs | 2 ++ src/widgets.rs | 1 + 3 files changed, 15 insertions(+) create mode 100644 src/constants.rs create mode 100644 src/widgets.rs diff --git a/src/constants.rs b/src/constants.rs new file mode 100644 index 0000000..747a08d --- /dev/null +++ b/src/constants.rs @@ -0,0 +1,12 @@ +//! Program constants & defaults + +use bevy::prelude::*; + +#[derive(Debug, Reflect, Resource)] +struct ConfigDefaults {} + +impl FromWorld for ConfigDefaults { + fn from_world(world: &mut World) -> Self { + todo!() + } +} diff --git a/src/main.rs b/src/main.rs index c3ac2fb..15f823e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,6 +2,8 @@ use bevy::{prelude::*, window::WindowResolution}; use bevy_inspector_egui::{bevy_egui::EguiPlugin, quick::WorldInspectorPlugin}; mod card; +mod constants; +mod widgets; fn main() { App::new() diff --git a/src/widgets.rs b/src/widgets.rs new file mode 100644 index 0000000..f127cc1 --- /dev/null +++ b/src/widgets.rs @@ -0,0 +1 @@ +//! Catch-all location for UI bits