mods dialogues fonts fix
This commit is contained in:
@@ -116,17 +116,28 @@ class Paths
|
||||
return scriptPath;
|
||||
}
|
||||
|
||||
static public function chart(song:String, ?difficulty:String = "normal"):String {
|
||||
static public function chart(song:String, ?difficulty:String = "normal"):String
|
||||
{
|
||||
difficulty = difficulty.toLowerCase();
|
||||
song = song.toLowerCase();
|
||||
|
||||
return getPath('songs/$song/charts/$difficulty.json', null);
|
||||
}
|
||||
|
||||
static public function character(character:String):String {
|
||||
inline static public function character(character:String):String
|
||||
{
|
||||
return getPath('data/characters/$character.xml', null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the name of a registered font.
|
||||
* @param font The font's path (if it's already passed as a font name, the same name will be returned)
|
||||
*/
|
||||
inline static public function getFontName(font:String)
|
||||
{
|
||||
return OpenFlAssets.exists(font, FONT) ? OpenFlAssets.getFont(font).fontName : font;
|
||||
}
|
||||
|
||||
inline static public function font(key:String)
|
||||
{
|
||||
return getPath('fonts/$key');
|
||||
|
||||
@@ -582,7 +582,7 @@ class CoolUtil
|
||||
var fmt = new FlxTextFormat();
|
||||
|
||||
fmt.format.color = Reflect.hasField(fmtt, "color") ? FlxColor.fromString(fmtt.color) : text.color;
|
||||
fmt.format.font = Reflect.hasField(fmtt, "font") ? Paths.font(fmtt.font) : text.font;
|
||||
fmt.format.font = Reflect.hasField(fmtt, "font") ? Paths.getFontName(Paths.font(fmtt.font)) : text.font;
|
||||
fmt.format.size = Reflect.hasField(fmtt, "size") ? Std.parseInt(fmtt.size) : text.size;
|
||||
fmt.format.italic = Reflect.hasField(fmtt, "italic") ? fmtt.italic == "true" : text.italic;
|
||||
fmt.format.bold = Reflect.hasField(fmtt, "bold") ? fmtt.bold == "true" : text.bold;
|
||||
|
||||
Reference in New Issue
Block a user