FIX: Clean BotBar & TopBar

stub-api
Alban GUILHOT 3 years ago
parent a7ed13445f
commit 76aeac773d

@ -19,8 +19,6 @@ FC<{nav: any, state?: String }> =
{ {
var imgLeft=message, imgMid=gamepad, imgRight=store var imgLeft=message, imgMid=gamepad, imgRight=store
console.log(state)
switch (state) { switch (state) {
case 'Home': case 'Home':
imgMid = sgamepad imgMid = sgamepad

@ -5,7 +5,6 @@ import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar'; import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png');
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png');
const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png'); const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
@ -18,23 +17,14 @@ function Chat(props: { navigation: any; }) {
<View style={styles.container}> <View style={styles.container}>
<TopBar <TopBar
skin={skinTest} skin={skinTest}
styleAvatar={styles.avatar} nav={navigation}
title="BOB PARTY"
rightIcon={engrenage}
styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header}
/> />
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<BotBar <BotBar
messages={message}
games={gamepad}
shop={store}
style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation} nav={navigation}
styleBar={styles.footer} state='Chat'
/> />
</View> </View>
); );

@ -10,7 +10,6 @@ import { Conversation } from '../core/conversation';
const avatar = require('../../assets/Icons/BobClassic.png');
let tabSkin:Skin[]; let tabSkin:Skin[];
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
const skinTest2= new Skin("wesh",require('../../assets/BobsSkins/BobBlue.png')); const skinTest2= new Skin("wesh",require('../../assets/BobsSkins/BobBlue.png'));
@ -18,26 +17,15 @@ tabSkin=[skinTest];
tabSkin.push(skinTest2); tabSkin.push(skinTest2);
let tabConv:Conversation[]=[]; let tabConv:Conversation[]=[];
const UserActu=new User("14", "leBg", "ouioui", "grand", "la", 12222, 123324, skinTest, tabSkin, tabConv); const UserActu=new User("14", "leBg", "ouioui", "grand", "la", 12222, 123324, skinTest, tabSkin, tabConv);
const engrenage = require('../../assets/Icons/UnSelected/Cogs.png');
const gamepad = require('../../assets/Icons/Selected/SGamepad.png');
const message = require('../../assets/Icons/UnSelected/Chat.png');
const store = require('../../assets/Icons/UnSelected/Store.png');
function Home(props: { navigation: any; }) { function Home(props: { navigation: any; }) {
const { navigation } = props const { navigation } = props
return ( return (
<View style={styles.container}> <View style={styles.container}>
<TopBar <TopBar
skin={skinTest} skin={skinTest}
styleAvatar={styles.avatar} nav={navigation}
title="BOB PARTY" />
rightIcon={engrenage}
styleIcon={styles.engrenage}
nav={navigation}
styleTitle={styles.titre}
styleHeader={styles.header}
/>
<View style={styles.body}> <View style={styles.body}>
<Button <Button
title='Jouer Seul' title='Jouer Seul'
@ -49,13 +37,8 @@ function Home(props: { navigation: any; }) {
/> />
</View> </View>
<BotBar <BotBar
messages={message} nav={navigation}
games={gamepad} state='Home'
shop={store}
style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation}
styleBar={styles.footer}
/> />
</View> </View>
); );
@ -99,14 +82,6 @@ const styles = StyleSheet.create({
letterSpacing: 0.25, letterSpacing: 0.25,
color: 'white', color: 'white',
}, },
header: {
flex : 0.15,
width: '100%',
flexDirection: 'row',
backgroundColor: '#2D2C33',
alignItems: 'center',
justifyContent: 'space-around',
},
titre: { titre: {
flex: 0.7, flex: 0.7,
flexDirection: 'column', flexDirection: 'column',
@ -141,20 +116,6 @@ const styles = StyleSheet.create({
width: '100%', width: '100%',
justifyContent: 'space-evenly', justifyContent: 'space-evenly',
}, },
iconFooter: {
marginBot: 25,
marginTop: 10,
width: 65,
height: 50,
},
iconStore: {
marginBot: 25,
marginTop: 10,
marginLeft: 7,
marginRight: 8,
width: 50,
height: 50,
},
}); });

@ -7,7 +7,6 @@ import { Skin } from '../core/skin';
import { TopBar } from '../components/TopBar'; import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar'; import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png');
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png');
const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png'); const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
@ -20,23 +19,13 @@ function Profile(props: { navigation: any; }) {
<View style={styles.container}> <View style={styles.container}>
<TopBar <TopBar
skin={skinTest} skin={skinTest}
styleAvatar={styles.avatar} nav={navigation}
title="BOB PARTY"
rightIcon={engrenage}
styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header}
/> />
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<BotBar <BotBar
messages={message}
games={gamepad}
shop={store}
style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation} nav={navigation}
styleBar={styles.footer}
/> />
</View> </View>
); );

@ -1,27 +1,17 @@
import { StatusBar } from 'expo-status-bar' import { StatusBar } from 'expo-status-bar'
import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native' import { StyleSheet, View, Text, Alert, Pressable, Image} from 'react-native'
import React from 'react'; import React from 'react';
import { TopBar } from '../components/TopBar';
const msc = require('../../assets/Icons/FondGris.png');
const engrenage = require('../../assets/Icons/UnSelected/Cross.png');
function Store(props: { navigation: any; }) { function Store(props: { navigation: any; }) {
const { navigation } = props const { navigation } = props
return ( return (
<View style={styles.container}> <View style={styles.container}>
<View style={styles.header}> <TopBar
<Image nav={navigation}
style={styles.engrenage} state='settings'
source={msc}
/> />
<Text style={styles.titre}>Paramètres</Text>
<Pressable onPress={() => props.navigation.goBack()}>
<Image
style={styles.engrenage}
source={engrenage}
/>
</Pressable>
</View>
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>

@ -8,7 +8,6 @@ import { TopBar } from '../components/TopBar';
import { BotBar } from '../components/BotBar'; import { BotBar } from '../components/BotBar';
const avatar = require('../../assets/Icons/BobClassic.png');
const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png')); const skinTest= new Skin("Bob",require('../../assets/Icons/BobClassic.png'));
const engrenage = require('../../assets/Icons/UnSelected/Cogs.png'); const engrenage = require('../../assets/Icons/UnSelected/Cogs.png');
const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png'); const gamepad = require('../../assets/Icons/UnSelected/Gamepad.png');
@ -19,25 +18,16 @@ function Store(props: { navigation: any; }) {
const { navigation } = props const { navigation } = props
return ( return (
<View style={styles.container}> <View style={styles.container}>
<TopBar <TopBar
skin={skinTest} skin={skinTest}
styleAvatar={styles.avatar} nav={navigation}
title="BOB PARTY" />
rightIcon={engrenage}
styleIcon={styles.engrenage}
nav={navigation} styleTitle={styles.titre} styleHeader={styles.header}
/>
<View style={styles.body}> <View style={styles.body}>
<Text style={styles.text}>couille</Text> <Text style={styles.text}>couille</Text>
</View> </View>
<BotBar <BotBar
messages={message}
games={gamepad}
shop={store}
style={styles.iconFooter}
styleStore={styles.iconStore}
nav={navigation} nav={navigation}
styleBar={styles.footer} state='Store'
/> />
</View> </View>
); );

Loading…
Cancel
Save