mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Add hint to standalone version in game
This commit is contained in:
parent
c502ecad0c
commit
8627b4e1f9
18
src/css/ingame_hud/watermark.scss
Normal file
18
src/css/ingame_hud/watermark.scss
Normal file
@ -0,0 +1,18 @@
|
||||
#ingame_HUD_Watermark {
|
||||
position: absolute;
|
||||
background: uiResource("get_on_itch_io.svg") center center / contain no-repeat;
|
||||
@include S(width, 110px);
|
||||
@include S(height, 40px);
|
||||
@include S(top, 5px);
|
||||
pointer-events: all;
|
||||
cursor: pointer;
|
||||
@include S(left, 200px);
|
||||
|
||||
transition: all 0.12s ease-in;
|
||||
transition-property: opacity, transform;
|
||||
transform: skewX(-0.5deg);
|
||||
&:hover {
|
||||
transform: skewX(-1deg) scale(1.02);
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
@ -45,6 +45,7 @@
|
||||
@import "ingame_hud/debug_info";
|
||||
@import "ingame_hud/entity_debugger";
|
||||
@import "ingame_hud/tutorial_hints";
|
||||
@import "ingame_hud/watermark";
|
||||
|
||||
// prettier-ignore
|
||||
$elements:
|
||||
@ -66,6 +67,7 @@ ingame_HUD_DebugInfo,
|
||||
ingame_HUD_EntityDebugger,
|
||||
ingame_HUD_TutorialHints,
|
||||
ingame_HUD_buildings_toolbar,
|
||||
ingame_HUD_Watermark,
|
||||
|
||||
// Overlays
|
||||
ingame_HUD_BetaOverlay,
|
||||
|
@ -83,7 +83,7 @@ export const globalConfig = {
|
||||
|
||||
debug: {
|
||||
/* dev:start */
|
||||
fastGameEnter: true,
|
||||
// fastGameEnter: true,
|
||||
noArtificialDelays: true,
|
||||
// disableSavegameWrite: true,
|
||||
// showEntityBounds: true,
|
||||
|
@ -72,6 +72,9 @@ export class HUDPartTutorialHints extends BaseHUDPart {
|
||||
}
|
||||
|
||||
show() {
|
||||
this.root.app.analytics.trackUiClick("tutorial_hint_show");
|
||||
this.root.app.analytics.trackUiClick("tutorial_hint_show_lvl_" + this.root.hubGoals.level);
|
||||
|
||||
document.body.classList.add("ingameDialogOpen");
|
||||
this.element.classList.add("enlarged", "noBlur");
|
||||
this.enlarged = true;
|
||||
|
@ -1,10 +1,21 @@
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { DrawParameters } from "../../../core/draw_parameters";
|
||||
import { makeDiv } from "../../../core/utils";
|
||||
import { THIRDPARTY_URLS } from "../../../core/config";
|
||||
|
||||
export class HUDWatermark extends BaseHUDPart {
|
||||
createElements() {}
|
||||
createElements(parent) {
|
||||
this.element = makeDiv(parent, "ingame_HUD_Watermark");
|
||||
}
|
||||
|
||||
initialize() {}
|
||||
initialize() {
|
||||
this.trackClicks(this.element, this.onWatermarkClick);
|
||||
}
|
||||
|
||||
onWatermarkClick() {
|
||||
this.root.app.analytics.trackUiClick("watermark_click");
|
||||
this.root.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.standaloneStorePage);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user