<commit_before>package de.dakror.arise.layer;

import java.awt.Graphics2D;

import de.dakror.arise.game.Game;
import de.dakror.gamesetup.layer.Layer;
import de.dakror.gamesetup.ui.ClickEvent;
import de.dakror.gamesetup.ui.button.TextButton;
import de.dakror.gamesetup.util.Helper;

/**
 * @author Dakror
 */
public class PauseLayer extends Layer
{
	public PauseLayer()
	{
		modal = true;
	}
	
	@Override
	public void draw(Graphics2D g)
	{
		drawModality(g);
		Helper.drawContainer((Game.getWidth() - TextButton.WIDTH - 40) / 2, (Game.getHeight() - TextButton.HEIGHT * 3 - 40) / 2, TextButton.WIDTH + 40, TextButton.HEIGHT * 3 + 40, true, false, g);
		
		drawComponents(g);
	}
	
	@Override
	public void update(int tick)
	{}
	
	@Override
	public void init()
	{
		TextButton back = new TextButton((Game.getWidth() - TextButton.WIDTH - 40) / 2 + 20, (Game.getHeight() - TextButton.HEIGHT * 3 - 40) / 2 + 20, "Weiter");
		back.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.currentGame.removeLayer(PauseLayer.this);
			}
		});
		components.add(back);
		TextButton logout = new TextButton(back.getX(), back.getY() + TextButton.HEIGHT, "Abmelden");
		logout.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.userID = 0;
				Game.world = null;
				Game.worldID = 1;
				
				for (Layer l : Game.currentGame.layers)
					if (l instanceof CityLayer) ((CityLayer) l).saveData();
				
				Game.currentGame.setLayer(new LoginLayer());
			}
		});
		if (Game.userID != 0) components.add(logout);
		
		TextButton exit = new TextButton(back.getX(), back.getY() + TextButton.HEIGHT * 2, "Beenden");
		exit.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.applet.stop();
			}
		});
		components.add(exit);
	}
}
<commit_msg>crashfix<commit_after>package de.dakror.arise.layer;

import java.awt.Graphics2D;

import de.dakror.arise.game.Game;
import de.dakror.gamesetup.layer.Layer;
import de.dakror.gamesetup.ui.ClickEvent;
import de.dakror.gamesetup.ui.button.TextButton;
import de.dakror.gamesetup.util.Helper;

/**
 * @author Dakror
 */
public class PauseLayer extends Layer
{
	public PauseLayer()
	{
		modal = true;
	}
	
	@Override
	public void draw(Graphics2D g)
	{
		drawModality(g);
		Helper.drawContainer((Game.getWidth() - TextButton.WIDTH - 40) / 2, (Game.getHeight() - TextButton.HEIGHT * 3 - 40) / 2, TextButton.WIDTH + 40, TextButton.HEIGHT * 3 + 40, true, false, g);
		
		drawComponents(g);
	}
	
	@Override
	public void update(int tick)
	{}
	
	@Override
	public void init()
	{
		TextButton back = new TextButton((Game.getWidth() - TextButton.WIDTH - 40) / 2 + 20, (Game.getHeight() - TextButton.HEIGHT * 3 - 40) / 2 + 20, "Weiter");
		back.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.currentGame.removeLayer(PauseLayer.this);
			}
		});
		components.add(back);
		TextButton logout = new TextButton(back.getX(), back.getY() + TextButton.HEIGHT, "Abmelden");
		logout.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.userID = 0;
				Game.currentGame.removeLayer(Game.world);
				Game.world = null;
				Game.worldID = 1;
				
				for (Layer l : Game.currentGame.layers)
					if (l instanceof CityLayer) ((CityLayer) l).saveData();
				
				Game.currentGame.setLayer(new LoginLayer());
			}
		});
		if (Game.userID != 0) components.add(logout);
		
		TextButton exit = new TextButton(back.getX(), back.getY() + TextButton.HEIGHT * 2, "Beenden");
		exit.addClickEvent(new ClickEvent()
		{
			@Override
			public void trigger()
			{
				Game.applet.stop();
			}
		});
		components.add(exit);
	}
}

{'fraction_non_alphanumeric': 0.14623539005164446, 'fraction_numerical': 0.015765153574340853, 'mean_word_length': 3.417767106842737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '524823', 'n_tokens_mistral': 1556, 'n_tokens_neox': 1312, 'n_words': 265}