Add basic border functions to API

This commit is contained in:
GriffinR
2022-08-28 21:45:52 -04:00
parent 0fa71dc4c8
commit 8f90ca64b4
2 changed files with 56 additions and 0 deletions

View File

@@ -88,6 +88,18 @@ void MainWindow::setMetatileId(int x, int y, int metatileId, bool forceRedraw, b
this->tryRedrawMapArea(forceRedraw);
}
int MainWindow::getBorderMetatileId(int x, int y) {
if (!this->editor || !this->editor->map)
return 0;
// TODO
}
void MainWindow::setBorderMetatileId(int x, int y, int metatileId, bool forceRedraw, bool commitChanges) {
if (!this->editor || !this->editor->map)
return;
// TODO
}
int MainWindow::getCollision(int x, int y) {
if (!this->editor || !this->editor->map)
return 0;
@@ -198,6 +210,24 @@ int MainWindow::getHeight() {
return this->editor->map->getHeight();
}
QJSValue MainWindow::getBorderDimensions() {
if (!this->editor || !this->editor->map)
return QJSValue();
// TODO
}
int MainWindow::getBorderWidth() {
if (!this->editor || !this->editor->map)
return 0;
// TODO
}
int MainWindow::getBorderHeight() {
if (!this->editor || !this->editor->map)
return 0;
// TODO
}
void MainWindow::setDimensions(int width, int height) {
if (!this->editor || !this->editor->map)
return;
@@ -228,6 +258,24 @@ void MainWindow::setHeight(int height) {
this->onMapNeedsRedrawing();
}
void MainWindow::setBorderDimensions(int width, int height) {
if (!this->editor || !this->editor->map)
return;
// TODO
}
void MainWindow::setBorderWidth(int width) {
if (!this->editor || !this->editor->map)
return;
// TODO
}
void MainWindow::setBorderHeight(int height) {
if (!this->editor || !this->editor->map)
return;
// TODO
}
void MainWindow::clearOverlay(int layer) {
if (!this->ui || !this->ui->graphicsView_Map)
return;