Settings.hx 837 B

123456789101112131415161718192021222324252627282930313233
  1. package textbox;
  2. import flixel.util.FlxColor;
  3. import flixel.system.FlxAssets;
  4. @:structInit
  5. class Settings
  6. {
  7. public var font:String;
  8. public var fontSize:Int;
  9. public var textFieldWidth:Float;
  10. public var color: FlxColor;
  11. public var numLines:Int;
  12. public var charactersPerSecond:Float;
  13. public function new(
  14. font:String = null,
  15. fontSize:Int = 12,
  16. textFieldWidth:Float = 240,
  17. color:FlxColor = null,
  18. numLines:Int = 3,
  19. charactersPerSecond:Float = 24
  20. )
  21. {
  22. this.font = font == null ? FlxAssets.FONT_DEFAULT : font;
  23. this.color = color == null ? FlxColor.WHITE : color;
  24. this.fontSize = fontSize;
  25. this.textFieldWidth = textFieldWidth;
  26. this.numLines = numLines;
  27. this.charactersPerSecond = charactersPerSecond;
  28. }
  29. }