Skip to content

Commit

Permalink
Add game layout for Elden Ring bingo
Browse files Browse the repository at this point in the history
  • Loading branch information
zoton2 committed Feb 22, 2024
1 parent d2f14a2 commit 84019f0
Show file tree
Hide file tree
Showing 3 changed files with 193 additions and 1 deletion.
186 changes: 186 additions & 0 deletions src/graphics/game-layout/esaw24-eldenring-bingo.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,186 @@
<template>
<div>
<!-- Game Captures -->
<game-capture
id="GameCapture1"
class="BorderLeft BorderBottom"
:style="{
left: '533px',
top: '0px',
width: '1387px',
height: '780px',
}"
/>

<!-- Camera Captures -->
<div
id="CameraCapture1"
class="Capture Flex"
:style="{
left: '0px',
top: '0px',
width: '533px',
// height: '940px',
height: '455px',
}"
/>

<!-- Participants -->
<div
:class="{
Flex: true,
BorderBottom: true,
}"
:style="{
left: '0px',
top: '0px',
width: '533px',
// height: '940px',
height: '455px',
'align-items': 'flex-end',
}"
>
<div
class="Flex"
:style="{
width: '100%',
// background: 'rgba(0, 0, 0, 0.5)',
'align-items': 'flex-end',
padding: '25px',
'padding-bottom': '25px',
zoom: 0.75,
}
">
<div
class="Flex"
:style="{
gap: '10px',
// flex-direction and flex-wrap are used in conjunction with a reversed element order
// so we can have more participant names on the bottom than on top.
'flex-direction': 'row-reverse',
'flex-wrap': 'wrap-reverse',
}"
>
<!-- So that we can style it so that participant names are properly weighted
to the bottom (more on bottom than on top) we actually add the elements
in reverse order -->
<participant-info
v-if="donationReaderNew"
type="reader"
:name="donationReaderNew.name"
:pronouns="donationReaderNew.pronouns"
:country="donationReaderNew.country"
/>
<participant-info
v-for="commentator of commentatorsNew.slice(0).reverse()"
:key="commentator.name"
type="commentator"
:name="commentator.name"
:pronouns="commentator.pronouns"
:country="commentator.country"
/>
<participant-info
v-for="player of players.slice(0).reverse()"
:key="player.id"
type="player"
:name="player.name"
:pronouns="player.pronouns"
:country="player.country"
/>
</div>
</div>
</div>

<div
class="Fixed Capture"
:style="{ left: '0px', top: '455px', width: '533px', height: '485px' }"
/>

<!-- Run Game Info/Timer -->
<div
class="Fixed Flex BorderLeft"
:style="{
left: '533px',
top: '780px',
width: '967px',
height: '160px',
}"
>
<run-info
:style="{
'font-size': '45px',
'width': '580px',
height: '100%',
}"
/>
<timer
:style="{
'width': '387px',
height: '100%',
}"
/>
</div>

<!-- Media Box -->
<media-box
class="BorderLeft"
:font-size="40"
:style="{
left: '1500px',
top: '780px',
width: '420px',
height: '160px',
}"
/>

<!-- Donation Bar -->
<donation-bar
:padding="15"
:style="{
left: '0px',
top: '940px',
width: '1920px',
height: '60px',
'font-size': '30px',
}"
/>
</div>
</template>

<script lang="ts">
import { CommentatorsNew, DonationReaderNew } from '@esa-layouts/types/schemas';
import MediaBox from '@shared/graphics/mediabox';
import { RunDataActiveRun } from 'speedcontrol-util/types';
import { Component, Vue } from 'vue-property-decorator';
import { State } from 'vuex-class';
import ParticipantInfo from '../_misc/components/ParticipantInfo.vue';
import DonationBar from './components/DonationBar.vue';
import GameCapture from './components/GameCapture.vue';
import RunInfo from './components/RunInfo.vue';
import Timer from './components/Timer.vue';
@Component({
components: {
GameCapture,
RunInfo,
Timer,
MediaBox,
DonationBar,
ParticipantInfo,
},
})
export default class extends Vue {
@State('runDataActiveRun') runData!: RunDataActiveRun;
@State readonly commentatorsNew!: CommentatorsNew;
@State readonly donationReaderNew!: DonationReaderNew;
get players() {
if (!this.runData) return [];
return this.runData.teams.map((t) => t.players).flat(1);
}
}
</script>

