refactoring console ui
This commit is contained in:
24
hGameTest/src/game/ui/text/TextFormats.hx
Normal file
24
hGameTest/src/game/ui/text/TextFormats.hx
Normal file
@@ -0,0 +1,24 @@
|
||||
package game.ui.text;
|
||||
|
||||
|
||||
import openfl.text.TextFormat;
|
||||
import openfl.Assets;
|
||||
import assets.Fonts;
|
||||
|
||||
class TextFormats{
|
||||
public static var formats:TextFormats;
|
||||
public var cInputFmt:TextFormat;
|
||||
public var cOutputFmt:TextFormat;
|
||||
public function new(){
|
||||
cInputFmt = new TextFormat(Assets.getFont("fonts/Terminus.ttf").fontName, 24, 0xffffff);
|
||||
cOutputFmt = new TextFormat(Assets.getFont("fonts/Terminus.ttf").fontName, 24, 0xffffff);
|
||||
}
|
||||
public static function getFormats():TextFormats
|
||||
{
|
||||
if(formats == null){
|
||||
formats = new TextFormats();
|
||||
}
|
||||
return formats;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user