New abt variant

This commit is contained in:
tobspr 2022-06-13 12:15:38 +02:00
parent 44d0a8bcf7
commit d2a2293a5f
10 changed files with 7 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

View File

@ -84,23 +84,3 @@ $languages: en, de, cs, da, et, es-419, fr, it, pt-BR, sv, tr, el, ru, uk, zh-TW
/* @load-async */
background-image: uiResource("steam_link_btn/0.png") !important;
}
.steam_dlbtn_1 {
/* @load-async */
background-image: uiResource("steam_link_btn/1.png") !important;
}
.steam_dlbtn_2 {
/* @load-async */
background-image: uiResource("steam_link_btn/2.png") !important;
}
.steam_dlbtn_3 {
/* @load-async */
background-image: uiResource("steam_link_btn/3.png") !important;
}
.steam_dlbtn_4 {
/* @load-async */
background-image: uiResource("steam_link_btn/4.png") !important;
}
.steam_dlbtn_5 {
/* @load-async */
background-image: uiResource("steam_link_btn/5.png") !important;
}

View File

@ -32,7 +32,7 @@ export class HUDStandaloneAdvantages extends BaseHUDPart {
<div class="lowerBar">
<div class="playtimeDisclaimer">${T.demoBanners.playtimeDisclaimer}</div>
<button class="steamLinkButton steam_dlbtn_${this.root.app.gameAnalytics.abtVariant}">
<button class="steamLinkButton steam_dlbtn_0">
${
globalConfig.currentDiscount > 0
? `<span class='discount'>${globalConfig.currentDiscount}% off!</span>`

View File

@ -5,11 +5,13 @@ import { BaseHUDPart } from "../base_hud_part";
export class HUDWatermark extends BaseHUDPart {
createElements(parent) {
let linkText = this.root.app.gameAnalytics.abtVariant === "0" ? "Get on Steam" : "Play on Steam";
this.linkElement = makeDiv(
parent,
"ingame_HUD_WatermarkClicker",
globalConfig.currentDiscount > 0 ? ["withDiscount"] : [],
T.ingame.watermark.get_on_steam +
linkText +
(globalConfig.currentDiscount > 0
? `<span class='discount'>${globalConfig.currentDiscount}% off!</span>`
: "")

View File

@ -18,8 +18,8 @@ const analyticsUrl = G_IS_DEV ? "http://localhost:8001" : "https://analytics.sha
// Be sure to increment the ID whenever it changes
const analyticsLocalFile = G_IS_STEAM_DEMO ? "shapez_token_steamdemo.bin" : "shapez_token_123.bin";
const CURRENT_ABT = "abt_dlbtn";
const CURRENT_ABT_COUNT = 6;
const CURRENT_ABT = "abt_wmlt";
const CURRENT_ABT_COUNT = 2;
export class ShapezGameAnalytics extends GameAnalyticsInterface {
constructor(app) {

View File

@ -76,7 +76,7 @@ export class MainMenuState extends GameState {
<h3>${T.demoBanners.title}</h3>
<p>${T.demoBanners.intro}</p>
<span class="playtimeDisclaimer">${T.demoBanners.playtimeDisclaimer}</span>
<a href="#" class="steamLink steam_dlbtn_${this.app.gameAnalytics.abtVariant}" target="_blank">
<a href="#" class="steamLink steam_dlbtn_0" target="_blank">
${
globalConfig.currentDiscount > 0
? `<span class='discount'>${globalConfig.currentDiscount}% off!</span>`