<commit_before>/* Generated by MyraPad at 14.12.2019 14:46:23 */
using Microsoft.Xna.Framework;
using Myra.Graphics2D.TextureAtlases;
using Myra.Graphics2D.UI;

namespace Myra.Samples.DebugConsole
{
	public partial class GamePanel
	{
		public GamePanel()
		{
			BuildUI();

			_buttonDebugPanel.Click += _buttonDebugPanel_Click;
			_buttonModalDebugPanel.Click += _buttonModalDebugPanel_Click;
		}

		private DebugPanel CreateDebugPanel()
		{
			var debugPanel = new DebugPanel
			{
				Opacity = 0.75f,
				Background = new ColoredRegion(DefaultAssets.WhiteRegion, Color.Blue)
			};

			_buttonDebugPanel.Enabled = false;
			_buttonModalDebugPanel.Enabled = false;

			debugPanel.Removed += (s, a) =>
			{
				_buttonDebugPanel.Enabled = true;
				_buttonModalDebugPanel.Enabled = true;
			};

			Desktop.Widgets.Add(debugPanel);

			return debugPanel;
		}

		private void _buttonDebugPanel_Click(object sender, System.EventArgs e)
		{
			CreateDebugPanel();

		}

		private void _buttonModalDebugPanel_Click(object sender, System.EventArgs e)
		{
			var debugPanel = CreateDebugPanel();
			debugPanel.IsModal = true;
		}
	}<commit_msg>Small code improvement<commit_after>/* Generated by MyraPad at 14.12.2019 14:46:23 */
using Microsoft.Xna.Framework;
using Myra.Graphics2D.TextureAtlases;
using Myra.Graphics2D.UI;

namespace Myra.Samples.DebugConsole
{
	public partial class GamePanel
	{
		public GamePanel()
		{
			BuildUI();

			_buttonDebugPanel.Click += _buttonDebugPanel_Click;
			_buttonModalDebugPanel.Click += _buttonModalDebugPanel_Click;
		}

		private void CreateDebugPanel(bool isModal)
		{
			var debugPanel = new DebugPanel
			{
				Opacity = 0.75f,
				Background = new ColoredRegion(DefaultAssets.WhiteRegion, Color.Blue),
				IsModal = isModal
			};

			_buttonDebugPanel.Enabled = false;
			_buttonModalDebugPanel.Enabled = false;

			debugPanel.Removed += (s, a) =>
			{
				_buttonDebugPanel.Enabled = true;
				_buttonModalDebugPanel.Enabled = true;
			};

			Desktop.Widgets.Add(debugPanel);
		}

		private void _buttonDebugPanel_Click(object sender, System.EventArgs e)
		{
			CreateDebugPanel(false);

		}

		private void _buttonModalDebugPanel_Click(object sender, System.EventArgs e)
		{
			CreateDebugPanel(true);
		}
	}
{'fraction_non_alphanumeric': 0.09462461128387384, 'fraction_numerical': 0.016881386050644157, 'mean_word_length': 4.015590200445434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2642628', 'n_tokens_mistral': 869, 'n_tokens_neox': 707, 'n_words': 141}