Skip to content
Snippets Groups Projects
Verified Commit dfc38656 authored by Louis's avatar Louis :fire:
Browse files

Bevy 0.10.0

parent 241b4b82
No related branches found
No related tags found
No related merge requests found
......@@ -10,11 +10,14 @@ default = ["serialise"]
serialise = ["dep:serde"]
[dependencies]
bevy = "0.9.1"
bevy = "0.10.0"
web_instant = "0.3.0"
num-traits = "0.2.15"
micro_musicbox = "0.5.1"
micro_musicbox = "0.6.2"
serde = { version = "1.0.152", optional = true }
kayak_ui = { rev = "910a00cdd3857cc7515f153580afd057de0abaf0", git = "https://github.com/StarArawn/kayak_ui" }
kayak_font = { rev = "910a00cdd3857cc7515f153580afd057de0abaf0", git = "https://github.com/StarArawn/kayak_ui.git" }
\ No newline at end of file
kayak_ui = { git = "https://github.com/NiseVoid/kayak_ui.git", rev = "50bdb6098ad8a736e9c1faf8fe089670238eb4c3" }
kayak_font = { git = "https://github.com/NiseVoid/kayak_ui.git", rev = "50bdb6098ad8a736e9c1faf8fe089670238eb4c3" }
#kayak_ui = { rev = "910a00cdd3857cc7515f153580afd057de0abaf0", git = "https://github.com/StarArawn/kayak_ui" }
#kayak_font = { rev = "910a00cdd3857cc7515f153580afd057de0abaf0", git = "https://github.com/StarArawn/kayak_ui.git" }
\ No newline at end of file
......@@ -213,7 +213,7 @@ pub fn render_text_box_widget(
move |In((event_dispatcher_context, _, mut event, _entity)): In<(
EventDispatcherContext,
WidgetState,
Event,
KEvent,
Entity,
)>,
font_assets: Res<Assets<KayakFont>>,
......
......@@ -94,7 +94,7 @@ pub fn render_button_widget(
move |In((event_dispatcher_context, _, mut event, _)): In<(
EventDispatcherContext,
WidgetState,
Event,
KEvent,
Entity,
)>,
mut params: ParamSet<(
......
......@@ -78,7 +78,7 @@
// move |In((event_dispatcher_context, _, mut event, _)): In<(
// EventDispatcherContext,
// WidgetState,
// Event,
// KEvent,
// Entity,
// )>,
// mut params: ParamSet<(
......
......@@ -56,14 +56,12 @@ impl ThemeMapping {
}
#[derive(SystemParam)]
pub struct ThemeProvider<'w, 's> {
pub struct ThemeProvider<'w> {
pub font_mapping: ResMut<'w, FontMapping>,
pub theme_mapping: ResMut<'w, ThemeMapping>,
#[system_param(ignore)]
_p: PhantomData<&'s ()>,
}
impl<'w, 's> ThemeProvider<'w, 's> {
impl<'w> ThemeProvider<'w> {
pub fn set_default_font(&mut self, handle: Handle<KayakFont>) {
self.font_mapping.set_default(handle);
self.theme_mapping.font_names.insert(
......
......@@ -3,11 +3,12 @@ use std::marker::PhantomData;
use bevy::asset::Assets;
use bevy::ecs::system::SystemParam;
use bevy::prelude::{
Commands, Component, DespawnRecursiveExt, Entity, In, ParamSet, Query, Res, Resource, With,
Commands, Component, DespawnRecursiveExt, DetectChanges, Entity, In, ParamSet, Query, Res,
Resource, With,
};
use kayak_font::{Alignment, KayakFont, TextProperties};
use kayak_ui::prelude::{
Event, EventDispatcherContext, EventType, FontMapping, KayakRootContext, KayakWidgetContext,
EventDispatcherContext, EventType, FontMapping, KEvent, KayakRootContext, KayakWidgetContext,
OnEvent, WidgetParam, WidgetState,
};
use micro_musicbox::prelude::MusicBox;
......@@ -264,7 +265,7 @@ pub mod context {
}
}
pub type OnEventParams = In<(EventDispatcherContext, WidgetState, Event, Entity)>;
pub type OnEventParams = In<(EventDispatcherContext, WidgetState, KEvent, Entity)>;
#[macro_export]
macro_rules! on_button_click {
......@@ -278,7 +279,7 @@ macro_rules! on_button_click {
)): $crate::bevy::prelude::In<(
$crate::kayak_ui::prelude::EventDispatcherContext,
$crate::kayak_ui::prelude::WidgetState,
$crate::kayak_ui::prelude::Event,
$crate::kayak_ui::prelude::KEvent,
$crate::bevy::prelude::Entity,
)>,
params: $param_type| {
......@@ -319,7 +320,7 @@ where
move |In((event_dispatcher_context, _, mut event, _)): In<(
EventDispatcherContext,
WidgetState,
Event,
KEvent,
Entity,
)>,
mut params: ParamSet<(Query<&Props>, Query<&mut State>, MusicBox<ThemeMapping>)>| {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment