use defNew instead of defnew

This commit is contained in:
2021-07-24 15:08:08 -06:00
parent df61721a49
commit 5d991ea295
18 changed files with 18 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
(defnew [&prop :AssetsBackend backend]
(defNew [&prop :AssetsBackend backend]
[:Map<String,Surface> _surfaces (new Map)])
// TODO don't allow overriding a key -- use a macro so all load___() calls check their maps first

View File

@@ -1,4 +1,4 @@
(defnew [_width _height &opt :Color fillColor]
(defNew [_width _height &opt :Color fillColor]
[:Int width _width
:Int height _height
:Int area (* width height)

View File

@@ -1,4 +1,4 @@
(defnew [title
(defNew [title
width
height
letterWidth

View File

@@ -1,4 +1,4 @@
(defnew [_width _height :T defaultValue]
(defNew [_width _height :T defaultValue]
[:Int width _width
:Int height _height
:Array<Array<T>> rows (for _ (range height) (for _ (range width) defaultValue))])

View File

@@ -1,4 +1,4 @@
(defnew [_width _height &opt :String letter]
(defNew [_width _height &opt :String letter]
[:Int width _width
:Int height _height
:Array<String> rows (for _ (range height) (* (or letter " ") width))])

View File

@@ -1,4 +1,4 @@
(defnew [_width _height &opt :Color backgroundColor :String letter :Color letterColor]
(defNew [_width _height &opt :Color backgroundColor :String letter :Color letterColor]
[:Int width _width
:Int height _height
:Colors backgroundColors (new Colors width height (or backgroundColor Colors.Black))

View File

@@ -1,3 +1,3 @@
(defnew [])
(defNew [])
(method loadText [filePath] (Assets.getText filePath))

View File

@@ -4,7 +4,7 @@
(prop &mut :Int letterHeight 0)
(prop &mut :FlxBitmapFont font null)
(defnew [_state
(defNew [_state
_fontAsset
&opt _letters _region _spacing]
[:FlxState state _state

View File

@@ -1,3 +1,3 @@
(defnew [])
(defNew [])
(method loadText [filePath] (File.getContent filePath))

View File

@@ -2,7 +2,7 @@
(prop &mut :Int letterHeight 0)
(prop &mut :Int drawCalled 0)
(defnew [])
(defNew [])
(method :Void initialize [:String title :Int width :Int height :Int _letterWidth :Int _letterHeight]
(set letterWidth _letterWidth)