20 lines
442 B
C++
20 lines
442 B
C++
#include <QDebug>
|
|
|
|
#include "DoricDemoBridge.h"
|
|
#include "DoricPanel.h"
|
|
#include "utils/DoricUtils.h"
|
|
|
|
DoricDemoBridge::DoricDemoBridge(QObject *parent) : QObject(parent) {}
|
|
|
|
void DoricDemoBridge::navigate(QVariant route) {
|
|
switch (route.toInt()) {
|
|
case 0:
|
|
QString name = "Snake.js";
|
|
QString script = DoricUtils::readAssetFile("/doric/bundles", name);
|
|
|
|
DoricPanel panel;
|
|
panel.config(script, name, NULL);
|
|
break;
|
|
}
|
|
}
|