Skip to content

Commit

Permalink
gamedata scene
Browse files Browse the repository at this point in the history
  • Loading branch information
Potato22 committed Jan 29, 2024
1 parent a4fda0a commit cd31b51
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 10 deletions.
15 changes: 15 additions & 0 deletions assets/css/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@
animation-delay: -1700ms;
}

.gameDataMode {
width: 736px !important;
}

@keyframes xWiggle {
from {
transform: translateX(0px);
Expand All @@ -224,6 +228,17 @@
transform: translateX(3px);
}
}
.midAlign {
padding: 0 !important;
display: flex;
flex-direction: column;
align-items: center;
}

.centerButtons {
justify-content: center !important;
}

.menuGameplay,
.submenu-gameplay-where,
.submenu-gameplay-accessibility,
Expand Down
13 changes: 12 additions & 1 deletion assets/css/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,9 @@
animation-delay: -1700ms;
}
}
.gameDataMode {
width: 736px !important;
}

@keyframes xWiggle {
from {
Expand All @@ -237,7 +240,15 @@
transform: translateX(3px)
}
}

.midAlign {
padding: 0 !important;
display: flex;
flex-direction: column;
align-items: center;
}
.centerButtons {
justify-content: center !important;
}
.menuGameplay,
.submenu-gameplay-where,
.submenu-gameplay-accessibility,
Expand Down
1 change: 1 addition & 0 deletions assets/css/palette.scss
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ body {
--ladderLimit: 0em;
}


.hideOrnaments {
transform: translateX(-1024px);
}
Expand Down
35 changes: 35 additions & 0 deletions assets/css/sprites.css
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,41 @@
pointer-events: none;
}

.dataCardPercent {
display: flex;
align-items: flex-end;
padding-bottom: 0.8rem;
color: var(--inactiveText);
}

.dataPercentage {
background: red;
--scale: 125px;
width: var(--scale);
height: var(--scale);
color: var(--inactiveText);
}

.progress {
position: absolute;
transform: translate(0px, -12px);
text-align: center;
font-size: 1.5em;
color: var(--inactiveText);
}

.dataPercentageNotation {
transform: translateY(10px);
}

.dataName {
padding-left: 12rem;
}
.dataName .dataSlot {
font-size: 1.7em;
line-height: 0.8;
}

.grid {
z-index: -5;
transform: scale(2);
Expand Down
31 changes: 31 additions & 0 deletions assets/css/sprites.scss
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
animation: iconData var(--spinner) infinite alternate linear;
}


@keyframes iconSpinner {
from {
transform: rotate(0deg);
Expand Down Expand Up @@ -191,6 +192,36 @@
}
}

.dataCardPercent {
display: flex;
align-items: flex-end;
padding-bottom: .8rem;
color: var(--inactiveText);
}
.dataPercentage {
background: red;
--scale: 125px;
width: var(--scale);
height: var(--scale);
color: var(--inactiveText);
}
.progress {
position: absolute;
transform: translate(0px, -12px);
text-align: center;
font-size: 1.5em;
color: var(--inactiveText);
}
.dataPercentageNotation {
transform: translateY(10px);
}
.dataName {
padding-left: 12rem;
& .dataSlot {
font-size: 1.7em;
line-height: .8;
}
}

