use defNew instead of defnew
This commit is contained in:
@@ -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
|
||||
|
@@ -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)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
(defnew [title
|
||||
(defNew [title
|
||||
width
|
||||
height
|
||||
letterWidth
|
||||
|
@@ -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))])
|
||||
|
@@ -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))])
|
||||
|
@@ -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))
|
||||
|
@@ -1,3 +1,3 @@
|
||||
(defnew [])
|
||||
(defNew [])
|
||||
|
||||
(method loadText [filePath] (Assets.getText filePath))
|
||||
|
@@ -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
|
||||
|
@@ -1,3 +1,3 @@
|
||||
(defnew [])
|
||||
(defNew [])
|
||||
|
||||
(method loadText [filePath] (File.getContent filePath))
|
||||
|
@@ -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)
|
||||
|
@@ -1,4 +1,4 @@
|
||||
(defnew [])
|
||||
(defNew [])
|
||||
|
||||
(method :Void initialize [:Assets assets]
|
||||
(assets.loadSurface "laptop" AssetPaths.laptop__srf))
|
||||
|
@@ -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
|
||||
|
@@ -1,4 +1,4 @@
|
||||
(defnew [&prop :String archiveDir]
|
||||
(defNew [&prop :String archiveDir]
|
||||
|
||||
[:Array<System> systems
|
||||
[]
|
||||
|
@@ -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 []
|
||||
|
@@ -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 ")
|
||||
|
@@ -5,7 +5,7 @@
|
||||
(processEntry archive e)
|
||||
(archive.refreshEntry e)))
|
||||
|
||||
(defnew [&prop :EntryChecker canProcessEntry
|
||||
(defNew [&prop :EntryChecker canProcessEntry
|
||||
&prop :EntryProcessor processEntry]
|
||||
[])
|
||||
|
||||
|
@@ -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]
|
||||
[]
|
||||
|
Reference in New Issue
Block a user