chore(deps): migrate to Bevy 0.18
- BorderRadius is no longer a Component; moved into Node.border_radius field at all 15 spawn sites across 6 plugin files - Events<T> renamed to Messages<T> in test code (12 files) - KeyboardEvents SystemParam renamed to KeyboardMessages to match the MessageWriter rename done in the 0.17 hop - WindowResolution::from((f32,f32)) removed; use (u32,u32) tuple in main.rs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"db_name": "SQLite",
|
||||||
|
"query": "UPDATE users SET leaderboard_opt_in = 0 WHERE id = ?",
|
||||||
|
"describe": {
|
||||||
|
"columns": [],
|
||||||
|
"parameters": {
|
||||||
|
"Right": 1
|
||||||
|
},
|
||||||
|
"nullable": []
|
||||||
|
},
|
||||||
|
"hash": "36bab3ca8f126c66a6f4865d2699702689518bd3a796c374f932aba0434a4c94"
|
||||||
|
}
|
||||||
Generated
+347
-217
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -33,7 +33,7 @@ solitaire_sync = { path = "solitaire_sync" }
|
|||||||
solitaire_data = { path = "solitaire_data" }
|
solitaire_data = { path = "solitaire_data" }
|
||||||
solitaire_engine = { path = "solitaire_engine" }
|
solitaire_engine = { path = "solitaire_engine" }
|
||||||
|
|
||||||
bevy = "0.17"
|
bevy = "0.18"
|
||||||
kira = "0.9"
|
kira = "0.9"
|
||||||
|
|
||||||
axum = "0.8"
|
axum = "0.8"
|
||||||
|
|||||||
@@ -248,10 +248,10 @@ fn spawn_achievements_screen(commands: &mut Commands, records: &[AchievementReco
|
|||||||
min_width: Val::Px(380.0),
|
min_width: Val::Px(380.0),
|
||||||
max_height: Val::Percent(80.0),
|
max_height: Val::Percent(80.0),
|
||||||
overflow: Overflow::clip_y(),
|
overflow: Overflow::clip_y(),
|
||||||
|
border_radius: BorderRadius::all(Val::Px(8.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.09, 0.09, 0.12)),
|
BackgroundColor(Color::srgb(0.09, 0.09, 0.12)),
|
||||||
BorderRadius::all(Val::Px(8.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Header
|
// Header
|
||||||
@@ -415,7 +415,7 @@ mod tests {
|
|||||||
assert!(unlocked_first_win);
|
assert!(unlocked_first_win);
|
||||||
|
|
||||||
// Verify the event was emitted.
|
// Verify the event was emitted.
|
||||||
let events = app.world().resource::<Events<AchievementUnlockedEvent>>();
|
let events = app.world().resource::<Messages<AchievementUnlockedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
||||||
assert!(fired.contains(&"first_win".to_string()));
|
assert!(fired.contains(&"first_win".to_string()));
|
||||||
@@ -433,7 +433,7 @@ mod tests {
|
|||||||
|
|
||||||
// Clear events from first win.
|
// Clear events from first win.
|
||||||
app.world_mut()
|
app.world_mut()
|
||||||
.resource_mut::<Events<AchievementUnlockedEvent>>()
|
.resource_mut::<Messages<AchievementUnlockedEvent>>()
|
||||||
.clear();
|
.clear();
|
||||||
|
|
||||||
app.world_mut().write_message(GameWonEvent {
|
app.world_mut().write_message(GameWonEvent {
|
||||||
@@ -442,7 +442,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<AchievementUnlockedEvent>>();
|
let events = app.world().resource::<Messages<AchievementUnlockedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
let fired: Vec<String> = cursor.read(events).map(|e| e.0.id.clone()).collect();
|
||||||
assert!(
|
assert!(
|
||||||
@@ -468,7 +468,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<XpAwardedEvent>>();
|
let events = app.world().resource::<Messages<XpAwardedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
||||||
// The no_undo achievement (BonusXp 25) must have fired an XpAwardedEvent.
|
// The no_undo achievement (BonusXp 25) must have fired an XpAwardedEvent.
|
||||||
@@ -494,7 +494,7 @@ mod tests {
|
|||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
// "no_undo" awards BonusXp(25). If undo was used it must NOT fire.
|
// "no_undo" awards BonusXp(25). If undo was used it must NOT fire.
|
||||||
let events = app.world().resource::<Events<XpAwardedEvent>>();
|
let events = app.world().resource::<Messages<XpAwardedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
let xp_events: Vec<u64> = cursor.read(events).map(|e| e.amount).collect();
|
||||||
assert!(
|
assert!(
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ mod tests {
|
|||||||
app.update(); // detect runs, sets active
|
app.update(); // detect runs, sets active
|
||||||
app.update(); // drive fires the move
|
app.update(); // drive fires the move
|
||||||
|
|
||||||
let events = app.world().resource::<Events<MoveRequestEvent>>();
|
let events = app.world().resource::<Messages<MoveRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).collect();
|
let fired: Vec<_> = cursor.read(events).collect();
|
||||||
// At least one MoveRequestEvent should have been fired.
|
// At least one MoveRequestEvent should have been fired.
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ mod tests {
|
|||||||
let p = &app.world().resource::<ProgressResource>().0;
|
let p = &app.world().resource::<ProgressResource>().0;
|
||||||
assert_eq!(p.challenge_index, 1);
|
assert_eq!(p.challenge_index, 1);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<ChallengeAdvancedEvent>>();
|
let events = app.world().resource::<Messages<ChallengeAdvancedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -154,7 +154,7 @@ mod tests {
|
|||||||
let p = &app.world().resource::<ProgressResource>().0;
|
let p = &app.world().resource::<ProgressResource>().0;
|
||||||
assert_eq!(p.challenge_index, 0);
|
assert_eq!(p.challenge_index, 0);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<ChallengeAdvancedEvent>>();
|
let events = app.world().resource::<Messages<ChallengeAdvancedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(cursor.read(events).next().is_none());
|
assert!(cursor.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -168,7 +168,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyX);
|
.press(KeyCode::KeyX);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(cursor.read(events).next().is_none());
|
assert!(cursor.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyX);
|
.press(KeyCode::KeyX);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -217,7 +217,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).collect();
|
let fired: Vec<_> = cursor.read(events).collect();
|
||||||
assert_eq!(fired.len(), 1, "exactly one toast must fire on challenge win");
|
assert_eq!(fired.len(), 1, "exactly one toast must fire on challenge win");
|
||||||
@@ -237,7 +237,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(
|
assert!(
|
||||||
cursor.read(events).next().is_none(),
|
cursor.read(events).next().is_none(),
|
||||||
@@ -254,7 +254,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyX);
|
.press(KeyCode::KeyX);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).collect();
|
let fired: Vec<_> = cursor.read(events).collect();
|
||||||
assert_eq!(fired.len(), 1, "must show a toast explaining the lock");
|
assert_eq!(fired.len(), 1, "must show a toast explaining the lock");
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ mod tests {
|
|||||||
// +100 from the daily bonus
|
// +100 from the daily bonus
|
||||||
assert!(progress.total_xp >= DAILY_BONUS_XP);
|
assert!(progress.total_xp >= DAILY_BONUS_XP);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<DailyChallengeCompletedEvent>>();
|
let events = app.world().resource::<Messages<DailyChallengeCompletedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -279,7 +279,7 @@ mod tests {
|
|||||||
let progress = &app.world().resource::<ProgressResource>().0;
|
let progress = &app.world().resource::<ProgressResource>().0;
|
||||||
assert_eq!(progress.daily_challenge_streak, 0);
|
assert_eq!(progress.daily_challenge_streak, 0);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<DailyChallengeCompletedEvent>>();
|
let events = app.world().resource::<Messages<DailyChallengeCompletedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(cursor.read(events).next().is_none());
|
assert!(cursor.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -317,7 +317,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyC);
|
.press(KeyCode::KeyC);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -337,7 +337,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyC);
|
.press(KeyCode::KeyC);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<DailyGoalAnnouncementEvent>>();
|
let events = app.world().resource::<Messages<DailyGoalAnnouncementEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -355,7 +355,7 @@ mod tests {
|
|||||||
.press(KeyCode::KeyC);
|
.press(KeyCode::KeyC);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<DailyGoalAnnouncementEvent>>();
|
let events = app.world().resource::<Messages<DailyGoalAnnouncementEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
|
|||||||
@@ -238,10 +238,10 @@ fn spawn_confirm_dialog(commands: &mut Commands, original_request: NewGameReques
|
|||||||
row_gap: Val::Px(20.0),
|
row_gap: Val::Px(20.0),
|
||||||
min_width: Val::Px(360.0),
|
min_width: Val::Px(360.0),
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(12.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.10, 0.12, 0.15)),
|
BackgroundColor(Color::srgb(0.10, 0.12, 0.15)),
|
||||||
BorderRadius::all(Val::Px(12.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Heading
|
// Heading
|
||||||
@@ -574,10 +574,10 @@ fn spawn_game_over_screen(commands: &mut Commands, score: i32) {
|
|||||||
row_gap: Val::Px(16.0),
|
row_gap: Val::Px(16.0),
|
||||||
min_width: Val::Px(340.0),
|
min_width: Val::Px(340.0),
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(12.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.10, 0.08, 0.08)),
|
BackgroundColor(Color::srgb(0.10, 0.08, 0.08)),
|
||||||
BorderRadius::all(Val::Px(12.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Header — explains why the overlay appeared.
|
// Header — explains why the overlay appeared.
|
||||||
@@ -765,7 +765,7 @@ mod tests {
|
|||||||
let mut app = test_app(42);
|
let mut app = test_app(42);
|
||||||
app.world_mut().write_message(DrawRequestEvent);
|
app.world_mut().write_message(DrawRequestEvent);
|
||||||
app.update();
|
app.update();
|
||||||
let events = app.world().resource::<Events<StateChangedEvent>>();
|
let events = app.world().resource::<Messages<StateChangedEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
assert!(reader.read(events).next().is_some());
|
assert!(reader.read(events).next().is_some());
|
||||||
}
|
}
|
||||||
@@ -864,7 +864,7 @@ mod tests {
|
|||||||
count: 1,
|
count: 1,
|
||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
let events = app.world().resource::<Events<StateChangedEvent>>();
|
let events = app.world().resource::<Messages<StateChangedEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
assert!(reader.read(events).next().is_none());
|
assert!(reader.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -956,7 +956,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<crate::events::CardFlippedEvent>>();
|
let events = app.world().resource::<Messages<crate::events::CardFlippedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).collect();
|
let fired: Vec<_> = cursor.read(events).collect();
|
||||||
assert_eq!(fired.len(), 1, "CardFlippedEvent must fire when a face-down card is exposed");
|
assert_eq!(fired.len(), 1, "CardFlippedEvent must fire when a face-down card is exposed");
|
||||||
@@ -1042,7 +1042,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<crate::events::CardFlippedEvent>>();
|
let events = app.world().resource::<Messages<crate::events::CardFlippedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).collect();
|
let fired: Vec<_> = cursor.read(events).collect();
|
||||||
assert!(fired.is_empty(), "no flip event when exposed card was already face-up");
|
assert!(fired.is_empty(), "no flip event when exposed card was already face-up");
|
||||||
@@ -1309,7 +1309,7 @@ mod tests {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Clear the NewGameRequestEvent queue so we start with a clean slate.
|
// Clear the NewGameRequestEvent queue so we start with a clean slate.
|
||||||
app.world_mut().resource_mut::<Events<NewGameRequestEvent>>().clear();
|
app.world_mut().resource_mut::<Messages<NewGameRequestEvent>>().clear();
|
||||||
|
|
||||||
// Simulate Escape press.
|
// Simulate Escape press.
|
||||||
{
|
{
|
||||||
@@ -1320,7 +1320,7 @@ mod tests {
|
|||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
// NewGameRequestEvent must have been fired.
|
// NewGameRequestEvent must have been fired.
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
assert!(
|
assert!(
|
||||||
reader.read(events).next().is_some(),
|
reader.read(events).next().is_some(),
|
||||||
@@ -1341,7 +1341,7 @@ mod tests {
|
|||||||
app.world_mut().write_message(UndoRequestEvent);
|
app.world_mut().write_message(UndoRequestEvent);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
let fired: Vec<_> = reader.read(events).collect();
|
let fired: Vec<_> = reader.read(events).collect();
|
||||||
assert_eq!(fired.len(), 1, "exactly one InfoToastEvent must fire on empty-stack undo");
|
assert_eq!(fired.len(), 1, "exactly one InfoToastEvent must fire on empty-stack undo");
|
||||||
@@ -1360,12 +1360,12 @@ mod tests {
|
|||||||
app.world_mut().write_message(DrawRequestEvent);
|
app.world_mut().write_message(DrawRequestEvent);
|
||||||
app.update();
|
app.update();
|
||||||
// Clear events from the draw so we start with a clean slate.
|
// Clear events from the draw so we start with a clean slate.
|
||||||
app.world_mut().resource_mut::<Events<InfoToastEvent>>().clear();
|
app.world_mut().resource_mut::<Messages<InfoToastEvent>>().clear();
|
||||||
|
|
||||||
app.world_mut().write_message(UndoRequestEvent);
|
app.world_mut().write_message(UndoRequestEvent);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
let fired: Vec<_> = reader.read(events).collect();
|
let fired: Vec<_> = reader.read(events).collect();
|
||||||
assert!(
|
assert!(
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ const FORFEIT_CONFIRM_WINDOW: f32 = 3.0;
|
|||||||
/// Bundles all event writers used by `handle_keyboard` so the system stays
|
/// Bundles all event writers used by `handle_keyboard` so the system stays
|
||||||
/// within Bevy's 16-parameter limit.
|
/// within Bevy's 16-parameter limit.
|
||||||
#[derive(SystemParam)]
|
#[derive(SystemParam)]
|
||||||
struct KeyboardEvents<'w> {
|
struct KeyboardMessages<'w> {
|
||||||
undo: MessageWriter<'w, UndoRequestEvent>,
|
undo: MessageWriter<'w, UndoRequestEvent>,
|
||||||
new_game: MessageWriter<'w, NewGameRequestEvent>,
|
new_game: MessageWriter<'w, NewGameRequestEvent>,
|
||||||
confirm_event: MessageWriter<'w, NewGameConfirmEvent>,
|
confirm_event: MessageWriter<'w, NewGameConfirmEvent>,
|
||||||
@@ -108,7 +108,7 @@ fn handle_keyboard(
|
|||||||
mut confirm_countdown: Local<f32>,
|
mut confirm_countdown: Local<f32>,
|
||||||
mut confirm_pending: Local<bool>,
|
mut confirm_pending: Local<bool>,
|
||||||
mut forfeit_countdown: Local<f32>,
|
mut forfeit_countdown: Local<f32>,
|
||||||
mut ev: KeyboardEvents,
|
mut ev: KeyboardMessages<'_>,
|
||||||
mut commands: Commands,
|
mut commands: Commands,
|
||||||
card_entities: Query<(Entity, &CardEntity, &Sprite)>,
|
card_entities: Query<(Entity, &CardEntity, &Sprite)>,
|
||||||
layout: Option<Res<LayoutResource>>,
|
layout: Option<Res<LayoutResource>>,
|
||||||
|
|||||||
@@ -305,10 +305,10 @@ fn spawn_leaderboard_screen(commands: &mut Commands, entries: Option<&[Leaderboa
|
|||||||
min_width: Val::Px(420.0),
|
min_width: Val::Px(420.0),
|
||||||
max_height: Val::Percent(80.0),
|
max_height: Val::Percent(80.0),
|
||||||
overflow: Overflow::clip_y(),
|
overflow: Overflow::clip_y(),
|
||||||
|
border_radius: BorderRadius::all(Val::Px(8.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.09, 0.09, 0.12)),
|
BackgroundColor(Color::srgb(0.09, 0.09, 0.12)),
|
||||||
BorderRadius::all(Val::Px(8.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Header
|
// Header
|
||||||
@@ -347,10 +347,10 @@ fn spawn_leaderboard_screen(commands: &mut Commands, entries: Option<&[Leaderboa
|
|||||||
Node {
|
Node {
|
||||||
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.18, 0.35, 0.50)),
|
BackgroundColor(Color::srgb(0.18, 0.35, 0.50)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -366,10 +366,10 @@ fn spawn_leaderboard_screen(commands: &mut Commands, entries: Option<&[Leaderboa
|
|||||||
Node {
|
Node {
|
||||||
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.42, 0.15, 0.15)),
|
BackgroundColor(Color::srgb(0.42, 0.15, 0.15)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
|
|||||||
@@ -224,10 +224,10 @@ fn spawn_pause_screen(
|
|||||||
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
padding: UiRect::axes(Val::Px(14.0), Val::Px(6.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.20, 0.30, 0.45)),
|
BackgroundColor(Color::srgb(0.20, 0.30, 0.45)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|btn| {
|
.with_children(|btn| {
|
||||||
btn.spawn((
|
btn.spawn((
|
||||||
@@ -496,7 +496,7 @@ mod tests {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Verify a SettingsChangedEvent was fired.
|
// Verify a SettingsChangedEvent was fired.
|
||||||
let events = app.world().resource::<Events<SettingsChangedEvent>>();
|
let events = app.world().resource::<Messages<SettingsChangedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let count = cursor.read(events).count();
|
let count = cursor.read(events).count();
|
||||||
assert!(count >= 1, "SettingsChangedEvent must be fired on toggle");
|
assert!(count >= 1, "SettingsChangedEvent must be fired on toggle");
|
||||||
|
|||||||
@@ -187,7 +187,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<LevelUpEvent>>();
|
let events = app.world().resource::<Messages<LevelUpEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1, "exactly one level-up");
|
assert_eq!(fired.len(), 1, "exactly one level-up");
|
||||||
@@ -204,7 +204,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<LevelUpEvent>>();
|
let events = app.world().resource::<Messages<LevelUpEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(cursor.read(events).next().is_none());
|
assert!(cursor.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -219,7 +219,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<XpAwardedEvent>>();
|
let events = app.world().resource::<Messages<XpAwardedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -238,7 +238,7 @@ mod tests {
|
|||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let total_xp = app.world().resource::<ProgressResource>().0.total_xp;
|
let total_xp = app.world().resource::<ProgressResource>().0.total_xp;
|
||||||
let events = app.world().resource::<Events<LevelUpEvent>>();
|
let events = app.world().resource::<Messages<LevelUpEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
|
|||||||
@@ -603,10 +603,10 @@ fn spawn_settings_panel(
|
|||||||
min_width: Val::Px(340.0),
|
min_width: Val::Px(340.0),
|
||||||
max_height: Val::Percent(88.0),
|
max_height: Val::Percent(88.0),
|
||||||
overflow: Overflow::scroll_y(),
|
overflow: Overflow::scroll_y(),
|
||||||
|
border_radius: BorderRadius::all(Val::Px(8.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.11, 0.11, 0.14)),
|
BackgroundColor(Color::srgb(0.11, 0.11, 0.14)),
|
||||||
BorderRadius::all(Val::Px(8.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Title
|
// Title
|
||||||
@@ -755,10 +755,10 @@ fn spawn_settings_panel(
|
|||||||
height: Val::Px(40.0),
|
height: Val::Px(40.0),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(bg_color),
|
BackgroundColor(bg_color),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -801,10 +801,10 @@ fn spawn_settings_panel(
|
|||||||
height: Val::Px(40.0),
|
height: Val::Px(40.0),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(bg_color),
|
BackgroundColor(bg_color),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -839,10 +839,10 @@ fn spawn_settings_panel(
|
|||||||
Node {
|
Node {
|
||||||
padding: UiRect::axes(Val::Px(10.0), Val::Px(4.0)),
|
padding: UiRect::axes(Val::Px(10.0), Val::Px(4.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.20, 0.30, 0.45)),
|
BackgroundColor(Color::srgb(0.20, 0.30, 0.45)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -861,10 +861,10 @@ fn spawn_settings_panel(
|
|||||||
padding: UiRect::axes(Val::Px(20.0), Val::Px(8.0)),
|
padding: UiRect::axes(Val::Px(20.0), Val::Px(8.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
margin: UiRect::top(Val::Px(6.0)),
|
margin: UiRect::top(Val::Px(6.0)),
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.22, 0.45, 0.22)),
|
BackgroundColor(Color::srgb(0.22, 0.45, 0.22)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -934,10 +934,10 @@ fn icon_button(parent: &mut ChildSpawnerCommands, label: &str, action: SettingsB
|
|||||||
height: Val::Px(28.0),
|
height: Val::Px(28.0),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(4.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.25, 0.25, 0.30)),
|
BackgroundColor(Color::srgb(0.25, 0.25, 0.30)),
|
||||||
BorderRadius::all(Val::Px(4.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
@@ -995,7 +995,7 @@ mod tests {
|
|||||||
let after = app.world().resource::<SettingsResource>().0.sfx_volume;
|
let after = app.world().resource::<SettingsResource>().0.sfx_volume;
|
||||||
assert!(after < before);
|
assert!(after < before);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<SettingsChangedEvent>>();
|
let events = app.world().resource::<Messages<SettingsChangedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert_eq!(cursor.read(events).count(), 1);
|
assert_eq!(cursor.read(events).count(), 1);
|
||||||
}
|
}
|
||||||
@@ -1020,7 +1020,7 @@ mod tests {
|
|||||||
press(&mut app, KeyCode::BracketRight);
|
press(&mut app, KeyCode::BracketRight);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<SettingsChangedEvent>>();
|
let events = app.world().resource::<Messages<SettingsChangedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert_eq!(cursor.read(events).count(), 0);
|
assert_eq!(cursor.read(events).count(), 0);
|
||||||
}
|
}
|
||||||
@@ -1036,7 +1036,7 @@ mod tests {
|
|||||||
let after = app.world().resource::<SettingsResource>().0.sfx_volume;
|
let after = app.world().resource::<SettingsResource>().0.sfx_volume;
|
||||||
assert!(after >= 0.0, "volume must not go below zero");
|
assert!(after >= 0.0, "volume must not go below zero");
|
||||||
|
|
||||||
let events = app.world().resource::<Events<SettingsChangedEvent>>();
|
let events = app.world().resource::<Messages<SettingsChangedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert_eq!(cursor.read(events).count(), 0, "no event when clamped at floor");
|
assert_eq!(cursor.read(events).count(), 0, "no event when clamped at floor");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -784,7 +784,7 @@ mod tests {
|
|||||||
app.world_mut().write_message(ForfeitEvent);
|
app.world_mut().write_message(ForfeitEvent);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
let messages: Vec<&str> = reader
|
let messages: Vec<&str> = reader
|
||||||
.read(events)
|
.read(events)
|
||||||
@@ -813,7 +813,7 @@ mod tests {
|
|||||||
app.world_mut().write_message(ForfeitEvent);
|
app.world_mut().write_message(ForfeitEvent);
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<InfoToastEvent>>();
|
let events = app.world().resource::<Messages<InfoToastEvent>>();
|
||||||
let mut reader = events.get_cursor();
|
let mut reader = events.get_cursor();
|
||||||
let messages: Vec<&str> = reader
|
let messages: Vec<&str> = reader
|
||||||
.read(events)
|
.read(events)
|
||||||
|
|||||||
@@ -151,7 +151,7 @@ mod tests {
|
|||||||
let session = app.world().resource::<TimeAttackResource>();
|
let session = app.world().resource::<TimeAttackResource>();
|
||||||
assert!(!session.active);
|
assert!(!session.active);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(cursor.read(events).next().is_none());
|
assert!(cursor.read(events).next().is_none());
|
||||||
}
|
}
|
||||||
@@ -169,7 +169,7 @@ mod tests {
|
|||||||
assert_eq!(session.wins, 0);
|
assert_eq!(session.wins, 0);
|
||||||
assert!((session.remaining_secs - TIME_ATTACK_DURATION_SECS).abs() < 1.0);
|
assert!((session.remaining_secs - TIME_ATTACK_DURATION_SECS).abs() < 1.0);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -193,7 +193,7 @@ mod tests {
|
|||||||
assert!(!session.active);
|
assert!(!session.active);
|
||||||
assert_eq!(session.remaining_secs, 0.0);
|
assert_eq!(session.remaining_secs, 0.0);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<TimeAttackEndedEvent>>();
|
let events = app.world().resource::<Messages<TimeAttackEndedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -222,7 +222,7 @@ mod tests {
|
|||||||
let session = app.world().resource::<TimeAttackResource>();
|
let session = app.world().resource::<TimeAttackResource>();
|
||||||
assert_eq!(session.wins, 1);
|
assert_eq!(session.wins, 1);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<NewGameRequestEvent>>();
|
let events = app.world().resource::<Messages<NewGameRequestEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert_eq!(fired.len(), 1);
|
assert_eq!(fired.len(), 1);
|
||||||
@@ -286,7 +286,7 @@ mod tests {
|
|||||||
assert!(session.remaining_secs < 0.0, "remaining_secs must not change while paused");
|
assert!(session.remaining_secs < 0.0, "remaining_secs must not change while paused");
|
||||||
|
|
||||||
// No ended event must have been emitted.
|
// No ended event must have been emitted.
|
||||||
let events = app.world().resource::<Events<TimeAttackEndedEvent>>();
|
let events = app.world().resource::<Messages<TimeAttackEndedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
assert!(
|
assert!(
|
||||||
cursor.read(events).next().is_none(),
|
cursor.read(events).next().is_none(),
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ mod tests {
|
|||||||
let base_win_xp = solitaire_data::xp_for_win(60, false);
|
let base_win_xp = solitaire_data::xp_for_win(60, false);
|
||||||
assert_eq!(p.total_xp - xp_before, base_win_xp + WEEKLY_GOAL_XP);
|
assert_eq!(p.total_xp - xp_before, base_win_xp + WEEKLY_GOAL_XP);
|
||||||
|
|
||||||
let events = app.world().resource::<Events<WeeklyGoalCompletedEvent>>();
|
let events = app.world().resource::<Messages<WeeklyGoalCompletedEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
let fired: Vec<_> = cursor.read(events).cloned().collect();
|
||||||
assert!(fired.iter().any(|e| e.goal_id == "weekly_3_fast"));
|
assert!(fired.iter().any(|e| e.goal_id == "weekly_3_fast"));
|
||||||
@@ -286,7 +286,7 @@ mod tests {
|
|||||||
});
|
});
|
||||||
app.update();
|
app.update();
|
||||||
|
|
||||||
let events = app.world().resource::<Events<LevelUpEvent>>();
|
let events = app.world().resource::<Messages<LevelUpEvent>>();
|
||||||
let mut cursor = events.get_cursor();
|
let mut cursor = events.get_cursor();
|
||||||
let fired: Vec<_> = cursor.read(events).copied().collect();
|
let fired: Vec<_> = cursor.read(events).copied().collect();
|
||||||
assert!(!fired.is_empty(), "LevelUpEvent must fire when weekly bonus pushes past a level threshold");
|
assert!(!fired.is_empty(), "LevelUpEvent must fire when weekly bonus pushes past a level threshold");
|
||||||
|
|||||||
@@ -442,10 +442,10 @@ fn spawn_overlay(
|
|||||||
row_gap: Val::Px(18.0),
|
row_gap: Val::Px(18.0),
|
||||||
min_width: Val::Px(320.0),
|
min_width: Val::Px(320.0),
|
||||||
align_items: AlignItems::Center,
|
align_items: AlignItems::Center,
|
||||||
|
border_radius: BorderRadius::all(Val::Px(12.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.10, 0.12, 0.10)),
|
BackgroundColor(Color::srgb(0.10, 0.12, 0.10)),
|
||||||
BorderRadius::all(Val::Px(12.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|card| {
|
.with_children(|card| {
|
||||||
// Heading
|
// Heading
|
||||||
@@ -518,10 +518,10 @@ fn spawn_overlay(
|
|||||||
padding: UiRect::axes(Val::Px(28.0), Val::Px(12.0)),
|
padding: UiRect::axes(Val::Px(28.0), Val::Px(12.0)),
|
||||||
justify_content: JustifyContent::Center,
|
justify_content: JustifyContent::Center,
|
||||||
margin: UiRect::top(Val::Px(8.0)),
|
margin: UiRect::top(Val::Px(8.0)),
|
||||||
|
border_radius: BorderRadius::all(Val::Px(6.0)),
|
||||||
..default()
|
..default()
|
||||||
},
|
},
|
||||||
BackgroundColor(Color::srgb(0.22, 0.45, 0.22)),
|
BackgroundColor(Color::srgb(0.22, 0.45, 0.22)),
|
||||||
BorderRadius::all(Val::Px(6.0)),
|
|
||||||
))
|
))
|
||||||
.with_children(|b| {
|
.with_children(|b| {
|
||||||
b.spawn((
|
b.spawn((
|
||||||
|
|||||||
Reference in New Issue
Block a user