Skip to content

Commit

Permalink
using new multilanguage font
Browse files Browse the repository at this point in the history
it still fits with the vibe of the game, so that's cool
  • Loading branch information
Joalor64GH authored Nov 27, 2024
1 parent a30b399 commit 7b24cef
Show file tree
Hide file tree
Showing 25 changed files with 48 additions and 69 deletions.
2 changes: 1 addition & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* [X] Customizable Main Menu + Scripted States
* [X] Accuracy + Ranking
* [X] New Controls Menu
* [ ] Fix font for some language can't display correctly (Will use a custom font system)
* [X] Fix font for some language can't display correctly
* [ ] Fix Controls settings (Also the controls will crash when enter ACCEPT or something)
* [ ] Make a better charting menu (optional)

Expand Down
Binary file added assets/fonts/main.ttf
Binary file not shown.
Binary file removed assets/fonts/vcr.ttf
Binary file not shown.
Binary file removed assets/languages/fonts/vn.ttf
Binary file not shown.
21 changes: 0 additions & 21 deletions source/backend/Localization.hx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Localization {
private static final DEFAULT_DIR:String = "languages";

private static var data:Map<String, Dynamic>;
private static var currentLanguage:String;
private static var customFontPath:String;

public static var DEFAULT_LANGUAGE:String = "en";
Expand Down Expand Up @@ -42,8 +41,6 @@ class Localization {
data.set(language, languageData);
}
}

loadCustomFont(DEFAULT_LANGUAGE);
}