.grid {
z-index: -5;
Expand Down
11 changes: 11 additions & 0 deletions assets/js/buttons.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ $(() => {
hideOrnaments();
}, ornamentDelay);
setTimeout(() => {
centerButtons(true)
sceneEnter();
}, enterDelay);
break;
Expand Down Expand Up @@ -234,6 +235,7 @@ $(() => {
$(prevSceneName).removeClass('buttonEnter')
unhideOrnaments();
$('.pageName').html(scenePageName)
centerButtons(false)
}, 200);
}, 200);
break;
Expand Down Expand Up @@ -327,6 +329,15 @@ $(() => {
$('#screenOrnaments').removeClass('hideOrnaments');
}

function centerButtons(state) {
if (state == true) {
$('#buttonArrayInline').addClass('centerButtons');
} else {
$('#buttonArrayInline').removeClass('centerButtons');
}
}


function bgmChanger(bgmTarget) {
updateVolumeValues()
console.log("changing to bgm", bgmTarget, "...")
Expand Down
4 changes: 2 additions & 2 deletions assets/js/driver.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ $(() => {

})
//DEBUG:: SKIP
//debugSkipIntro();
debugSkipIntro();

$('#shutdown').on('click', function () {
$('.wrapper').css('pointer-events', 'none');
Expand Down Expand Up @@ -103,7 +103,7 @@ function debugSkipIntro() {
$('.cover').css('display', 'none');
$('.grid, #buttonArrayInline, #screenOrnaments, .bglive').show();
$('.fader').attr('started', 'true');
enter.play(), bgm.play()
enter.play(), //bgm.play()
$('.logoSplash').css({
'opacity': '0'
})
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions assets/sprites/datacard.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 25 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<script src="assets/js/buttons.js" type="module" defer></script>
<!-- <script src="assets/js/soundVolHandler.mjs" type="module"></script> -->
<script src="assets/js/driver.mjs" type="module"></script>

<script defer>
var readyState = false
minload();
Expand Down Expand Up @@ -147,7 +147,7 @@
<div class="pageName light">SETTINGS</div>
</div>
</div>
<div id="buttonArrayInline">
<div id="buttonArrayInline" class="">
<div class="menuButtons initMenu">
<div button-state=false class="buttonComponent" buttonData="gameplay">
<div class="buttonText">GAMEPLAY</div>
Expand Down Expand Up @@ -261,8 +261,7 @@
</svg>
<div class="buttonHighlight highlightToggle" toggle-marker="true">ON</div>
</div>
<div button-state=false class="buttonComponent" buttonData="dark" toggle=true
toggleData="dark">
<div button-state=false class="buttonComponent" buttonData="dark" toggle=true toggleData="dark">
<div class="buttonText">D A R K</div>
<svg class="menuButton" width="455.84" height="100.27" version="1.1" viewBox="0 0 120.61 26.53">
<g transform="translate(-48.458 -55.241)">
Expand Down Expand Up @@ -320,9 +319,28 @@
</div>
</div>
<!-- GAME DATA -->
<div class="menuButtons menuGameData buttonEnter">
<div button-state=false class="buttonComponent" buttonData="?">
<div class="buttonText">placeholder</div>
<div class="menuButtons menuGameData buttonEnter midAlign noladder">
<div button-state=false class="buttonComponent gameDataMode" buttonData="subButton" buttonInherit="gameData"
subButtonData="accessibility">
<div class="dataCardPercent buttonText">
<div class="dataPercentage"></div>
<div class="progress">100</div>
<div class="dataPercentageNotation">%</div>
</div>
<div class="dataName buttonText">
<div class="dataSlot">SLOT1</div>
<div class="dataChapter">M20 - DETHRONE</div>
</div>
<svg class="menuButton " width="1159.5341" height="267" version="1.1"
viewBox="0 0 306.78901 70.644">
<path
d="M 0.5220551,0.52554628 V 70.119204 H 306.26695 V 11.615189 L 295.37868,0.52479628 Z" />
</svg>

<div class="buttonHighlight"></div>
</div>
<div button-state=false class="buttonComponent" buttonData="subButton" buttonInherit="gameData"
subButtonData="where">
<svg class="menuButton" width="455.84" height="100.27" version="1.1" viewBox="0 0 120.61 26.53">
<g transform="translate(-48.458 -55.241)">
<path d="m48.808 55.591h36.179l5.2075 2.8655h67.347l11.175 8.2343v14.73h-119.91z" />
Expand Down

0 comments on commit cd31b51

Please sign in to comment.