1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Finish new settings, add logo to about page

This commit is contained in:
dengr1065 2020-07-22 08:50:52 +03:00
parent 4c99787e5c
commit a6bbb22152
4 changed files with 67 additions and 21 deletions

View File

@ -1,9 +1,32 @@
#state_AboutState { #state_AboutState {
> .container .content { > .container .content {
@include S(max-width, 600px);
@include PlainText; @include PlainText;
padding: 0;
}
.head {
background: rgba(0, 0, 0, 0.2);
@include S(padding, 10px);
img {
display: block;
margin: 0 auto;
@include S(max-width, 300px);
}
}
.text {
@include S(margin, 10px);
} }
a { a {
@include S(margin, 0, 3px); @include S(margin, 0, 3px);
} }
@include DarkThemeOverride {
.head {
background: rgba(22, 21, 21, 0.1);
}
}
} }

View File

@ -109,6 +109,10 @@
@include S(margin-top, 4px); @include S(margin-top, 4px);
width: calc(100% - #{D(20px)}); width: calc(100% - #{D(20px)});
text-align: start; text-align: start;
&::after {
content: unset;
}
} }
button.categoryButton { button.categoryButton {
@ -139,24 +143,38 @@
} }
@include DarkThemeOverride { @include DarkThemeOverride {
.content { .container .content {
.setting { .sidebar {
background: darken($darkModeGameBackground, 10); button.categoryButton {
background-color: #44444f;
.value.enum { &.active {
// dirty but works
filter: invert(0.85);
color: #222;
}
.value.checkbox {
background-color: #74767b;
&.checked {
background-color: $colorBlueBright; background-color: $colorBlueBright;
} }
} }
} }
.categoryContainer {
.category {
.setting {
background: darken($darkModeGameBackground, 10);
.value.enum {
// dirty but works
filter: invert(0.78) sepia(40%) hue-rotate(190deg);
color: #222;
}
.value.checkbox {
background-color: #74767b;
&.checked {
background-color: $colorBlueBright;
}
}
}
}
}
} }
} }
} }

View File

@ -1,9 +1,7 @@
import { TextualGameState } from "../core/textual_game_state"; import { TextualGameState } from "../core/textual_game_state";
import { SOUNDS } from "../platform/sound";
import { T } from "../translations"; import { T } from "../translations";
import { KEYMAPPINGS, getStringForKeyCode } from "../game/key_action_mapper";
import { Dialog } from "../core/modal_dialog_elements";
import { THIRDPARTY_URLS } from "../core/config"; import { THIRDPARTY_URLS } from "../core/config";
import { cachebust } from "../core/cachebust";
export class AboutState extends TextualGameState { export class AboutState extends TextualGameState {
constructor() { constructor() {
@ -15,9 +13,16 @@ export class AboutState extends TextualGameState {
} }
getMainContentHTML() { getMainContentHTML() {
return T.about.body return `
.replace("<githublink>", THIRDPARTY_URLS.github) <div class="head">
.replace("<discordlink>", THIRDPARTY_URLS.discord); <img src="${cachebust("res/logo.png")}" alt="shapez.io Logo">
</div>
<div class="text">
${T.about.body
.replace("<githublink>", THIRDPARTY_URLS.github)
.replace("<discordlink>", THIRDPARTY_URLS.discord)}
</div>
`;
} }
onEnter() { onEnter() {

View File

@ -856,13 +856,13 @@ about:
body: >- body: >-
This game is open source and developed by <a href="https://github.com/tobspr" target="_blank">Tobias Springer</a> (this is me).<br><br> This game is open source and developed by <a href="https://github.com/tobspr" target="_blank">Tobias Springer</a> (this is me).<br><br>
If you want to contribute, check out <a href="<githublink>" target="_blank">shapez.io on github</a>.<br><br> If you want to contribute, check out <a href="<githublink>" target="_blank">shapez.io on GitHub</a>.<br><br>
This game wouldn't have been possible without the great Discord community around my games - You should really join the <a href="<discordlink>" target="_blank">Discord server</a>!<br><br> This game wouldn't have been possible without the great Discord community around my games - You should really join the <a href="<discordlink>" target="_blank">Discord server</a>!<br><br>
The soundtrack was made by <a href="https://soundcloud.com/pettersumelius" target="_blank">Peppsen</a> - He's awesome.<br><br> The soundtrack was made by <a href="https://soundcloud.com/pettersumelius" target="_blank">Peppsen</a> - He's awesome.<br><br>
Finally, huge thanks to my best friend <a href="https://github.com/niklas-dahl" target="_blank">Niklas</a> - Without our factorio sessions, this game would never have existed. Finally, huge thanks to my best friend <a href="https://github.com/niklas-dahl" target="_blank">Niklas</a> - Without our Factorio sessions, this game would never have existed.
changelog: changelog:
title: Changelog title: Changelog