FEAT: prototype game menu using html elements, better icon for text chat
This commit is contained in:
parent
855b55903b
commit
069f2f1cec
23 changed files with 520 additions and 226 deletions
|
@ -1,5 +1,9 @@
|
|||
import {LocalUser} from "./LocalUser";
|
||||
|
||||
const characterLayersKey = 'characterLayers';
|
||||
const gameQualityKey = 'gameQuality';
|
||||
const videoQualityKey = 'videoQuality';
|
||||
|
||||
//todo: add localstorage fallback
|
||||
class LocalUserStore {
|
||||
|
||||
|
@ -31,6 +35,27 @@ class LocalUserStore {
|
|||
getCustomCursorPosition(): {activeRow:number, selectedLayers:number[]}|null {
|
||||
return JSON.parse(window.localStorage.getItem('customCursorPosition') || "null");
|
||||
}
|
||||
|
||||
setCharacterLayers(layers: string[]): void {
|
||||
window.localStorage.setItem(characterLayersKey, JSON.stringify(layers));
|
||||
}
|
||||
getCharacterLayers(): string[]|null {
|
||||
return JSON.parse(window.localStorage.getItem(characterLayersKey) || "null");
|
||||
}
|
||||
|
||||
getGameQualityValue(): number {
|
||||
return parseInt(window.localStorage.getItem(gameQualityKey) || '') || 60;
|
||||
}
|
||||
setGameQualityValue(value: number): void {
|
||||
localStorage.setItem(gameQualityKey, '' + value);
|
||||
}
|
||||
|
||||
getVideoQualityValue(): number {
|
||||
return parseInt(window.localStorage.getItem(videoQualityKey) || '') || 20;
|
||||
}
|
||||
setVideoQualityValue(value: number): void {
|
||||
localStorage.setItem(videoQualityKey, '' + value);
|
||||
}
|
||||
}
|
||||
|
||||
export const localUserStore = new LocalUserStore();
|
Loading…
Add table
Add a link
Reference in a new issue