private static function loadLanguageData(language:String):Dynamic {
Expand All @@ -68,8 +65,6 @@ class Localization {
currentLanguage = newLanguage;
data.set(newLanguage, languageData);
trace('Language changed to $currentLanguage');

loadCustomFont(newLanguage);
}

public static function get(key:String, ?language:String):String {
Expand All @@ -89,22 +84,6 @@ class Localization {
var path:String = Paths.file(localDir);
return path;
}

private static function loadCustomFont(language:String):String {
var target:String = language != null ? language : currentLanguage;
var path:String = Paths.file('languages/fonts/' + target + '.ttf');
if (Paths.exists(path)) {
trace('custom font loaded for $language: $path');
return customFontPath = path;
}

trace('no custom font for $language');
return Paths.font('vcr');
}

public static function getCustomFont():String {
return customFontPath;
}
}

class Locale {
Expand Down
2 changes: 1 addition & 1 deletion source/backend/Paths.hx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ class Paths {
path = path.withExtension("otf");
}

return Localization.getCustomFont() ?? path;
return path;
}

inline static public function image(key:String, ?cache:Bool = true):FlxGraphic
Expand Down
2 changes: 1 addition & 1 deletion source/debug/FPS.hx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FPS extends TextField {
width = 1280;
height = 720;
selectable = false;
defaultTextFormat = new TextFormat(Paths.font((font != null) ? font : 'vcr.ttf'), 16, color);
defaultTextFormat = new TextFormat(Paths.font(font ?? 'main.ttf'), 16, color);

addEventListener(Event.ENTER_FRAME, (_) -> {
final now:Float = Timer.stamp() * 1000;
Expand Down
6 changes: 3 additions & 3 deletions source/options/ControlsSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ class ControlsSubState extends ExtendableSubState {

for (i in 0...coolControls.length) {
var bindTxt:FlxText = new FlxText(20, 20 + (i * 80), 0, Localization.get(coolControls[i]), 32);
bindTxt.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
bindTxt.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
bindTxt.ID = i;
ctrlGroup.add(bindTxt);
}

curControl = new FlxText(700, 0, 0, "", 12);
curControl.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
curControl.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
curControl.scrollFactor.set();
curControl.screenCenter(Y);
add(curControl);
Expand All @@ -82,7 +82,7 @@ class ControlsSubState extends ExtendableSubState {
add(tempBG);

anyKeyTxt = new FlxText(0, 0, 0, "", 12);
anyKeyTxt.setFormat(Paths.font('vcr.ttf'), 30, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
anyKeyTxt.setFormat(Paths.font('main.ttf'), 30, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
anyKeyTxt.scrollFactor.set();
anyKeyTxt.screenCenter(XY);
add(anyKeyTxt);
Expand Down
8 changes: 4 additions & 4 deletions source/options/LanguageState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class LanguageState extends ExtendableState {
add(grid);

var title:FlxText = new FlxText(0, 0, 0, Localization.get("langSelect"), 12);
title.setFormat(Paths.font('vcr.ttf'), 70, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
title.setFormat(Paths.font('main.ttf'), 70, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
title.scrollFactor.set();
title.screenCenter(X);
add(title);
Expand All @@ -49,15 +49,15 @@ class LanguageState extends ExtendableState {
add(group);

for (i in 0...langStrings.length) {
var text:FlxText = new FlxText(0, 300 + (i * 70), 0, langStrings[i].lang, 32);
text.setFormat(Paths.font('vcr.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
var text:FlxText = new FlxText(0, 295 + (i * 80), 0, langStrings[i].lang, 32);
text.setFormat(Paths.font('main.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.screenCenter(X);
text.ID = i;
group.add(text);
}

var noticeTxt:FlxText = new FlxText(5, FlxG.height - 24, 0, Localization.get("langNotCompletelyAccurate"), 12);
noticeTxt.setFormat(Paths.font('vcr.ttf'), 26, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
noticeTxt.setFormat(Paths.font('main.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
noticeTxt.scrollFactor.set();
noticeTxt.screenCenter(X);
add(noticeTxt);
Expand Down
2 changes: 1 addition & 1 deletion source/options/NoteColorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class NoteColorState extends ExtendableState {
}

daText = new FlxText(0, 280, FlxG.width, "", 12);
daText.setFormat(Paths.font('vcr.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
daText.setFormat(Paths.font('main.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
daText.screenCenter(X);
add(daText);

Expand Down
6 changes: 3 additions & 3 deletions source/options/OptionsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ class OptionsState extends ExtendableState {
add(opGrp);

for (i in 0...options.length) {
var text:FlxText = new FlxText(0, 260 + (i * 70), 0, Localization.get(options[i]), 32);
text.setFormat(Paths.font('vcr.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
var text:FlxText = new FlxText(0, 255 + (i * 70), 0, Localization.get(options[i]), 32);
text.setFormat(Paths.font('main.ttf'), 80, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.scrollFactor.set();
text.screenCenter(X);
text.ID = i;
opGrp.add(text);
}

var resetControlsTxt:FlxText = new FlxText(5, FlxG.height - 24, 0, Localization.get("ctrlResetGuide"), 12);
resetControlsTxt.setFormat(Paths.font('vcr.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
resetControlsTxt.setFormat(Paths.font('main.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
resetControlsTxt.scrollFactor.set();
add(resetControlsTxt);

Expand Down
4 changes: 2 additions & 2 deletions source/options/OptionsSubState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,13 @@ class OptionsSubState extends ExtendableSubState {

for (i in 0...options.length) {
var optionTxt:FlxText = new FlxText(20, 20 + (i * 80), 0, options[i].toString(), 32);
optionTxt.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
optionTxt.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
optionTxt.ID = i;
grpOptions.add(optionTxt);
}

description = new FlxText(0, FlxG.height * 0.1, FlxG.width * 0.9, '', 28);
description.setFormat(Paths.font("vcr.ttf"), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.setFormat(Paths.font('main.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.screenCenter(X);
description.scrollFactor.set();
add(description);
Expand Down
6 changes: 3 additions & 3 deletions source/states/AchievementsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AchievementsState extends ExtendableState {
isUnlocked.push(unlocked);

var text:FlxText = new FlxText(20, 60 + (i * 80), stringToUse, 32);
text.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.ID = i;
achievementGrp.add(text);

Expand All @@ -64,7 +64,7 @@ class AchievementsState extends ExtendableState {
}

description = new FlxText(0, FlxG.height * 0.1, FlxG.width * 0.9, '', 28);
description.setFormat(Paths.font("vcr.ttf"), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.setFormat(Paths.font('main.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.screenCenter(X);
description.scrollFactor.set();
add(description);
Expand Down Expand Up @@ -170,7 +170,7 @@ class AchievementsState extends ExtendableState {
isUnlocked.push(unlocked);

var text:FlxText = new FlxText(20, 60 + (i * 80), stringToUse, 32);
text.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.ID = i;
achievementGrp.add(text);

Expand Down
6 changes: 3 additions & 3 deletions source/states/ChartingState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class ChartingState extends ExtendableState {
add(strumLine);

var prototypeNotice:FlxText = new FlxText(5, FlxG.height - 24, 0, 'Charter v0.2-pre // Functionality is subject to change.', 12);
prototypeNotice.setFormat(Paths.font('vcr.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
prototypeNotice.setFormat(Paths.font('main.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
prototypeNotice.scrollFactor.set();
add(prototypeNotice);

Expand Down Expand Up @@ -542,12 +542,12 @@ class LoadSongSubState extends ExtendableSubState {
add(bg);

var text:FlxText = new FlxText(0, 180, 0, "Enter a song to load.\n(Note: Unsaved progress will be lost!)", 32);
text.setFormat(Paths.font('vcr.ttf'), 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.screenCenter(X);
add(text);

input = new FlxUIInputText(10, 10, FlxG.width, '', 8);
input.setFormat(Paths.font('vcr.ttf'), 96, FlxColor.WHITE, FlxTextAlign.CENTER);
input.setFormat(Paths.font('main.ttf'), 96, FlxColor.WHITE, FlxTextAlign.CENTER);
input.alignment = CENTER;
input.setBorderStyle(OUTLINE, 0xFF000000, 5, 1);
input.screenCenter(XY);
Expand Down
10 changes: 5 additions & 5 deletions source/states/CreditsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class CreditsState extends ExtendableState {

for (i in 0...credData.users.length) {
var name:FlxText = new FlxText(20, 60 + (i * 80), 0, credData.users[i].name, 32);
name.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
name.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
name.ID = i;
credsGrp.add(name);

Expand Down Expand Up @@ -89,26 +89,26 @@ class CreditsState extends ExtendableState {
add(topBar);
topBar.y -= topBar.height;

topMarker = new FlxText(8, 8, 0, "CREDITS").setFormat(Paths.font('vcr.ttf'), 32, FlxColor.WHITE);
topMarker = new FlxText(8, 8, 0, "CREDITS").setFormat(Paths.font('main.ttf'), 32, FlxColor.WHITE);
topMarker.scrollFactor.set();
topMarker.alpha = 0;
add(topMarker);

centerMarker = new FlxText(0, 8, FlxG.width, "< PLATFORM >").setFormat(Paths.font('vcr.ttf'), 32, FlxColor.WHITE);
centerMarker = new FlxText(0, 8, FlxG.width, "< PLATFORM >").setFormat(Paths.font('main.ttf'), 32, FlxColor.WHITE);
centerMarker.alignment = CENTER;
centerMarker.screenCenter(X);
centerMarker.scrollFactor.set();
centerMarker.alpha = 0;
add(centerMarker);

rightMarker = new FlxText(-8, 8, FlxG.width, "RHYTHMO").setFormat(Paths.font('vcr.ttf'), 32, FlxColor.WHITE);
rightMarker = new FlxText(-8, 8, FlxG.width, "RHYTHMO").setFormat(Paths.font('main.ttf'), 32, FlxColor.WHITE);
rightMarker.scrollFactor.set();
rightMarker.alignment = RIGHT;
rightMarker.alpha = 0;
add(rightMarker);

bottomMarker = new FlxText(0, FlxG.height - 24, 0, "", 32);
bottomMarker.setFormat(Paths.font('vcr.ttf'), 20, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
bottomMarker.setFormat(Paths.font('main.ttf'), 20, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
bottomMarker.textField.background = true;
bottomMarker.textField.backgroundColor = FlxColor.BLACK;
bottomMarker.scrollFactor.set();
Expand Down
4 changes: 2 additions & 2 deletions source/states/EditorState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ class EditorState extends ExtendableState {

for (i in 0...options.length) {
var optionTxt:FlxText = new FlxText(20, 20 + (i * 50), 0, options[i], 32);
optionTxt.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
optionTxt.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
optionTxt.ID = i;
grpOptions.add(optionTxt);
}

daText = new FlxText(5, FlxG.height - 24, 0, "", 12);
daText.setFormat(Paths.font('vcr.ttf'), 20, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
daText.setFormat(Paths.font('main.ttf'), 20, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(daText);

changeSelection(0, false);
Expand Down
2 changes: 1 addition & 1 deletion source/states/MenuState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class MenuState extends ExtendableState {

final versii:FlxText = new FlxText(5, FlxG.height - 24, 0, 'Rhythmo v${Lib.application.meta.get('version')}'
#if debug + ' (${MacrosUtil.getCommitId()})' #end, 12);
versii.setFormat(Paths.font('vcr.ttf'), 26, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
versii.setFormat(Paths.font('main.ttf'), 18, FlxColor.WHITE, LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
versii.scrollFactor.set();
add(versii);

Expand Down
4 changes: 2 additions & 2 deletions source/states/ModsState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ModsState extends ExtendableState {

for (i in 0...ModHandler.trackedMods.length) {
var text:FlxText = new FlxText(20, 60 + (i * 80), ModHandler.trackedMods[i].title, 32);
text.setFormat(Paths.font('vcr.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 60, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.ID = i;
daMods.add(text);

Expand All @@ -45,7 +45,7 @@ class ModsState extends ExtendableState {
}

description = new FlxText(0, FlxG.height * 0.1, FlxG.width * 0.9, '', 28);
description.setFormat(Paths.font("vcr.ttf"), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.setFormat(Paths.font('main.ttf'), 28, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
description.screenCenter(X);
description.scrollFactor.set();
add(description);
Expand Down
8 changes: 4 additions & 4 deletions source/states/PlayState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ class PlayState extends ExtendableState {
}

scoreTxt = new FlxText(0, (FlxG.height * (SaveData.settings.downScroll ? 0.11 : 0.89)) + 20, FlxG.width, "", 20);
scoreTxt.setFormat(Paths.font('vcr.ttf'), 35, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
scoreTxt.setFormat(Paths.font('main.ttf'), 35, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
scoreTxt.screenCenter(X);

judgementCounter = new FlxText(20, 0, 0, "", 20);
judgementCounter.setFormat(Paths.font("vcr.ttf"), 20, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
judgementCounter.setFormat(Paths.font('main.ttf'), 20, FlxColor.WHITE, FlxTextAlign.LEFT, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
judgementCounter.screenCenter(Y);
add(judgementCounter);

Expand All @@ -154,7 +154,7 @@ class PlayState extends ExtendableState {
add(scoreTxt);

timeTxt = new FlxText(20, timeBar.y, 0, "[-:--/-:--]", 20);
timeTxt.setFormat(Paths.font("vcr.ttf"), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
timeTxt.setFormat(Paths.font('main.ttf'), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(timeTxt);

var ratingDisplayYPos:Float = 80;
Expand Down Expand Up @@ -628,7 +628,7 @@ class PlayState extends ExtendableState {
remove(i);
var precision:FlxText = new FlxText(0, ((SaveData.settings.downScroll) ? -250 : 250), FlxG.width,
Math.round(Conductor.songPosition - note.strum) + ' ms');
precision.setFormat(Paths.font("vcr.ttf"), 22, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
precision.setFormat(Paths.font('main.ttf'), 22, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
precision.screenCenter(X);
FlxTween.tween(precision, {y: (SaveData.settings.downScroll ? -260 : 260)}, 0.01, {ease: FlxEase.bounceOut});
precisions.push(precision);
Expand Down
6 changes: 3 additions & 3 deletions source/states/SongSelectState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ class SongSelectState extends ExtendableState {
add(bottomPanel);

panelTxt = new FlxText(bottomPanel.x, bottomPanel.y + 8, FlxG.width, "", 32);
panelTxt.setFormat(Paths.font("vcr.ttf"), 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
panelTxt.setFormat(Paths.font('main.ttf'), 40, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
panelTxt.scrollFactor.set();
panelTxt.screenCenter(X);
add(panelTxt);

tinyTxt = new FlxText(panelTxt.x, panelTxt.y + 50, FlxG.width, Localization.get("tinyGuide"), 22);
tinyTxt.screenCenter(X);
tinyTxt.scrollFactor.set();
tinyTxt.setFormat(Paths.font('vcr.ttf'), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
tinyTxt.setFormat(Paths.font('main.ttf'), 20, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
add(tinyTxt);

titleTxt = new FlxText(0, 0, FlxG.width, "", 32);
titleTxt.setFormat(Paths.font('vcr.ttf'), 70, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
titleTxt.setFormat(Paths.font('main.ttf'), 70, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
titleTxt.scrollFactor.set();
titleTxt.screenCenter(X);
add(titleTxt);
Expand Down
2 changes: 1 addition & 1 deletion source/states/TitleState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class TitleState extends ExtendableState {
}, 0);

var text:FlxText = new FlxText(0, logo.y + 400, 0, Localization.get("pressEnter"), 12);
text.setFormat(Paths.font('vcr.ttf'), 48, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 48, FlxColor.WHITE, CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.screenCenter(X);
add(text);
}
Expand Down
2 changes: 1 addition & 1 deletion source/states/UpdateState.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class UpdateState extends ExtendableState {
+ daJson.description
+ '\nPress ENTER to go to GitHub. Otherwise, press ESCAPE to proceed anyways.\n
Thanks for playing!', 32);
text.setFormat(Paths.font("vcr.ttf"), 40, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.setFormat(Paths.font('main.ttf'), 40, FlxColor.WHITE, FlxTextAlign.CENTER, FlxTextBorderStyle.OUTLINE, FlxColor.BLACK);
text.screenCenter(XY);
add(text);
}
Expand Down
Loading

0 comments on commit 7b24cef

Please sign in to comment.