started sims section & axes&grid settings for KFEditor
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
|
||||
|
||||
class SimsController extends WindozController {
|
||||
|
||||
constructor(params) {
|
||||
super(params)
|
||||
}
|
||||
|
||||
async create() {
|
||||
const models = {
|
||||
sims: new SimsModel('/sims'),
|
||||
keyframes: new KeyframesModel('/keyframes')
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'sims/CreateSimView',
|
||||
{
|
||||
title: '<i class="icon-new"></i> Create a simulation',
|
||||
static: true,
|
||||
expanded: false,
|
||||
withSettings: false,
|
||||
windowStyle: WindozDomContent.boxFromPrefs('sims.createsimview', { x: 50, y: 50, w: 800, h: 600 }),
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
async manage() {
|
||||
const models = {
|
||||
sims: new SimsModel('/sims')
|
||||
}
|
||||
|
||||
this.loadWindow(
|
||||
'sims/ManageSimView',
|
||||
{
|
||||
title: '<i class="icon-file-play"></i> Play / Pause a simulation',
|
||||
static: true,
|
||||
expanded: false,
|
||||
withSettings: false,
|
||||
windowStyle: WindozDomContent.boxFromPrefs('sims.managesimview', { x: 50, y: 50, w: 800, h: 600 }),
|
||||
},
|
||||
{
|
||||
models: models,
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('SimsController', SimsController)
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"routes": [
|
||||
{
|
||||
"url": "/create",
|
||||
"role": [ "*" ],
|
||||
"controller" : "/sims/SimsController",
|
||||
"method": "create"
|
||||
},
|
||||
{
|
||||
"url": "/manage",
|
||||
"role": [ "*" ],
|
||||
"controller" : "/sims/SimsController",
|
||||
"method": "manage"
|
||||
}
|
||||
],
|
||||
"models": [
|
||||
"SimsModel",
|
||||
"KeyframesModel"
|
||||
],
|
||||
"views": [
|
||||
"sims/CreateSimView",
|
||||
"sims/ManageSimView"
|
||||
],
|
||||
"controllerDependencies": [
|
||||
"/helpers/basicDialogs",
|
||||
"/helpers/activeAttributes"
|
||||
],
|
||||
"assets": {
|
||||
"styles": [
|
||||
],
|
||||
"html": [
|
||||
],
|
||||
"json": [
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user