Added url/querystring to deps and fixed chat (#259)

* added readme pt-pt

* added url/querystring deps and fix chat pos/scale

url and querystring were missing in node_modules.
chat scale option wasn't implemented and chat input was on top instead of bottom.
This commit is contained in:
KalmeMarq 2021-12-24 16:28:38 +00:00 committed by GitHub
parent ed011b07fd
commit 5fe0807a25
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 7 deletions

View file

@ -49,13 +49,16 @@ class ChatBox extends LitElement {
padding-left: 0;
max-height: var(--chatHeight);
width: var(--chatWidth);
transform-origin: bottom left;
transform: scale(var(--chatScale));
}
.chat-input-wrapper {
bottom: 2px;
width: calc(100% - 2px);
position: relative;
bottom: 1px;
width: calc(100% - 3px);
position: absolute;
left: 1px;
box-sizing: border-box;
overflow: hidden;
background-color: rgba(0, 0, 0, 0);
}
@ -74,7 +77,7 @@ class ChatBox extends LitElement {
input[type=text], #chatinput {
background-color: rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 0, 0, 0.5);
border: 1px solid rgba(0, 0, 0, 0);
display: none;
outline: none;
}

View file

@ -63,7 +63,7 @@ class OptionsScreen extends LitElement {
this.fov = getValue('fov', 75, (v) => Number(v))
this.guiScale = getValue('guiScale', 3, (v) => Number(v))
document.documentElement.style.setProperty('--chatScale', `${this.chatScale}`)
document.documentElement.style.setProperty('--chatScale', `${this.chatScale / 100}`)
document.documentElement.style.setProperty('--chatWidth', `${this.chatWidth}px`)
document.documentElement.style.setProperty('--chatHeight', `${this.chatHeight}px`)
document.documentElement.style.setProperty('--guiScale', `${this.guiScale}`)
@ -102,7 +102,7 @@ class OptionsScreen extends LitElement {
<pmui-slider pmui-label="Chat Scale" pmui-value="${this.chatScale}" pmui-min="0" pmui-max="100" @input=${(e) => {
this.chatScale = Number(e.target.value)
window.localStorage.setItem('chatScale', `${this.chatScale}`)
document.documentElement.style.setProperty('--chatScale', `${this.chatScale}`)
document.documentElement.style.setProperty('--chatScale', `${this.chatScale / 100}`)
}}></pmui-slider>
<pmui-slider pmui-label="Sound Volume" pmui-value="${this.sound}" pmui-min="0" pmui-max="100" @input=${(e) => {
this.sound = Number(e.target.value)

View file

@ -37,7 +37,9 @@
"compression": "^1.7.4",
"express": "^4.17.1",
"lit": "^2.0.2",
"net-browserify": "PrismarineJS/net-browserify"
"net-browserify": "PrismarineJS/net-browserify",
"querystring": "^0.2.1",
"url": "^0.11.0"
},
"devDependencies": {
"assert": "^2.0.0",