mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-07 21:05:58 +00:00
disable hover highlight due to performance issues.
This commit is contained in:
@@ -550,6 +550,8 @@ export class GameView implements GameMap {
|
||||
}
|
||||
|
||||
focusedPlayer(): PlayerView | null {
|
||||
// TODO: renable when performance issues are fixed.
|
||||
return null;
|
||||
if (userSettings.focusLocked()) return this.myPlayer();
|
||||
return this._focusedPlayer;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
export class UserSettings {
|
||||
private focusedLocked_: boolean | null = null;
|
||||
|
||||
get(key: string, defaultValue: boolean) {
|
||||
const value = localStorage.getItem(key);
|
||||
if (!value) return defaultValue;
|
||||
@@ -27,10 +25,9 @@ export class UserSettings {
|
||||
}
|
||||
|
||||
focusLocked() {
|
||||
if (this.focusedLocked_ === null) {
|
||||
this.focusedLocked_ = this.get("settings.focusLocked", true);
|
||||
}
|
||||
return this.focusedLocked_;
|
||||
return false;
|
||||
// TODO: renable when performance issues are fixed.
|
||||
this.get("settings.focusLocked", true);
|
||||
}
|
||||
|
||||
toggleLeftClickOpenMenu() {
|
||||
@@ -38,7 +35,6 @@ export class UserSettings {
|
||||
}
|
||||
|
||||
toggleFocusLocked() {
|
||||
this.focusLocked = null;
|
||||
this.set("settings.focusLocked", !this.focusLocked());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user