GDShare-mod
GDShare-mod copied to clipboard
Add exporting for gmdl (list) files?
For some reason there is no way to export a gmdl (list) file in this mod.
I've never modded GD before and I have no idea what I'm talking about, so I'm probably entirely wrong here, BUT...
I saw that the GMD API appears to have a function to export lists.
I looked in the code in THIS repo and it LOOKS like this code SHOULD be adding a button to export a locally saved list...?
$override bool init(GJLevelList * level)
{
if (!LevelListLayer::init(level))
return false;
if (auto menu = this->getChildByID("main-menu"))
{
auto btn = CCMenuItemSpriteExtra::create(
CircleButtonSprite::createWithSpriteFrameName(
"file.png"_spr, .8f,
CircleBaseColor::Green,
CircleBaseSize::Medium),
this, menu_selector(ExportListLayer::onExport));
btn->setID("export-button"_spr);
menu->addChild(btn);
menu->updateLayout();
}
return true;
}
However, if I'm not mistaken (which there's a good chance I am), this line: if (auto menu = this->getChildByID("main-menu"))
has the wrong node id? I don't think "main-menu" is the right id...? I think it might need to be "right-side-menu", but I really don't know.
I WOULD test the change myself and make a pull request it worked, but I have no experience with this sort of thing and I can't figure out how to build the repo without errors.
Anyways, whether I'm right or wrong with all this, it'd be really nice to have a way to export GMDL files.
And if you for some reason CAN'T add that feature as of now, I'd like to know something: There is no documentation of how to FORMAT a GMDL file, and personally I'd like to generate one with code. So... can someone make documentation, or at least post an example gmdl file somewhere so we can see the structure?
Thanks.