diff --git a/bob_party/src/components/BigBlueButton.tsx b/bob_party/src/components/BigBlueButton.tsx new file mode 100644 index 0000000..ce3f472 --- /dev/null +++ b/bob_party/src/components/BigBlueButton.tsx @@ -0,0 +1,22 @@ +import { FC } from "react" +import { Pressable, Text } from "react-native" +import React from "react" +/* + Importing the corresponding stylesheet +*/ +import styles from "./style/BigBlueButton.style" + +export const BigBlueButton: + /* Parameters: + * onPress : function that must be called when the button has been clicked + * title : optional text that would be in the button + */ + FC<{ onPress: any; title?: any | undefined; }> + = + ({ onPress, title }) => { + return ( + + {title} + + ); + } \ No newline at end of file diff --git a/bob_party/src/components/ButtonGameTypeChoice.tsx b/bob_party/src/components/ButtonGameTypeChoice.tsx deleted file mode 100644 index f165866..0000000 --- a/bob_party/src/components/ButtonGameTypeChoice.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import { FC } from "react" -import { Pressable, Text} from "react-native" -import React from "react" -/* - Importing the corresponding stylesheet -*/ -import styles from "./style/ButtonGameTypeChoice.style" - -export const ButtonGameTypeChoice: -/* Parameters: - * onPress : function that must be called when the button has been clicked - * title : optional text that would be in the button -*/ -FC<{ onPress: any; title?: any | undefined; }> -= -({onPress,title}) => - { - return ( - - {title} - - ); - } \ No newline at end of file diff --git a/bob_party/src/components/style/ButtonGameTypeChoice.style.js b/bob_party/src/components/style/BigBlueButton.style.js similarity index 100% rename from bob_party/src/components/style/ButtonGameTypeChoice.style.js rename to bob_party/src/components/style/BigBlueButton.style.js diff --git a/bob_party/src/components/style/Game.style.js b/bob_party/src/components/style/Game.style.js index 110df78..5fc082d 100644 --- a/bob_party/src/components/style/Game.style.js +++ b/bob_party/src/components/style/Game.style.js @@ -9,7 +9,7 @@ export default StyleSheet.create( image : { borderRadius: 15, marginTop: 15, - marginRight: 15, + marginHorizontal: 7.5, width: 100, height: 100, }, diff --git a/bob_party/src/screens/Home.tsx b/bob_party/src/screens/Home.tsx index 5c8f454..27cc25e 100644 --- a/bob_party/src/screens/Home.tsx +++ b/bob_party/src/screens/Home.tsx @@ -5,7 +5,7 @@ import stylesScreen from './style/screens.style' import { TopBar } from '../components/TopBar'; import { BotBar } from '../components/BotBar'; import { Conversation } from '../core/conversation'; -import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; +import { BigBlueButton } from '../components/BigBlueButton'; import { useGameStore } from '../context/gameContext'; import { MANAGER_CONVERSATION, MANAGER_GAME, MANAGER_USER } from '../../appManagers'; import { socket } from '../../socketConfig'; @@ -35,11 +35,11 @@ function Home(props: { navigation: any; }) { state='Home' /> - { MANAGER_GAME.currentGameType="solo";navigation.navigate('GameChoiceTab') }} /> - { MANAGER_GAME.currentGameType="multi" ; navigation.navigate('GameChoiceTab')}} /> diff --git a/bob_party/src/screens/LobbySolo.tsx b/bob_party/src/screens/LobbySolo.tsx index 62e6ae1..dd368aa 100644 --- a/bob_party/src/screens/LobbySolo.tsx +++ b/bob_party/src/screens/LobbySolo.tsx @@ -5,9 +5,10 @@ import stylesScreen from './style/screens.style' import { TopBar } from '../components/TopBar'; import { BotBar } from '../components/BotBar'; import { Conversation } from '../core/conversation'; -import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; +import { BigBlueButton } from '../components/BigBlueButton'; import { useMatchStore } from '../context/matchContext'; import { MANAGER_MATCH } from '../../appManagers'; +import { ScreenIndicator } from '../components/ScreenIndicator'; function LobbySolo(props: { navigation: any; }) { @@ -22,17 +23,19 @@ function LobbySolo(props: { navigation: any; }) { nav={navigation} state='matchmacking' /> - - navigation.navigate(MANAGER_MATCH.getCurrentMatch()?.getGame().getName().replace(/\s/g, ''))} - /> + + + + navigation.navigate(MANAGER_MATCH.getCurrentMatch()?.getGame().getName().replace(/\s/g, ''))} + /> + + - - ); } diff --git a/bob_party/src/screens/MatchMaking.tsx b/bob_party/src/screens/MatchMaking.tsx index c425628..1efdf51 100644 --- a/bob_party/src/screens/MatchMaking.tsx +++ b/bob_party/src/screens/MatchMaking.tsx @@ -6,7 +6,7 @@ import styles from './style/Settings.style'; import { TopBar } from '../components/TopBar'; import { BotBar } from '../components/BotBar'; import { Conversation } from '../core/conversation'; -import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; +import { BigBlueButton } from '../components/BigBlueButton'; import { useMatchStore } from '../context/matchContext'; import { FlatList, TextInput } from 'react-native-gesture-handler'; import { PlayerBox } from '../components/PlayerBox'; diff --git a/bob_party/src/screens/SignUp.tsx b/bob_party/src/screens/SignUp.tsx index 7deebfe..f0d5ad7 100644 --- a/bob_party/src/screens/SignUp.tsx +++ b/bob_party/src/screens/SignUp.tsx @@ -3,7 +3,7 @@ import { StyleSheet, View, ImageSourcePropType, Pressable, Text, Alert} from 're import React, { useState } from 'react'; import stylesScreen from './style/screens.style' import { TextInput } from 'react-native-gesture-handler'; -import { ButtonGameTypeChoice } from '../components/ButtonGameTypeChoice'; +import { BigBlueButton } from '../components/BigBlueButton'; import styles from "./style/SignUp.style"; import { useDispatch, useSelector } from 'react-redux'; import { checkNewUserValidity } from '../core/Auth/newUser';