<style>
@import url('../_misc/themes/esaw24.theme.css');
</style>
3 changes: 2 additions & 1 deletion src/graphics/game-layout/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import L_9x16_1p from './9x16-1p.vue';
import L_DS_1p from './ds-1p.vue';
import L_ESAW24_16x9_1p from './esaw24-16x9-1p.vue';
import L_ESAW24_4x3_1p from './esaw24-4x3-1p.vue';
import L_ESAW24_EldenRing_Bingo from './esaw24-eldenring-bingo.vue';
import L_ESAW24_GBA_1p from './esaw24-gba-1p.vue';
import L_FullCam from './full-cam.vue';
import L_GB_1p from './gb-1p.vue';
Expand All @@ -40,5 +41,5 @@ import L_SWCF_16x9_2p_Bingo from './swcf_16x9-2p-bingo.vue';
import L_SWCF_16x9_4p_Bingo from './swcf_16x9-4p-bingo.vue';
import L_Taskmaster_Timer from './taskmaster-timer.vue';

export { L_16x9_1p, L_16x9_1p_2Cams, L_16x9_1p_2Cams_NoGame, L_16x9_1p_HEK, L_16x9_1p_LargeCam, L_16x9_1p_LargeCrowdCam, L_16x9_2p, L_16x9_2p_Bingo, L_16x9_2p_HEK, L_16x9_3p, L_2CamsOnly, L_3DS_1p, L_4x3_1p, L_4x3_1p_2Cams, L_4x3_2p, L_4x3_2p_ExtraMiddleSpace, L_4x3_2p_ExtraSpace, L_4x3_3p, L_4x3_4p, L_5x2_1p, L_9x16_1p, L_9x16_1p_2Cams, L_DS_1p, L_ESAW24_16x9_1p, L_ESAW24_4x3_1p, L_ESAW24_GBA_1p, L_FullCam, L_GBA_1p, L_GBA_2p, L_GB_1p, L_GB_2p_ExtraSpace, L_PokemonEmerald_MapRando, L_SM64_PSP_2p, L_SWCF_16x9_2Feeds_DancePad as L_SWCF_16x9_2Feeds_Dancepad, L_SWCF_16x9_2p_Bingo, L_SWCF_16x9_4p_Bingo, L_Taskmaster_Timer };
export { L_16x9_1p, L_16x9_1p_2Cams, L_16x9_1p_2Cams_NoGame, L_16x9_1p_HEK, L_16x9_1p_LargeCam, L_16x9_1p_LargeCrowdCam, L_16x9_2p, L_16x9_2p_Bingo, L_16x9_2p_HEK, L_16x9_3p, L_2CamsOnly, L_3DS_1p, L_4x3_1p, L_4x3_1p_2Cams, L_4x3_2p, L_4x3_2p_ExtraMiddleSpace, L_4x3_2p_ExtraSpace, L_4x3_3p, L_4x3_4p, L_5x2_1p, L_9x16_1p, L_9x16_1p_2Cams, L_DS_1p, L_ESAW24_16x9_1p, L_ESAW24_4x3_1p, L_ESAW24_EldenRing_Bingo, L_ESAW24_GBA_1p, L_FullCam, L_GBA_1p, L_GBA_2p, L_GB_1p, L_GB_2p_ExtraSpace, L_PokemonEmerald_MapRando, L_SM64_PSP_2p, L_SWCF_16x9_2Feeds_DancePad as L_SWCF_16x9_2Feeds_Dancepad, L_SWCF_16x9_2p_Bingo, L_SWCF_16x9_4p_Bingo, L_Taskmaster_Timer };
export const defaultCode = 'esaw24-4x3-1p';
5 changes: 5 additions & 0 deletions src/graphics/game-layout/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ const routes = [
path: '/esaw24-gba-1p',
component: List.L_ESAW24_GBA_1p,
},
{
name: '(ESAW24) Elden Ring Bingo',
path: '/esaw24-eldenring-bingo',
component: List.L_ESAW24_EldenRing_Bingo,
},
{
name: '4:3 1 Player',
path: '/4x3-1p',
Expand Down

0 comments on commit 84019f0

Please sign in to comment.