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)

View File

@@ -1,4 +1,4 @@
(defnew [])
(defNew [])
(method :Void initialize [:Assets assets]
(assets.loadSurface "laptop" AssetPaths.laptop__srf))

View File

@@ -1,6 +1,6 @@
(var &inline :Float SPEED 140)
(defnew [:Float x :Float y :EnemyType _type]
(defNew [:Float x :Float y :EnemyType _type]
[:EnemyType type _type
:FSM brain (new FSM idle)
&mut :Float idleTimer 0

View File

@@ -1,4 +1,4 @@
(defnew [&prop :String archiveDir]
(defNew [&prop :String archiveDir]
[:Array<System> systems
[]

View File

@@ -128,7 +128,7 @@
(method ,name [,@methodArgs] ,@body)
(dictSet commands ,(symbolName name) (object args [,@commandArgs] handler (the Function ,name)))}))
(defnew [&prop :Archive archive
(defNew [&prop :Archive archive
&prop :ArchiveUI ui]
[&mut :Array<Entry> selectedEntries []
&mut :ChangeSet lastChangeSet []

View File

@@ -14,7 +14,7 @@
(controller.runCommand (dictGet controller.commands command))
(Sys.println "$command is not a valid command"))))))
(defnew [])
(defNew [])
(method :Void enterText [prompt resolve maxLength]
(Sys.print "$prompt ")

View File

@@ -5,7 +5,7 @@
(processEntry archive e)
(archive.refreshEntry e)))
(defnew [&prop :EntryChecker canProcessEntry
(defNew [&prop :EntryChecker canProcessEntry
&prop :EntryProcessor processEntry]
[])

View File

@@ -1,6 +1,6 @@
(load "../Lib.kiss")
(defnew [&prop :String tagFilterString // This doesn't need to be a &prop because it will be captured by the lambda, but maybe it will be useful to query from the system later
(defNew [&prop :String tagFilterString // This doesn't need to be a &prop because it will be captured by the lambda, but maybe it will be useful to query from the system later
// TODO make a &super annotation that passes an argument to the super constructor
:EntryProcessor processor]
[]