forked from tobspr-games/shapez.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
custom_css.js
44 lines (37 loc) · 7.93 KB
/
custom_css.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Add custom CSS",
version: "1",
id: "custom-css",
description: "Shows how to add custom css",
minimumGameVersion: ">=1.5.0",
// You can specify this parameter if savegames will still work
// after your mod has been uninstalled
doesNotAffectSavegame: true,
};
class Mod extends shapez.Mod {
init() {
// Notice that, since the UI is scaled dynamically, every pixel value
// should be wrapped in '$scaled()' (see below)
this.modInterface.registerCss(`
* {
font-family: "Comic Sans", "Comic Sans MS", "ComicSans", Tahoma !important;
}
#state_MainMenuState {
background: #9dc499 url('${RESOURCES["cat.png"]}') top left repeat !important;
}
#state_MainMenuState .fullscreenBackgroundVideo {
display: none !important;
}
#state_MainMenuState .mainContainer, #state_MainMenuState .modsOverview {
border: $scaled(5px) solid #000 !important;
}
`);
}
}
const RESOURCES = {
"cat.png":
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAYAAADDPmHLAAAACXBIWXMAAAGxAAABsQFhmCgOAAAE8mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlw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