feat: 主菜单加4新模块入口(实时演示/游戏展示/拖拽编程/运行时)
This commit is contained in:
parent
08a1b7ba6a
commit
4404b88467
126
wwwroot/index.ui
126
wwwroot/index.ui
@ -1,33 +1,60 @@
|
|||||||
{
|
{
|
||||||
"id": "app",
|
"id": "app",
|
||||||
"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
"options": {"width": "100%", "height": "100%", "padding": "0"},
|
"options": {
|
||||||
|
"width": "100%",
|
||||||
|
"height": "100%",
|
||||||
|
"padding": "0"
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "HBox",
|
"widgettype": "HBox",
|
||||||
"options": {
|
"options": {
|
||||||
"width": "100%", "cheight": 2, "bgcolor": "#1e293b",
|
"width": "100%",
|
||||||
"padding": "0 16px", "alignItems": "center", "gap": "12px"
|
"cheight": 2,
|
||||||
|
"bgcolor": "#1e293b",
|
||||||
|
"padding": "0 16px",
|
||||||
|
"alignItems": "center",
|
||||||
|
"gap": "12px"
|
||||||
},
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {"text": "唤景平台 · 世界模式", "cfontsize": 1.3, "color": "#f8fafc"}
|
"options": {
|
||||||
|
"text": "唤景平台 · 世界模式",
|
||||||
|
"cfontsize": 1.3,
|
||||||
|
"color": "#f8fafc"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"widgettype": "Filler"
|
||||||
},
|
},
|
||||||
{"widgettype": "Filler"},
|
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {"text": "测试环境", "cfontsize": 1.0, "color": "#94a3b8"}
|
"options": {
|
||||||
|
"text": "测试环境",
|
||||||
|
"cfontsize": 1.0,
|
||||||
|
"color": "#94a3b8"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "HBox",
|
"widgettype": "HBox",
|
||||||
"options": {"width": "100%", "height": "100%", "padding": "0"},
|
"options": {
|
||||||
|
"width": "100%",
|
||||||
|
"height": "100%",
|
||||||
|
"padding": "0"
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
"options": {"width": "220px", "height": "100%", "bgcolor": "#0f172a", "padding": "8px"},
|
"options": {
|
||||||
|
"width": "220px",
|
||||||
|
"height": "100%",
|
||||||
|
"bgcolor": "#0f172a",
|
||||||
|
"padding": "8px"
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "Menu",
|
"widgettype": "Menu",
|
||||||
@ -37,12 +64,66 @@
|
|||||||
"height": "100%",
|
"height": "100%",
|
||||||
"target": "app.main_content",
|
"target": "app.main_content",
|
||||||
"items": [
|
"items": [
|
||||||
{"name": "world", "label": "世界", "icon": "", "script": "var d={name:'world',label:'世界',content:{widgettype:'urlwidget',options:{url:'/world/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world'}})"},
|
{
|
||||||
{"name": "scene", "label": "场景", "icon": "", "script": "var d={name:'scene',label:'场景',content:{widgettype:'urlwidget',options:{url:'/scene/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='scene'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'scene'}})"},
|
"name": "world",
|
||||||
{"name": "entity", "label": "实体", "icon": "", "script": "var d={name:'entity',label:'实体',content:{widgettype:'urlwidget',options:{url:'/entity/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='entity'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'entity'}})"},
|
"label": "世界",
|
||||||
{"name": "script_engine", "label": "脚本引擎", "icon": "", "script": "var d={name:'script_engine',label:'脚本引擎',content:{widgettype:'urlwidget',options:{url:'/script_engine/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='script_engine'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'script_engine'}})"},
|
"icon": "",
|
||||||
{"name": "world_snapshot", "label": "世界快照", "icon": "", "script": "var d={name:'world_snapshot',label:'世界快照',content:{widgettype:'urlwidget',options:{url:'/world_snapshot/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world_snapshot'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world_snapshot'}})"},
|
"script": "var d={name:'world',label:'世界',content:{widgettype:'urlwidget',options:{url:'/world/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world'}})"
|
||||||
{"name": "world_sync", "label": "世界同步", "icon": "", "script": "var d={name:'world_sync',label:'世界同步',content:{widgettype:'urlwidget',options:{url:'/world_sync/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world_sync'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world_sync'}})"}
|
},
|
||||||
|
{
|
||||||
|
"name": "scene",
|
||||||
|
"label": "场景",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:'scene',label:'场景',content:{widgettype:'urlwidget',options:{url:'/scene/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='scene'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'scene'}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "entity",
|
||||||
|
"label": "实体",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:'entity',label:'实体',content:{widgettype:'urlwidget',options:{url:'/entity/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='entity'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'entity'}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "script_engine",
|
||||||
|
"label": "脚本引擎",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:'script_engine',label:'脚本引擎',content:{widgettype:'urlwidget',options:{url:'/script_engine/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='script_engine'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'script_engine'}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "world_snapshot",
|
||||||
|
"label": "世界快照",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:'world_snapshot',label:'世界快照',content:{widgettype:'urlwidget',options:{url:'/world_snapshot/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world_snapshot'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world_snapshot'}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "world_sync",
|
||||||
|
"label": "世界同步",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:'world_sync',label:'世界同步',content:{widgettype:'urlwidget',options:{url:'/world_sync/index.ui'}}};if(!this.opts.items.find(function(i){return i.name==='world_sync'})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:'world_sync'}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scense_demo",
|
||||||
|
"label": "实时演示",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:scense_demo,label:实时演示,content:{widgettype:urlwidget,options:{url:/scense_demo/index.ui}}};if(!this.opts.items.find(function(i){return i.name===scense_demo})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:scense_demo}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scense_game",
|
||||||
|
"label": "游戏展示",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:scense_game,label:游戏展示,content:{widgettype:urlwidget,options:{url:/scense_game/game/index.ui}}};if(!this.opts.items.find(function(i){return i.name===scense_game})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:scense_game}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scense_drag",
|
||||||
|
"label": "拖拽编程",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:scense_drag,label:拖拽编程,content:{widgettype:urlwidget,options:{url:/scense_drag/editor.ui}}};if(!this.opts.items.find(function(i){return i.name===scense_drag})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:scense_drag}})"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "scense_runtime",
|
||||||
|
"label": "运行时",
|
||||||
|
"icon": "",
|
||||||
|
"script": "var d={name:scense_runtime,label:运行时,content:{widgettype:urlwidget,options:{url:/scense_runtime/index.ui}}};if(!this.opts.items.find(function(i){return i.name===scense_runtime})){this.opts.items.push(d);this.add_tab(d)}this.show_tabcontent({params:{name:scense_runtime}})"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -62,15 +143,26 @@
|
|||||||
"label": "首页",
|
"label": "首页",
|
||||||
"content": {
|
"content": {
|
||||||
"widgettype": "VBox",
|
"widgettype": "VBox",
|
||||||
"options": {"css": "filler", "padding": "24px", "gap": "12px"},
|
"options": {
|
||||||
|
"css": "filler",
|
||||||
|
"padding": "24px",
|
||||||
|
"gap": "12px"
|
||||||
|
},
|
||||||
"subwidgets": [
|
"subwidgets": [
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {"text": "欢迎使用唤景平台(世界模式)", "cfontsize": 1.6}
|
"options": {
|
||||||
|
"text": "欢迎使用唤景平台(世界模式)",
|
||||||
|
"cfontsize": 1.6
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"widgettype": "Text",
|
"widgettype": "Text",
|
||||||
"options": {"text": "左侧菜单选择模块:世界 / 场景 / 实体 / 脚本引擎 / 世界快照 / 世界同步", "cfontsize": 1.2, "color": "#64748b"}
|
"options": {
|
||||||
|
"text": "左侧菜单选择模块:世界 / 场景 / 实体 / 脚本引擎 / 世界快照 / 世界同步",
|
||||||
|
"cfontsize": 1.2,
|
||||||
|
"color": "#64748b"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user