Skip to content
Snippets Groups Projects
Commit 01aa8702 authored by Luboš Horáček's avatar Luboš Horáček
Browse files

Pixmap disposal fix

parent 09220a27
No related branches found
No related tags found
No related merge requests found
......@@ -6,14 +6,10 @@ import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.scenes.scene2d.Action;
import com.badlogic.gdx.scenes.scene2d.Event;
import com.badlogic.gdx.scenes.scene2d.EventListener;
import com.badlogic.gdx.scenes.scene2d.Group;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Touchable;
import com.badlogic.gdx.scenes.scene2d.actions.Actions;
import com.badlogic.gdx.scenes.scene2d.actions.CountdownEventAction;
import com.badlogic.gdx.scenes.scene2d.actions.EventAction;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.badlogic.gdx.scenes.scene2d.ui.Stack;
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
......@@ -29,7 +25,6 @@ import java.util.Set;
import cz.nic.tablexia.TablexiaSettings;
import cz.nic.tablexia.game.AbstractTablexiaGame;
import cz.nic.tablexia.game.games.night_watch.assets.NightWatchAssets;
import cz.nic.tablexia.game.games.night_watch.event.DaytimeTransitionFinished;
import cz.nic.tablexia.game.games.night_watch.helper.GameRulesHelper;
import cz.nic.tablexia.game.games.night_watch.helper.TextureHelper;
import cz.nic.tablexia.game.games.night_watch.solution.GameSolutionGenerator;
......@@ -351,7 +346,9 @@ public class NightWatchScreen extends AbstractTablexiaGame<GameRule> {
Pixmap pixmap = clickmap.getTextureData().consumePixmap();
int clickX = (int) (x / SCREEN_WIDTH * clickmap.getWidth());
int clickY = clickmap.getHeight() - (int) (y / SCREEN_MIN_HEIGHT * clickmap.getHeight());
return new Color(pixmap.getPixel(clickX, clickY));
Color c = new Color(pixmap.getPixel(clickX, clickY));
pixmap.dispose();
return c;
}
@Override
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment