parent
31dba61279
commit
a110abc192
@ -0,0 +1,43 @@
|
|||||||
|
#state_MobileWarningState {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: #333438 !important;
|
||||||
|
@include S(padding, 20px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.logo {
|
||||||
|
width: 80%;
|
||||||
|
max-width: 200px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
color: #aaacaf;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 13px;
|
||||||
|
font-size: 16px;
|
||||||
|
line-height: 20px;
|
||||||
|
a {
|
||||||
|
color: $colorBlueBright;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.standaloneLink {
|
||||||
|
width: 100%;
|
||||||
|
height: 80px;
|
||||||
|
background: uiResource("get_on_itch_io.svg") center center / contain no-repeat;
|
||||||
|
overflow: hidden;
|
||||||
|
display: block;
|
||||||
|
text-indent: -999em;
|
||||||
|
cursor: pointer;
|
||||||
|
margin-top: 20px;
|
||||||
|
pointer-events: all;
|
||||||
|
transition: all 0.12s ease-in;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
transform: skewX(-0.5deg);
|
||||||
|
&:hover {
|
||||||
|
transform: skewX(-1deg) scale(1.02);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
import { GameState } from "../core/game_state";
|
||||||
|
import { cachebust } from "../core/cachebust";
|
||||||
|
import { THIRDPARTY_URLS } from "../core/config";
|
||||||
|
|
||||||
|
export class MobileWarningState extends GameState {
|
||||||
|
constructor() {
|
||||||
|
super("MobileWarningState");
|
||||||
|
}
|
||||||
|
|
||||||
|
getInnerHTML() {
|
||||||
|
return `
|
||||||
|
|
||||||
|
<div class="mobileWarning">
|
||||||
|
<img class="logo" src="${cachebust("res/logo.png")}" alt="shapez.io Logo">
|
||||||
|
|
||||||
|
<p>
|
||||||
|
I'm sorry, but shapez.io is not yet available on mobile devices!
|
||||||
|
(There is also no estimate when this will change, but feel to make a contribution! It's
|
||||||
|
<a href="https://github.com/tobspr/shapez.io" target="_blank">open source</a>!)</p>
|
||||||
|
|
||||||
|
<p>If you want to play on your computer, you can also get the standalone on itch.io:</p>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="${
|
||||||
|
THIRDPARTY_URLS.standaloneStorePage
|
||||||
|
}" class="standaloneLink" target="_blank">Get the shapez.io standalone!</a>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
}
|
||||||
|
|
||||||
|
getThemeMusic() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
getHasFadeIn() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
onEnter() {
|
||||||
|
try {
|
||||||
|
if (window.gtag) {
|
||||||
|
window.gtag("event", "click", {
|
||||||
|
event_category: "ui",
|
||||||
|
event_label: "mobile_warning",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch (ex) {
|
||||||
|
console.warn("Failed to track mobile click:", ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
onLeave() {
|
||||||
|
// this.dialogs.cleanup();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue