Fin lobby multi
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
0dd98f20f6
commit
4cf38e28c9
@ -0,0 +1,43 @@
|
|||||||
|
import { StyleSheet } from "react-native";
|
||||||
|
|
||||||
|
/*
|
||||||
|
Stylesheet for the GameComponent component
|
||||||
|
*/
|
||||||
|
|
||||||
|
export default StyleSheet.create(
|
||||||
|
{
|
||||||
|
text :{
|
||||||
|
padding: 10,
|
||||||
|
textAlign: 'center',
|
||||||
|
fontSize: 23,
|
||||||
|
fontFamily: 'Helvetica',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
letterSpacing: 0.25,
|
||||||
|
color: 'white',
|
||||||
|
alignSelf: 'center',
|
||||||
|
},
|
||||||
|
imageGameSolo :{
|
||||||
|
height: '30%',
|
||||||
|
width: '70%',
|
||||||
|
alignSelf:'center',
|
||||||
|
borderRadius: 25,
|
||||||
|
marginTop: "15%"
|
||||||
|
},
|
||||||
|
imageGameMulti :{
|
||||||
|
height: 150,
|
||||||
|
width: 150,
|
||||||
|
alignSelf:'center',
|
||||||
|
borderRadius: 25,
|
||||||
|
marginVertical: "7%",
|
||||||
|
},
|
||||||
|
pressable : {
|
||||||
|
alignItems: 'center',
|
||||||
|
justifyContent: 'center',
|
||||||
|
height: '10%',
|
||||||
|
width: '50%',
|
||||||
|
marginVertical: '1%',
|
||||||
|
borderRadius: 10,
|
||||||
|
elevation: 3,
|
||||||
|
backgroundColor: '#0085FF',
|
||||||
|
}
|
||||||
|
})
|
@ -1,33 +1,63 @@
|
|||||||
import { StatusBar } from 'expo-status-bar'
|
import { StatusBar } from 'expo-status-bar'
|
||||||
import {View, FlatList} from 'react-native'
|
import {View, FlatList, Text} from 'react-native'
|
||||||
import React from 'react';
|
import React, { useState } from 'react';
|
||||||
import { TopBar } from '../components/TopBar';
|
import { TopBar } from '../components/TopBar';
|
||||||
import { BotBar } from '../components/BotBar';
|
import { BotBar } from '../components/BotBar';
|
||||||
import { GameComponent } from '../components/GameComponent';
|
import { GameComponent } from '../components/GameComponent';
|
||||||
import { ScreenIndicator } from '../components/ScreenIndicator';
|
import { ScreenIndicator } from '../components/ScreenIndicator';
|
||||||
|
import { TextInput } from 'react-native-gesture-handler';
|
||||||
import stylesScreen from './style/screens.style'
|
import stylesScreen from './style/screens.style'
|
||||||
|
import styles from './style/GameChoice.style'
|
||||||
import { MANAGER_GAME } from '../../appManagers';
|
import { MANAGER_GAME } from '../../appManagers';
|
||||||
import { GameList } from '../components/GameList';
|
import { GameList } from '../components/GameList';
|
||||||
|
|
||||||
function GameChoice(props: { navigation: any}) {
|
function GameChoice(props: { navigation: any}) {
|
||||||
const { navigation} = props
|
const { navigation} = props
|
||||||
|
|
||||||
|
const [matchId, setMatchId] = useState('');
|
||||||
|
|
||||||
return (
|
if(MANAGER_GAME.currentGameType === "solo" ){
|
||||||
<View style={stylesScreen.container}>
|
return (
|
||||||
<TopBar
|
<View style={stylesScreen.container}>
|
||||||
nav={navigation}
|
<TopBar
|
||||||
/>
|
|
||||||
<View style={stylesScreen.bodyStart}>
|
|
||||||
<ScreenIndicator title='Game Choice'/>
|
|
||||||
<GameList
|
|
||||||
nav={navigation}
|
nav={navigation}
|
||||||
/>
|
/>
|
||||||
|
<View style={stylesScreen.bodyStart}>
|
||||||
|
<ScreenIndicator title='Game Choice'/>
|
||||||
|
<GameList
|
||||||
|
nav={navigation}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
<BotBar
|
||||||
|
nav={navigation}
|
||||||
|
state='Home'
|
||||||
|
/>
|
||||||
</View>
|
</View>
|
||||||
<BotBar
|
);
|
||||||
nav={navigation}
|
}
|
||||||
state='Home'
|
else if(MANAGER_GAME.currentGameType === "multi"){
|
||||||
/>
|
return (
|
||||||
</View>
|
<View style={stylesScreen.container}>
|
||||||
);
|
<TopBar
|
||||||
|
nav={navigation}
|
||||||
|
/>
|
||||||
|
<View style={stylesScreen.bodyStart}>
|
||||||
|
<ScreenIndicator title='Game Choice'/>
|
||||||
|
<GameList
|
||||||
|
nav={navigation}
|
||||||
|
/>
|
||||||
|
<View style={{backgroundColor: '#2D2C33', flexDirection: 'row', alignContent: 'flex-start', margin: '2%', borderRadius: 15}}>
|
||||||
|
<Text style={styles.text}>Rejoindre un match</Text>
|
||||||
|
<TextInput style={styles.textInput} placeholder='Id' onChangeText={(val) => setMatchId(val)} autoCapitalize='none' />
|
||||||
|
</View>
|
||||||
|
</View>
|
||||||
|
<BotBar
|
||||||
|
nav={navigation}
|
||||||
|
state='Home'
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
export default GameChoice
|
export default GameChoice
|
@ -1,49 +0,0 @@
|
|||||||
import { StatusBar } from 'expo-status-bar'
|
|
||||||
import { View, Image, Text, Button} from 'react-native'
|
|
||||||
import React from 'react';
|
|
||||||
import stylesScreen from './style/screens.style';
|
|
||||||
import styles from './style/Settings.style';
|
|
||||||
import { TopBar } from '../components/TopBar';
|
|
||||||
import { BotBar } from '../components/BotBar';
|
|
||||||
import { Conversation } from '../core/conversation';
|
|
||||||
import { BigBlueButton } from '../components/BigBlueButton';
|
|
||||||
import { useMatchStore } from '../context/matchContext';
|
|
||||||
import { FlatList, TextInput } from 'react-native-gesture-handler';
|
|
||||||
import { PlayerBox } from '../components/PlayerBox';
|
|
||||||
import { MANAGER_MATCH } from '../../appManagers';
|
|
||||||
import { User } from '../core/User/user';
|
|
||||||
|
|
||||||
|
|
||||||
function MatchMaking(props: { navigation: any; }) {
|
|
||||||
|
|
||||||
const { navigation } = props
|
|
||||||
|
|
||||||
const match = useMatchStore().match;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View style={stylesScreen.container}>
|
|
||||||
<TopBar
|
|
||||||
nav={navigation}
|
|
||||||
state='matchmacking'
|
|
||||||
/>
|
|
||||||
<FlatList
|
|
||||||
data={match?.getTabUsers()}
|
|
||||||
keyExtractor={usr =>usr.getUsername()}
|
|
||||||
renderItem={({item}) => <PlayerBox user={item}/>}
|
|
||||||
/>
|
|
||||||
<View style={stylesScreen.bodyCenter}>
|
|
||||||
<Button
|
|
||||||
title='Lancer la partie'
|
|
||||||
onPress={() => navigation.navigate(match?.getGame().getName().replace(/\s/g, ''))}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
<Image
|
|
||||||
style={{width:100, height:100}}
|
|
||||||
source={{uri: match?.getGame().getImageSource()}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
export default MatchMaking
|
|
@ -0,0 +1,19 @@
|
|||||||
|
import { StyleSheet } from "react-native";
|
||||||
|
|
||||||
|
export default StyleSheet.create({
|
||||||
|
text :{
|
||||||
|
padding: 10,
|
||||||
|
fontSize: 23,
|
||||||
|
fontFamily: 'Helvetica',
|
||||||
|
fontWeight: 'bold',
|
||||||
|
letterSpacing: 0.25,
|
||||||
|
color: 'white',
|
||||||
|
},
|
||||||
|
textInput: {
|
||||||
|
backgroundColor: 'white',
|
||||||
|
flex: 1,
|
||||||
|
margin: '2%',
|
||||||
|
paddingLeft: 5,
|
||||||
|
borderRadius: 15,
|
||||||
|
}
|
||||||
|
});
|
Loading…
Reference in new issue