|
@@ -9,6 +9,7 @@ import SideBar from './SideBar';
|
|
import MainBar from './MainBar';
|
|
import MainBar from './MainBar';
|
|
import ModuleBar from './ModuleBar';
|
|
import ModuleBar from './ModuleBar';
|
|
import { ViewNode } from 'trapilib/dist/lib/systems/ViewSystem';
|
|
import { ViewNode } from 'trapilib/dist/lib/systems/ViewSystem';
|
|
|
|
+import Environment from './Environment';
|
|
|
|
|
|
let {
|
|
let {
|
|
CoreSystem,
|
|
CoreSystem,
|
|
@@ -27,7 +28,7 @@ export default class Gui {
|
|
this.phone = this.phoneRef;
|
|
this.phone = this.phoneRef;
|
|
this.toolboxRef = React.createRef();
|
|
this.toolboxRef = React.createRef();
|
|
this.toolbox = this.toolboxRef;
|
|
this.toolbox = this.toolboxRef;
|
|
-
|
|
|
|
|
|
+ this.Environment = new Environment(this.CoreSystem);
|
|
|
|
|
|
this.ToolBox = new ToolBox();
|
|
this.ToolBox = new ToolBox();
|
|
this.MainBar = new MainBar();
|
|
this.MainBar = new MainBar();
|
|
@@ -39,6 +40,7 @@ export default class Gui {
|
|
this.forceUpdate();
|
|
this.forceUpdate();
|
|
})
|
|
})
|
|
this.ToolBox.onUpdate( () =>{
|
|
this.ToolBox.onUpdate( () =>{
|
|
|
|
+
|
|
this.SideBar.tool = this.ToolBox.activeTool;
|
|
this.SideBar.tool = this.ToolBox.activeTool;
|
|
this.forceUpdate();
|
|
this.forceUpdate();
|
|
});
|
|
});
|
|
@@ -56,7 +58,7 @@ export default class Gui {
|
|
this.phoneMouse = new Mouse(this.phone.current).droppable();
|
|
this.phoneMouse = new Mouse(this.phone.current).droppable();
|
|
}
|
|
}
|
|
|
|
|
|
- if(this.ToolBoxMouse !== undefined){
|
|
|
|
|
|
+ if(this.ToolBoxMouse !== undefined && false){
|
|
this.ToolBoxMouse.listen()
|
|
this.ToolBoxMouse.listen()
|
|
.on('LeftDown',(e) => this.ToolManagement(e))
|
|
.on('LeftDown',(e) => this.ToolManagement(e))
|
|
|
|
|
|
@@ -131,13 +133,7 @@ export default class Gui {
|
|
|
|
|
|
|
|
|
|
mobileRender(){
|
|
mobileRender(){
|
|
- return (
|
|
|
|
- <div ref={this.phoneRef}>
|
|
|
|
- <View style={styles.mobileView}>
|
|
|
|
- {this.CoreSystem.render()}
|
|
|
|
- </View>
|
|
|
|
- </div>
|
|
|
|
- )
|
|
|
|
|
|
+ return this.Environment.render();
|
|
}
|
|
}
|
|
|
|
|
|
renderSideBar(){
|
|
renderSideBar(){
|