Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
10 changes: 7 additions & 3 deletions source/funkin/backend/FunkinText.hx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@ package funkin.backend;
import flixel.text.FlxText;
import flixel.util.FlxColor;

import funkin.backend.system.Flags;

class FunkinText extends FlxText {
public function new(X:Float = 0, Y:Float = 0, FieldWidth:Float = 0, ?Text:String, Size:Int = 16, Border:Bool = true) {
super(X, Y, FieldWidth, Text, Size);
setFormat(Paths.font("vcr.ttf"), Size, FlxColor.WHITE);
public function new(X:Float = 0, Y:Float = 0, FieldWidth:Float = 0, ?Text:String, ?Size:Int, Border:Bool = true) {
if (Size == null) Size = Flags.DEFAULT_FONT_SIZE;

super(X, Y, FieldWidth, Text, Size);
setFormat(Paths.font(Flags.DEFAULT_FONT), Size, FlxColor.WHITE);
if (Border) {
borderStyle = OUTLINE;
borderSize = 1;
Expand Down
4 changes: 4 additions & 0 deletions source/funkin/backend/system/Flags.hx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ class Flags {
public static var DEFAULT_HUD_ZOOM_MULT:Float = 0.03;
public static var DEFAULT_CAM_ZOOM_LERP:Float = 0.05;
public static var DEFAULT_HUD_ZOOM_LERP:Float = 0.05;

// Font configuration
public static var DEFAULT_FONT:String = "vcr.ttf";
public static var DEFAULT_FONT_SIZE:Int = 16;

// to translate these you need to convert them into ids
// Resume -> pause.resume
Expand Down