mirror of
https://github.com/redphx/better-xcloud.git
synced 2025-08-13 16:39:16 +02:00
Game bar (#392)
* Fix games with custom touch control sometimes not showing touch icon * Create game-bar with screenshot button * Disable Game bar when opening the Guide * Remove SCREENSHOT_BUTTON_POSITION pref * Make the touch control action functional * Show game bar when the game starts * Fix 720p/High not working (#387) * Update icons * Update game bar's animations * Reset states of Game bar actions before playing * Don't show Touch control action on non-touch-supported devices * Clean up * Update translations * Update actions' texts * Clean up
This commit is contained in:
91
src/assets/css/game-bar.styl
Normal file
91
src/assets/css/game-bar.styl
Normal file
@@ -0,0 +1,91 @@
|
||||
#bx-game-bar {
|
||||
z-index: var(--bx-game-bar-z-index);
|
||||
position: fixed;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 40px;
|
||||
height: 90px;
|
||||
overflow: visible;
|
||||
cursor: pointer;
|
||||
|
||||
> svg {
|
||||
display: none;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
height: 28px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
&:hover {
|
||||
> svg {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bx-game-bar-container {
|
||||
opacity: 0;
|
||||
position absolute;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
background: #1a1b1ee8;
|
||||
border-radius: 0 10px 10px 0;
|
||||
box-shadow: 0px 0px 6px #1c1c1c;
|
||||
transition: opacity 0.1s ease-in;
|
||||
|
||||
&.bx-show {
|
||||
opacity: 1;
|
||||
|
||||
+ svg {
|
||||
display: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
&.bx-hide {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
button {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
|
||||
svg {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
transition: transform 0.08s ease 0s;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
&:active {
|
||||
svg {
|
||||
transform: scale(0.75);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Touch controller buttons */
|
||||
div[data-enabled] {
|
||||
button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Show disable button */
|
||||
div[data-enabled='true'] {
|
||||
button:last-of-type {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* Show enable button */
|
||||
div[data-enabled='false'] {
|
||||
button:first-of-type {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user