Setup
-
haxe setup.hxml-
Install required Haxe libs, listed in the file
setup.hxml.
-
-
cd app->npm i-
Install Electron locally and other dependencies through NPM.
-
Compile
-
haxe main.debug.hxml -
haxe renderer.debug.hxml -
cd app->npm run start -
The
app/package.jsoncontains a list of other commands to use withnpm run _command_
Changing entries
-
In LDtk :
-
Add the entry in the class by changing the entries in:
-
new -
toJson -
fromJson
-
-
Visually:
-
related
.htmlfile.-
Makes things appear in the interface, but nothing is saved when making any change.
-
-
ui/modal/panel/_related_script_/updateForm()-
Used to save the changes made in the interface. Without this, opening and closing a tab in the app loses the information.
-
References:
-
zindex. -
ysort. -
colWidth. -
colMode.
-
-
-
-
-
In ldtk-haxe-api (Schema) :
-
About :
-
It is necessary to change the
ldtk-haxe-api, because it is there that the json schemas are obtained. -
The classes
ldtk.Json, etc, come from that lib. -
It is not necessary to change
docs/JSON_SCHEMA.jsonordocs/MINIMAL_JSON_SCHEMA.json. -
It is not necessary to change the version of
ldtk-haxe-apibefore running thehaxelib git ldtk-haxe-api ... etccommand.
-
-
Change the files of the
ldtk-haxe-api.-
I believe the only important file is
src/json.hx
-
-
COMMIT the modifications to the remote.
-
You need to do this every time you change the
ldtk-haxe-api.
-
-
Run
LDtk - Fetch Schema.-
Runs this in the background:
haxelib git ldtk-haxe-api https://github.com/caioraphael1/ldtk-haxe-api.git caio -
You need to do this every time you change the
ldtk-haxe-api.
-
-
-
Finally :
-
Run
LDtk - Compile & Run.
-
-
My post:
-
-
I figured it out: I had to fork
https://github.com/deepnight/ldtk, make my changes in thesrc/ldtk/Json.hxfile, push to remote, and run inside the ldtk root folderhaxelib git ldtk-haxe-api https://github.com/caioraphael1/ldtk-haxe-api.git caio, which refers to my github fork and branchcaio.
-
-
I have no idea if this is the "right way" to do it, but it works.
-
I didn't have to alter the
setup.hxmlfile, but I had to make sure to run thehaxelibwith the correct path to my fork. Placing a reference to my fork inside thesetup.hxmlfile and runninghaxe setup.hxmldidn't work, for some reason, so I ended up just ignoring thesetup.hxmlfile.
-