mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-11 09:11:50 +00:00
Remove some mobile-web code
This commit is contained in:
parent
903b196e1e
commit
4940135140
@ -25,7 +25,6 @@
|
||||
@import "states/keybindings";
|
||||
@import "states/settings";
|
||||
@import "states/about";
|
||||
@import "states/mobile_warning";
|
||||
@import "states/changelog";
|
||||
@import "states/puzzle_menu";
|
||||
@import "states/mods";
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
#state_MobileWarningState {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #555b75 !important;
|
||||
@include S(padding, 20px);
|
||||
box-sizing: border-box;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
|
||||
.logo {
|
||||
width: 80%;
|
||||
max-width: 200px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
color: rgba(#fff, 0.5);
|
||||
display: block;
|
||||
margin-bottom: 13px;
|
||||
font-size: 16px;
|
||||
line-height: 20px;
|
||||
max-width: 300px;
|
||||
text-align: left;
|
||||
a {
|
||||
color: $colorBlueBright;
|
||||
}
|
||||
}
|
||||
|
||||
.standaloneLink {
|
||||
width: 200px;
|
||||
height: 48px;
|
||||
min-height: 40px;
|
||||
& {
|
||||
background: #000 uiResource("steam_link_btn/0.png") center center / contain no-repeat;
|
||||
}
|
||||
display: block;
|
||||
text-indent: -999em;
|
||||
cursor: pointer;
|
||||
margin-top: 10px;
|
||||
pointer-events: all;
|
||||
transition: all 0.12s ease-in;
|
||||
transition-property: opacity, transform;
|
||||
@include S(border-radius, $globalBorderRadius);
|
||||
overflow: hidden;
|
||||
|
||||
&:hover {
|
||||
transform: skewX(-1deg) scale(1.02);
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3,17 +3,6 @@
|
||||
<head>
|
||||
<title>shapez</title>
|
||||
|
||||
<!-- mobile stuff -->
|
||||
<meta name="format-detection" content="telephone=no" />
|
||||
<meta name="msapplication-tap-highlight" content="no" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, shrink-to-fit=no, viewport-fit=cover"
|
||||
/>
|
||||
<meta name="HandheldFriendly" content="true" />
|
||||
<meta name="MobileOptimized" content="320" />
|
||||
<meta name="theme-color" content="#393747" />
|
||||
|
||||
<!-- misc -->
|
||||
<meta http-equiv="Cache-Control" content="private, max-age=0, no-store, no-cache, must-revalidate" />
|
||||
<meta http-equiv="Expires" content="0" />
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import { AnimationFrame } from "./core/animation_frame";
|
||||
import { BackgroundResourcesLoader } from "./core/background_resources_loader";
|
||||
import { IS_MOBILE } from "./core/config";
|
||||
import { GameState } from "./core/game_state";
|
||||
import { GLOBAL_APP, setGlobalApp } from "./core/globals";
|
||||
import { InputDistributor } from "./core/input_distributor";
|
||||
@ -10,6 +9,9 @@ import { StateManager } from "./core/state_manager";
|
||||
import { TrackedState } from "./core/tracked_state";
|
||||
import { getPlatformName, waitNextFrame } from "./core/utils";
|
||||
import { Vector } from "./core/vector";
|
||||
import { MOD_SIGNALS } from "./mods/mod_signals";
|
||||
import { MODS } from "./mods/modloader";
|
||||
import { ClientAPI } from "./platform/api";
|
||||
import { NoAchievementProvider } from "./platform/no_achievement_provider";
|
||||
import { Sound } from "./platform/sound";
|
||||
import { Storage } from "./platform/storage";
|
||||
@ -20,16 +22,12 @@ import { AboutState } from "./states/about";
|
||||
import { ChangelogState } from "./states/changelog";
|
||||
import { InGameState } from "./states/ingame";
|
||||
import { KeybindingsState } from "./states/keybindings";
|
||||
import { MainMenuState } from "./states/main_menu";
|
||||
import { MobileWarningState } from "./states/mobile_warning";
|
||||
import { PreloadState } from "./states/preload";
|
||||
import { SettingsState } from "./states/settings";
|
||||
import { PuzzleMenuState } from "./states/puzzle_menu";
|
||||
import { ClientAPI } from "./platform/api";
|
||||
import { LoginState } from "./states/login";
|
||||
import { MODS } from "./mods/modloader";
|
||||
import { MOD_SIGNALS } from "./mods/mod_signals";
|
||||
import { MainMenuState } from "./states/main_menu";
|
||||
import { ModsState } from "./states/mods";
|
||||
import { PreloadState } from "./states/preload";
|
||||
import { PuzzleMenuState } from "./states/puzzle_menu";
|
||||
import { SettingsState } from "./states/settings";
|
||||
|
||||
/**
|
||||
* @typedef {import("./platform/achievement_provider").AchievementProviderInterface} AchievementProviderInterface
|
||||
@ -125,12 +123,7 @@ export class Application {
|
||||
|
||||
Loader.linkAppAfterBoot(this);
|
||||
|
||||
// Check for mobile
|
||||
if (IS_MOBILE) {
|
||||
this.stateMgr.moveToState("MobileWarningState");
|
||||
} else {
|
||||
this.stateMgr.moveToState("PreloadState");
|
||||
}
|
||||
this.stateMgr.moveToState("PreloadState");
|
||||
|
||||
// Starting rendering
|
||||
this.ticker.frameEmitted.add(this.onFrameEmitted, this);
|
||||
@ -149,7 +142,6 @@ export class Application {
|
||||
/** @type {Array<typeof GameState>} */
|
||||
const states = [
|
||||
PreloadState,
|
||||
MobileWarningState,
|
||||
MainMenuState,
|
||||
InGameState,
|
||||
SettingsState,
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
import { GameState } from "../core/game_state";
|
||||
|
||||
export class MobileWarningState extends GameState {
|
||||
constructor() {
|
||||
super("MobileWarningState");
|
||||
}
|
||||
|
||||
getInnerHTML() {
|
||||
return `
|
||||
|
||||
<img class="logo" src="res/logo.png" alt="shapez.io Logo">
|
||||
|
||||
<p>I'm sorry, but shapez.io is not available on mobile devices yet!</p>
|
||||
<p>If you have a desktop device, you can get shapez on Steam:</p>
|
||||
|
||||
|
||||
<a href="https://get.shapez.io/shapez_mobile" class="standaloneLink" target="_blank">Play on Steam!</a>
|
||||
`;
|
||||
}
|
||||
|
||||
getThemeMusic() {
|
||||
return null;
|
||||
}
|
||||
|
||||
getHasFadeIn() {
|
||||
return false;
|
||||
}
|
||||
|
||||
onLeave() {
|
||||
// this.dialogs.cleanup();
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user