diff --git a/wwwroot/index.ui b/wwwroot/index.ui index 80704ba..aa0ca3f 100644 --- a/wwwroot/index.ui +++ b/wwwroot/index.ui @@ -1,33 +1,60 @@ { "id": "app", "widgettype": "VBox", - "options": {"width": "100%", "height": "100%", "padding": "0"}, + "options": { + "width": "100%", + "height": "100%", + "padding": "0" + }, "subwidgets": [ { "widgettype": "HBox", "options": { - "width": "100%", "cheight": 2, "bgcolor": "#1e293b", - "padding": "0 16px", "alignItems": "center", "gap": "12px" + "width": "100%", + "cheight": 2, + "bgcolor": "#1e293b", + "padding": "0 16px", + "alignItems": "center", + "gap": "12px" }, "subwidgets": [ { "widgettype": "Text", - "options": {"text": "唤景平台 · 世界模式", "cfontsize": 1.3, "color": "#f8fafc"} + "options": { + "text": "唤景平台 · 世界模式", + "cfontsize": 1.3, + "color": "#f8fafc" + } + }, + { + "widgettype": "Filler" }, - {"widgettype": "Filler"}, { "widgettype": "Text", - "options": {"text": "测试环境", "cfontsize": 1.0, "color": "#94a3b8"} + "options": { + "text": "测试环境", + "cfontsize": 1.0, + "color": "#94a3b8" + } } ] }, { "widgettype": "HBox", - "options": {"width": "100%", "height": "100%", "padding": "0"}, + "options": { + "width": "100%", + "height": "100%", + "padding": "0" + }, "subwidgets": [ { "widgettype": "VBox", - "options": {"width": "220px", "height": "100%", "bgcolor": "#0f172a", "padding": "8px"}, + "options": { + "width": "220px", + "height": "100%", + "bgcolor": "#0f172a", + "padding": "8px" + }, "subwidgets": [ { "widgettype": "Menu", @@ -37,12 +64,66 @@ "height": "100%", "target": "app.main_content", "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": "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": "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": "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": "首页", "content": { "widgettype": "VBox", - "options": {"css": "filler", "padding": "24px", "gap": "12px"}, + "options": { + "css": "filler", + "padding": "24px", + "gap": "12px" + }, "subwidgets": [ { "widgettype": "Text", - "options": {"text": "欢迎使用唤景平台(世界模式)", "cfontsize": 1.6} + "options": { + "text": "欢迎使用唤景平台(世界模式)", + "cfontsize": 1.6 + } }, { "widgettype": "Text", - "options": {"text": "左侧菜单选择模块:世界 / 场景 / 实体 / 脚本引擎 / 世界快照 / 世界同步", "cfontsize": 1.2, "color": "#64748b"} + "options": { + "text": "左侧菜单选择模块:世界 / 场景 / 实体 / 脚本引擎 / 世界快照 / 世界同步", + "cfontsize": 1.2, + "color": "#64748b" + } } ] } @@ -81,4 +173,4 @@ ] } ] -} +} \ No newline at end of file