<commit_before>package com.haxepunk.debug;

import com.haxepunk.utils.Input;

import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import haxe.ds.IntMap;

import openfl.Assets;

class VisibleLabel extends Sprite
{

	public function new(textFormat:TextFormat)
	{
		super();

		active = new Bitmap(Assets.getBitmapData("gfx/debug/console_visible.png"));
		inactive = new Bitmap(Assets.getBitmapData("gfx/debug/console_hidden.png"));

		label = new TextField();
		label.defaultTextFormat = textFormat;
		label.selectable = false;
		label.width = 150;
		label.height = 14;

		label.x = 24;
		label.y = 2;
#if flash
		label.embedFonts = true;
#end

		this.x = 6;
		this.display = true;

		addChild(active);
		addChild(label);

		addEventListener("click", onClick, true);
	}

	public var display(default, set):Bool;
	private function set_display(value:Bool):Bool
	{
		if (value != display)
		{
			display = value;
			if (value)<commit_msg>Fixing console bug on Flash - don't call set_display when console is initialized.<commit_after>package com.haxepunk.debug;

import com.haxepunk.utils.Input;

import flash.display.Bitmap;
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import haxe.ds.IntMap;

import openfl.Assets;

class VisibleLabel extends Sprite
{

	public function new(textFormat:TextFormat)
	{
		super();

		active = new Bitmap(Assets.getBitmapData("gfx/debug/console_visible.png"));
		inactive = new Bitmap(Assets.getBitmapData("gfx/debug/console_hidden.png"));

		label = new TextField();
		label.defaultTextFormat = textFormat;
		label.selectable = false;
		label.width = 150;
		label.height = 14;

		label.x = 24;
		label.y = 2;
#if flash
		label.embedFonts = true;
#end

		this.x = 6;

		addChild(active);
		addChild(label);

		addEventListener("click", onClick, true);
	}

	public var display(default, set):Bool = true;
	private function set_display(value:Bool):Bool
	{
		if (value != display)
		{
			display = value;
			if (value)
{'fraction_non_alphanumeric': 0.12019660411081323, 'fraction_numerical': 0.00804289544235925, 'mean_word_length': 4.555831265508685, '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': '5693358', 'n_tokens_mistral': 823, 'n_tokens_neox': 743, 'n_words': 167}