Skip to content

Commit

Permalink
test subtitle for ugh
Browse files Browse the repository at this point in the history
  • Loading branch information
moxie-coder committed Aug 8, 2023
1 parent b042e99 commit a321329
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 4 deletions.
2 changes: 1 addition & 1 deletion assets/preload/locale/es-US/textList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ example_sub3==sub a dave o él roba el maíz
example_sub4==AAAAAAAAAAAAAAAAAA MIERDA
example_sub5==u robar u noob

me when google translate funni!!! HAHWFHTRINYJHGBVIN
// me when google translate funni!!! HAHWFHTRINYJHGBVIN

// Credits State //
credits_dev==Desarolladores
Expand Down
2 changes: 1 addition & 1 deletion assets/preload/locale/pt-br/textList.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ example_sub3==sub para dave ou ele roubar o milho
example_sub4==AAAAAAAAAAAAAAAAAA MERDA
example_sub5==u roubar u noob

google from translate guys (ok ok u can remove this line sorry i was joking around)
// google from translate guys (ok ok u can remove this line sorry i was joking around)

// Credits State //
credits_dev==Desenvolvedores
Expand Down
14 changes: 14 additions & 0 deletions source/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,10 @@ class PlayState extends MusicBeatState
}
}

subtitleManager = new SubtitleManager();
subtitleManager.cameras = [camHUD];
add(subtitleManager);

super.create();

Transition.nextCamera = camTransition;
Expand Down Expand Up @@ -2627,6 +2631,16 @@ class PlayState extends MusicBeatState
if (FlxG.sound.music.time > Conductor.songPosition + 20 || FlxG.sound.music.time < Conductor.songPosition - 20)
resyncVocals();

switch (SONG.song.toLowerCase()){
case 'ugh': switch(curStep){
case 60 | 444 | 524 | 828:
FlxTween.tween(camGame, {zoom: 1.3}, 0.5, {ease: FlxEase.quadInOut, onComplete: function(tween){
FlxTween.tween(camGame, {zoom: defaultCamZoom}, 0.5, {ease: FlxEase.quadInOut});
}});
subtitleManager.addSubtitle(LanguageManager.getTextString('example_sub1'), 0.02, 1);
}
}

#if desktop
DiscordClient.changePresence(detailsText
+ " "
Expand Down
2 changes: 1 addition & 1 deletion source/Subtitle.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Subtitle extends FlxTypeText
super(properties.x, properties.y, FlxG.width, text, 36);
sounds = null;

setFormat("Comic Sans MS Bold", properties.subtitleSize, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
setFormat(Paths.font("vcr.ttf"), properties.subtitleSize, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
antialiasing = true;
borderSize = 2;

Expand Down
2 changes: 1 addition & 1 deletion source/SubtitleManager.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class SubtitleManager extends FlxTypedGroup<Subtitle>
subtitle.y = ((FlxG.height - subtitle.height) / 2) - 200;
subtitle.manager = this;
add(subtitle);
}
}
public function onSubtitleComplete(subtitle:Subtitle)
{
remove(subtitle);
Expand Down

0 comments on commit a321329

Please sign in to comment.