fixes #147, fixes #136, is related to but doesnt entirely complete #144

This commit is contained in:
logsol 2016-08-28 22:40:25 +02:00
parent 502cf72a7e
commit c87997c774
13 changed files with 134 additions and 27 deletions

View file

@ -9,7 +9,7 @@ function (PIXI, Nc, Settings, ColorConverter) {
"use strict";
function GameStats(gameContainer) {
function GameStats(view) {
this.style = {
borderWidth: 3,
@ -27,7 +27,7 @@ function (PIXI, Nc, Settings, ColorConverter) {
fontSize: 12
};
this.gameContainer = gameContainer;
this.view = view;
this.container = new PIXI.DisplayObjectContainer();
@ -77,11 +77,12 @@ function (PIXI, Nc, Settings, ColorConverter) {
this.redraw();
// show stats with filters
this.container.visible = true;
this.gameContainer.filters = this.filters;
this.view.addFilters(this.filters);
this.filters.forEach(function(filter) { filter.dirty = true; });
} else {
this.container.visible = false;
this.gameContainer.filters = null;
this.view.removeFilters(this.filters);
}
}