diff --git a/assets/avatars/alextime.png b/assets/avatars/alextime.png index 16c8629..177c0d6 100644 Binary files a/assets/avatars/alextime.png and b/assets/avatars/alextime.png differ diff --git a/assets/avatars/gennadiy.png b/assets/avatars/gennadiy.png index 7c35a52..ab6ca95 100644 Binary files a/assets/avatars/gennadiy.png and b/assets/avatars/gennadiy.png differ diff --git a/assets/cutscenes/phone-call-1.png b/assets/cutscenes/phone-call-1.png index 14af0cb..6333b84 100644 Binary files a/assets/cutscenes/phone-call-1.png and b/assets/cutscenes/phone-call-1.png differ diff --git a/assets/raw-pixelart/cutscene-1.pixi b/assets/raw-pixelart/cutscene-1.pixi new file mode 100644 index 0000000..0592013 Binary files /dev/null and b/assets/raw-pixelart/cutscene-1.pixi differ diff --git a/src/cutscene.rs b/src/cutscene.rs index 3aa0047..a996db8 100644 --- a/src/cutscene.rs +++ b/src/cutscene.rs @@ -71,35 +71,17 @@ fn setup_cutscene( ..default() }, background_color: Color::BLACK.into(), - ..default() }, Cutscene, - Name::new("cutscene node"), + Name::new("cutscene dialog container"), )) .with_children(|parent| { - parent.spawn(( - NodeBundle { - style: Style { - width: Val::Percent(100.0), - height: Val::Percent(100.0), - margin: UiRect::top(Val::VMin(5.)), - position_type: PositionType::Absolute, - left: Val::Px(20.0), - ..default() - }, - background_color: Color::WHITE.into(), - ..default() - }, - UiImage::new(cutscene_assets.phone_call_1.clone()), - )); - parent.spawn(( NodeBundle { style: Style { width: Val::Px(320.0), height: Val::Px(320.0), - margin: UiRect::top(Val::VMin(5.)), position_type: PositionType::Absolute, left: Val::Px(20.0), ..default() @@ -117,7 +99,6 @@ fn setup_cutscene( style: Style { width: Val::Px(320.0), height: Val::Px(320.0), - margin: UiRect::top(Val::VMin(5.)), position_type: PositionType::Absolute, right: Val::Px(20.0), ..default() @@ -134,7 +115,8 @@ fn setup_cutscene( .spawn(( NodeBundle { style: Style { - margin: UiRect::bottom(Val::Px(30.)), + position_type: PositionType::Absolute, + margin: UiRect::bottom(Val::Percent(5.)), ..default() }, ..default() @@ -144,7 +126,7 @@ fn setup_cutscene( .with_children(|parent| { parent.spawn(( TextBundle::from_section( - "ui wave text", + "cutscene dialog text", TextStyle { font: font_assets.pixeloid_mono.clone(), font_size: 30.0, @@ -163,7 +145,7 @@ fn setup_cutscene( flex_direction: FlexDirection::Row, align_items: AlignItems::Center, justify_content: JustifyContent::SpaceAround, - top: Val::Px(20.), + top: Val::Percent(5.), width: Val::Percent(100.), position_type: PositionType::Absolute, ..default() @@ -173,21 +155,56 @@ fn setup_cutscene( }, CutsceneDialogText, Cutscene, - Name::new("dialog title text"), + Name::new("cutscene title container"), )) .with_children(|parent| { parent.spawn(( TextBundle::from_section( - "PRISON CPS 17 <> MEXICO", + " PRISON CPS 17\n <>\nMEXICO, BUENAVISTA", TextStyle { font: font_assets.pixeloid_mono.clone(), - font_size: 60.0, + font_size: 40.0, color: Color::WHITE, }, ), CutsceneTitleText, )); }); + + commands + .spawn(( + NodeBundle { + style: Style { + width: Val::Percent(100.0), + height: Val::Percent(100.0), + position_type: PositionType::Absolute, + justify_content: JustifyContent::Center, + align_items: AlignItems::Center, + ..default() + }, + // background_color: Color::BLACK.into(), + ..default() + }, + Cutscene, + Name::new("cutscene image container"), + )) + .with_children(|parent| { + // bevy logo (image) + // A `NodeBundle` is used to display the logo the image as an `ImageBundle` can't automatically + // size itself with a child node present. + parent.spawn(( + NodeBundle { + style: Style { + width: Val::Px(512.0), + height: Val::Px(512.0), + ..default() + }, + background_color: Color::WHITE.into(), + ..default() + }, + UiImage::new(cutscene_assets.phone_call_1.clone()), + )); + }); } fn cleanup_cutscene(mut commands: Commands, menu: Query>) {