Add warn and error to script API
This commit is contained in:
parent
6c1e5b516d
commit
ac988968b3
2 changed files with 10 additions and 0 deletions
|
@ -121,6 +121,8 @@ public:
|
|||
Q_INVOKABLE void setTimeout(QJSValue callback, int milliseconds);
|
||||
void invokeCallback(QJSValue callback);
|
||||
Q_INVOKABLE void log(QString message);
|
||||
Q_INVOKABLE void warn(QString message);
|
||||
Q_INVOKABLE void error(QString message);
|
||||
Q_INVOKABLE QList<int> getMetatileLayerOrder();
|
||||
Q_INVOKABLE void setMetatileLayerOrder(QList<int> order);
|
||||
Q_INVOKABLE QList<float> getMetatileLayerOpacity();
|
||||
|
|
|
@ -651,6 +651,14 @@ void MainWindow::log(QString message) {
|
|||
logInfo(message);
|
||||
}
|
||||
|
||||
void MainWindow::warn(QString message) {
|
||||
logWarn(message);
|
||||
}
|
||||
|
||||
void MainWindow::error(QString message) {
|
||||
logError(message);
|
||||
}
|
||||
|
||||
QList<int> MainWindow::getMetatileLayerOrder() {
|
||||
if (!this->editor || !this->editor->map)
|
||||
return QList<int>();
|
||||
|
|
Loading…
Reference in a new issue