|
@@ -3,7 +3,7 @@ import ToolBox from './ToolBox';
|
|
import Keyboard from './keyboard';
|
|
import Keyboard from './keyboard';
|
|
import Mouse from './mouse';
|
|
import Mouse from './mouse';
|
|
import React from 'react';
|
|
import React from 'react';
|
|
-import {Dimensions, StyleSheet, View, Text , Button
|
|
|
|
|
|
+import {Dimensions, StyleSheet, View, Text , Button
|
|
} from 'react-native';
|
|
} from 'react-native';
|
|
import { Icon } from 'react-native-elements'
|
|
import { Icon } from 'react-native-elements'
|
|
import Library from 'trapilib/dist/lib';
|
|
import Library from 'trapilib/dist/lib';
|
|
@@ -49,7 +49,7 @@ export default class Gui extends BaseSystem {
|
|
this.MainBar.onSave( () => {
|
|
this.MainBar.onSave( () => {
|
|
this.saveEnv();
|
|
this.saveEnv();
|
|
this.forceUpdate()
|
|
this.forceUpdate()
|
|
- })
|
|
|
|
|
|
+ })
|
|
|
|
|
|
this.load();
|
|
this.load();
|
|
// Setup mainContainer
|
|
// Setup mainContainer
|
|
@@ -57,7 +57,7 @@ export default class Gui extends BaseSystem {
|
|
let container = cview.getDefaultContainer();
|
|
let container = cview.getDefaultContainer();
|
|
let mainContent = new ViewNode(Math.random(), 'BaseContainer', {width: 1125/3, height: 2436/3 - 10});
|
|
let mainContent = new ViewNode(Math.random(), 'BaseContainer', {width: 1125/3, height: 2436/3 - 10});
|
|
cview.setContent(mainContent, container);
|
|
cview.setContent(mainContent, container);
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -75,7 +75,7 @@ export default class Gui extends BaseSystem {
|
|
.on('LeftDown',(e) => this.ToolManagement(e))
|
|
.on('LeftDown',(e) => this.ToolManagement(e))
|
|
|
|
|
|
this.phoneMouse.listen()
|
|
this.phoneMouse.listen()
|
|
- .on('LeftDown',(e) => this.ToolManagement(e))
|
|
|
|
|
|
+ .on('LeftDown',(e) => this.ToolManagement(e))
|
|
.on('Drop', (e) => this.dropContent(e))
|
|
.on('Drop', (e) => this.dropContent(e))
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -107,7 +107,7 @@ export default class Gui extends BaseSystem {
|
|
}else{
|
|
}else{
|
|
this.CoreSystem.import(JSON.parse(env));
|
|
this.CoreSystem.import(JSON.parse(env));
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
this.forceUpdate();
|
|
this.forceUpdate();
|
|
} catch(e) {
|
|
} catch(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
@@ -123,7 +123,7 @@ export default class Gui extends BaseSystem {
|
|
dropContent({event, data}) {
|
|
dropContent({event, data}) {
|
|
data = JSON.parse(data);
|
|
data = JSON.parse(data);
|
|
let Node = this.CoreSystem.ray({event});
|
|
let Node = this.CoreSystem.ray({event});
|
|
- // Node.content
|
|
|
|
|
|
+ // Node.content
|
|
Node.props.selected = true;
|
|
Node.props.selected = true;
|
|
console.log(Node, data);
|
|
console.log(Node, data);
|
|
let node = new ViewNode(Math.random(), data.ctor, {}, data.namespace);
|
|
let node = new ViewNode(Math.random(), data.ctor, {}, data.namespace);
|
|
@@ -132,7 +132,7 @@ export default class Gui extends BaseSystem {
|
|
|
|
|
|
this.forceUpdate();
|
|
this.forceUpdate();
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
mobileRender(){
|
|
mobileRender(){
|
|
return this.Environment.render();
|
|
return this.Environment.render();
|
|
@@ -183,16 +183,20 @@ export default class Gui extends BaseSystem {
|
|
this.CoreSystem.goto(route)
|
|
this.CoreSystem.goto(route)
|
|
this.forceUpdate()
|
|
this.forceUpdate()
|
|
}}>
|
|
}}>
|
|
-
|
|
|
|
- <Text style={PageButtons.text}>{route}</Text>
|
|
|
|
|
|
+ <View style = {{ flex:1,
|
|
|
|
+ justifyContent:'center',
|
|
|
|
+ alignItems:'center'}}>
|
|
|
|
+
|
|
|
|
+ <Text style={PageButtons.text}>{route}</Text>
|
|
|
|
+ </View>
|
|
</View>
|
|
</View>
|
|
-
|
|
|
|
|
|
+
|
|
)
|
|
)
|
|
})
|
|
})
|
|
|
|
|
|
return (
|
|
return (
|
|
<View style={PageButtons.container}>
|
|
<View style={PageButtons.container}>
|
|
- <Button
|
|
|
|
|
|
+ <Button
|
|
color="#F1F1F1"
|
|
color="#F1F1F1"
|
|
title={<Icon name='filter'
|
|
title={<Icon name='filter'
|
|
color="#36BBAD"
|
|
color="#36BBAD"
|
|
@@ -200,13 +204,15 @@ export default class Gui extends BaseSystem {
|
|
}
|
|
}
|
|
/>
|
|
/>
|
|
{pages}
|
|
{pages}
|
|
-
|
|
|
|
|
|
+
|
|
<View style={PageButtons.addNew} onClick = {() => this.addFrame()}>
|
|
<View style={PageButtons.addNew} onClick = {() => this.addFrame()}>
|
|
- <Text >Add new </Text>
|
|
|
|
- <Icon color="#606060" name='add'/>
|
|
|
|
|
|
+ <View style= {PageButtons.addNewContainer}>
|
|
|
|
+ <Text style={PageButtons.addNewText}>Add new </Text>
|
|
|
|
+ <Icon color="white" name='add'/>
|
|
|
|
+ </View>
|
|
</View>
|
|
</View>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
</View>);
|
|
</View>);
|
|
|
|
|
|
|
|
|
|
@@ -228,35 +234,45 @@ const PageButtons = StyleSheet.create({
|
|
color:"white"
|
|
color:"white"
|
|
},
|
|
},
|
|
text:{
|
|
text:{
|
|
- flex:1,
|
|
|
|
- justifyContent:"center",
|
|
|
|
- alignItems:"center",
|
|
|
|
fontSize:16,
|
|
fontSize:16,
|
|
letterSpacing: 0,
|
|
letterSpacing: 0,
|
|
color: '#D9D9D9',
|
|
color: '#D9D9D9',
|
|
opacity: 1,
|
|
opacity: 1,
|
|
},
|
|
},
|
|
page:{
|
|
page:{
|
|
- padding:' 0 30px 0 25px',
|
|
|
|
- borderColor:"white",
|
|
|
|
- borderColor:'black',
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ borderRightWidth:"1px",
|
|
|
|
+ borderColor:"#B4b4b4",
|
|
|
|
+
|
|
backgroundColor:"#FFFFFF",
|
|
backgroundColor:"#FFFFFF",
|
|
cursor:'pointer',
|
|
cursor:'pointer',
|
|
textAlign:"center",
|
|
textAlign:"center",
|
|
- position : "relative",
|
|
|
|
overflow:'hidden',
|
|
overflow:'hidden',
|
|
- display:'inline-block',
|
|
|
|
width:160,
|
|
width:160,
|
|
height:49,
|
|
height:49,
|
|
- textcolor:"white"
|
|
|
|
},
|
|
},
|
|
addNew:{
|
|
addNew:{
|
|
-
|
|
|
|
|
|
+
|
|
textcolor:"white",
|
|
textcolor:"white",
|
|
backgroundColor:"#D6D6D6",
|
|
backgroundColor:"#D6D6D6",
|
|
cursor:'pointer',
|
|
cursor:'pointer',
|
|
width:160,
|
|
width:160,
|
|
height:49,
|
|
height:49,
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ addNewContainer:{
|
|
|
|
+ flex:1,
|
|
|
|
+ flexDirection:'row',
|
|
|
|
+ justifyContent:"center",
|
|
|
|
+ alignItems:'center'
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ addNewText:{
|
|
|
|
+ fontSize:16,
|
|
|
|
+ letterSpacing: 0,
|
|
|
|
+ color: 'white',
|
|
|
|
+ opacity: 1,
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
@@ -306,13 +322,13 @@ const styles = StyleSheet.create({
|
|
alignSelf: 'stretch',
|
|
alignSelf: 'stretch',
|
|
// iphone X
|
|
// iphone X
|
|
width:1125/3,
|
|
width:1125/3,
|
|
- height: 2436/3
|
|
|
|
|
|
+ height: 2436/3
|
|
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
|
|
attributesView: {
|
|
attributesView: {
|
|
- width:256,
|
|
|
|
|
|
+ width:256,
|
|
alignSelf: 'stretch',
|
|
alignSelf: 'stretch',
|
|
flexDirection: 'column',
|
|
flexDirection: 'column',
|
|
}
|
|
}
|
|
@@ -320,4 +336,4 @@ const styles = StyleSheet.create({
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-});
|
|
|
|
|
|
+});
|