Commit de8b82d8 authored by Neranga K.T.'s avatar Neranga K.T.

.

parent 0c45da9a
......@@ -15,7 +15,7 @@ const styles = StyleSheet.create({
width: '100%',
height: 90,
paddingTop: 36,
backgroundColor: Colors.primary,
backgroundColor: '#5fcf93',
justifyContent: 'center',
alignItems: 'center'
},
......
export default {
elementry: 2,
elementry: 5,
medium: 5,
advance: 2
advance: 3
}
\ No newline at end of file
......@@ -210,7 +210,7 @@ const AppRouter = () => {
options={{
title: 'Memory Games',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'}
}}
/>
<Stack.Screen
......@@ -220,7 +220,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Game Start',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......@@ -290,7 +290,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Game Over',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......@@ -300,7 +300,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Results',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......@@ -310,7 +310,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Levels',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......@@ -320,7 +320,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Medium Level',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......@@ -330,7 +330,7 @@ const AppRouter = () => {
headerShown: true,
title: 'Advance Level',
headerTintColor: 'white',
headerStyle: {backgroundColor: Colors.primary},
headerStyle: {backgroundColor: '#5fcf93'},
}}
/>
<Stack.Screen
......
......@@ -19,19 +19,20 @@ const GameLevel = ({navigation}) => {
>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<Text style={styles.modalText}>Please select matching images</Text>
<Text style={styles.modalText}>Select matching images, 5 seconds will be given for each!</Text>
<Text style={styles.modalTextBold}>Are you ready?</Text>
<View style={{ flexDirection: 'row' }} >
<Pressable
style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!modalVisible); navigation.navigate('GameScreenOne'); }}
>
<Text style={styles.textStyle}>Start</Text>
<Text style={styles.textStyle}>Yes</Text>
</Pressable>
<Pressable
style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!modalVisible)}}
>
<Text style={styles.textStyle}>Cancel</Text>
<Text style={styles.textStyle}>No</Text>
</Pressable>
</View>
</View>
......@@ -49,19 +50,20 @@ const GameLevel = ({navigation}) => {
>
<View style={styles.centeredView}>
<View style={styles.modalView}>
<Text style={styles.modalText}>Please select matching images</Text>
<Text style={styles.modalText}>Select matching images, 5 seconds will be given for each!</Text>
<Text style={styles.modalTextBold}>Are you ready?</Text>
<View style={{ flexDirection: 'row' }} >
<Pressable
style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!mediumModalVisible); navigation.navigate('MediumGameScreenOne'); }}
>
<Text style={styles.textStyle}>Start</Text>
<Text style={styles.textStyle}>Yes</Text>
</Pressable>
<Pressable
style={[styles.button, styles.buttonClose]}
onPress={() => {setModalVisible(!mediumModalVisible)}}
onPress={() => {setMediumModalVisible(!mediumModalVisible)}}
>
<Text style={styles.textStyle}>Cancel</Text>
<Text style={styles.textStyle}>No</Text>
</Pressable>
</View>
</View>
......@@ -122,13 +124,13 @@ const styles = StyleSheet.create({
alignItems: 'center'
},
elementryBtn: {
backgroundColor: 'green'
backgroundColor: '#6dce99'
},
mediumBtn: {
backgroundColor: 'blue'
backgroundColor: '#4285F4'
},
advanceBtn: {
backgroundColor: 'red'
backgroundColor: '#DB4437'
},
image: {
height: 250,
......@@ -199,6 +201,12 @@ const styles = StyleSheet.create({
marginBottom: 15,
textAlign: "center",
fontSize: 20
},
modalTextBold: {
marginBottom: 15,
textAlign: "center",
fontSize: 20,
fontWeight: 'bold'
}
});
......
......@@ -108,12 +108,19 @@ const GameOverScreen = ({navigation}) => {
style={styles.image}
/>
</View>
<Button title='Play Again' onPress={()=>{navigation.navigate('GameList'); setIsLoading(false); dispatch(memoryActions.clearData());}}/>
<Button title='Finish' onPress={()=>{sendData()}}/>
<View style={styles.resultContainer}>
{/* <Text style={styles.resultText}>{!loading ? `Child's disorder level is ${disorderLevel}` : ''}</Text> */}
{resultText}
</View>
<View style={styles.buttonContainer}>
<View style={styles.button}>
<Button color={'#4285F4'} title='Play Again' onPress={()=>{navigation.navigate('GameList'); setIsLoading(false); dispatch(memoryActions.clearData());}}/>
</View>
<View style={styles.button}>
<Button color={'#DB4437'} title='Finish' onPress={()=>{sendData()}}/>
</View>
</View>
</View>
);
}
......@@ -155,7 +162,17 @@ const styles = StyleSheet.create({
textAlign: 'center',
fontSize: 22,
fontWeight: 'bold'
}
},
buttonContainer: {
flexDirection: 'row',
width: 300,
maxWidth: '80%',
justifyContent: 'space-between',
marginTop: 20
},
button: {
width: '40%'
},
});
export default GameOverScreen;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment