Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Pause Menu and Stickers have same zoom as HUD #2567

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions source/funkin/play/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,9 @@ class PlayState extends MusicBeatSubState
public var camGame:FlxCamera;

/**
* The camera which contains, and controls visibility of, a video cutscene.
* The camera which contains, and controls visibility of, a video cutscene, dialogue, pause menu and sticker transition.
*/
public var camCutscene:FlxCamera;
public var camOther:FlxCamera;
gamerbross marked this conversation as resolved.
Show resolved Hide resolved

/**
* The combo popups. Includes the real-time combo counter and the rating.
Expand Down Expand Up @@ -960,7 +960,7 @@ class PlayState extends MusicBeatSubState

FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camHUD;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
// boyfriendPos.put(); // TODO: Why is this here?
}
Expand Down Expand Up @@ -1501,12 +1501,12 @@ class PlayState extends MusicBeatSubState
camGame.bgColor = BACKGROUND_COLOR; // Show a pink background behind the stage.
camHUD = new FlxCamera();
camHUD.bgColor.alpha = 0; // Show the game scene behind the camera.
camCutscene = new FlxCamera();
camCutscene.bgColor.alpha = 0; // Show the game scene behind the camera.
camOther = new FlxCamera();
camOther.bgColor.alpha = 0; // Show the game scene behind the camera.

FlxG.cameras.reset(camGame);
FlxG.cameras.add(camHUD, false);
FlxG.cameras.add(camCutscene, false);
FlxG.cameras.add(camOther, false);

// Configure camera follow point.
if (previousCameraFollowPoint != null)
Expand Down Expand Up @@ -1900,7 +1900,6 @@ class PlayState extends MusicBeatSubState
if (!result) return;

isInCutscene = false;
camCutscene.visible = false;

// TODO: Maybe tween in the camera after any cutscenes.
camHUD.visible = true;
Expand All @@ -1919,7 +1918,7 @@ class PlayState extends MusicBeatSubState
if (!currentConversation.alive) currentConversation.revive();

currentConversation.completeCallback = onConversationComplete;
currentConversation.cameras = [camCutscene];
currentConversation.cameras = [camOther];
currentConversation.zIndex = 1000;
add(currentConversation);
refresh();
Expand Down Expand Up @@ -2751,7 +2750,7 @@ class PlayState extends MusicBeatSubState
persistentUpdate = false;
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camCutscene;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
}
}
Expand All @@ -2767,7 +2766,7 @@ class PlayState extends MusicBeatSubState
persistentUpdate = false;
FlxTransitionableState.skipNextTransIn = true;
FlxTransitionableState.skipNextTransOut = true;
pauseSubState.camera = camCutscene;
pauseSubState.camera = camOther;
openSubState(pauseSubState);
}
}
Expand Down
8 changes: 3 additions & 5 deletions source/funkin/play/cutscene/VideoCutscene.hx
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,11 @@ class VideoCutscene
// Trigger the cutscene. Don't play the song in the background.
PlayState.instance.isInCutscene = true;
PlayState.instance.camHUD.visible = false;
PlayState.instance.camCutscene.visible = true;

// Display a black screen to hide the game while the video is playing.
blackScreen = new FlxSprite(-200, -200).makeGraphic(FlxG.width * 2, FlxG.height * 2, FlxColor.BLACK);
blackScreen.scrollFactor.set(0, 0);
blackScreen.cameras = [PlayState.instance.camCutscene];
blackScreen.cameras = [PlayState.instance.camOther];
PlayState.instance.add(blackScreen);

VideoCutscene.cutsceneType = cutsceneType;
Expand Down Expand Up @@ -120,7 +119,7 @@ class VideoCutscene

vid.finishCallback = finishVideo.bind(0.5);

vid.cameras = [PlayState.instance.camCutscene];
vid.cameras = [PlayState.instance.camOther];

PlayState.instance.add(vid);

Expand All @@ -147,7 +146,7 @@ class VideoCutscene
vid.bitmap.onEndReached.add(finishVideo.bind(0.5));
vid.autoPause = false;

vid.cameras = [PlayState.instance.camCutscene];
vid.cameras = [PlayState.instance.camOther];

PlayState.instance.add(vid);

Expand Down Expand Up @@ -305,7 +304,6 @@ class VideoCutscene
vid = null;
#end

PlayState.instance.camCutscene.visible = true;
PlayState.instance.camHUD.visible = true;

FlxTween.tween(blackScreen, {alpha: 0}, transitionTime,
Expand Down