<commit_before>package fi.henu.gdxextras.gui;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Align;

// TODO: Make toggling on/off available!
public class Button extends Widget
{
	// This is used to set default background and selected graphics for Button
	public static void setDefaultStyle(ButtonStyle style)
	{
		default_style = style;
	}

	public Button()
	{
		super();
		// Reset state
		enabled = true;
	}

	public void setStyle(ButtonStyle style)
	{
		this.style = style;
		label_layout = null;
	}

	public void setLabel(String label)
	{
		this.label = label;
		label_layout = null;
		markToNeedReposition();
	}

	public void setIcon(AtlasRegion icon)
	{
		this.icon = icon;
	}

	// Hilight can be used to display constant selection of button.
	public void setHilight(boolean enabled)
	{
		hilight = enabled;
	}

	public void setEnabled(boolean enabled)
	{
		this.enabled = enabled;
		label_layout = null;
	}

	public boolean isEnabled()
	{
		return enabled;
	}

	@Override
	public boolean pointerDown(int pointer_id, Vector2 pos)
	{
		if (pointer_id == 0) {
			clearKeyboardListener();
			pressed = true;
			label_layout = null;
			return true;
		}
		return false;
	}
<commit_msg>Button.isHilight()<commit_after>package fi.henu.gdxextras.gui;

import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.graphics.g2d.TextureAtlas.AtlasRegion;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.utils.Align;

// TODO: Make toggling on/off available!
public class Button extends Widget
{
	// This is used to set default background and selected graphics for Button
	public static void setDefaultStyle(ButtonStyle style)
	{
		default_style = style;
	}

	public Button()
	{
		super();
		// Reset state
		enabled = true;
	}

	public void setStyle(ButtonStyle style)
	{
		this.style = style;
		label_layout = null;
	}

	public void setLabel(String label)
	{
		this.label = label;
		label_layout = null;
		markToNeedReposition();
	}

	public void setIcon(AtlasRegion icon)
	{
		this.icon = icon;
	}

	// Hilight can be used to display constant selection of button.
	public void setHilight(boolean enabled)
	{
		hilight = enabled;
	}

	public void setEnabled(boolean enabled)
	{
		this.enabled = enabled;
		label_layout = null;
	}

	public boolean isHilight()
	{
		return hilight;
	}

	public boolean isEnabled()
	{
		return enabled;
	}

	@Override
	public boolean pointerDown(int pointer_id, Vector2 pos)
	{
		if (pointer_id == 0) {
			clearKeyboardListener();
			pressed = true;
			label_layout = null;
			return true;
		}
		return false;
	}

{'fraction_non_alphanumeric': 0.09961190168175937, 'fraction_numerical': 0.004527813712807244, 'mean_word_length': 3.9646869983948636, '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': '5062655', 'n_tokens_mistral': 1147, 'n_tokens_neox': 1059, 'n_words': 255}