<commit_before>package com.draga.manager.screen;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;
import com.draga.BeepingClickListener;
import com.draga.manager.GameManager;
import com.draga.manager.SettingsManager;
import com.draga.manager.SkinManager;

public class DebugMenuScreen implements Screen
{
    private Stage stage;

    public DebugMenuScreen()
    {
        stage = new Stage();
        Gdx.input.setInputProcessor(stage);

        Table table = new Table();
        table.setFillParent(true);
        table.pad(((stage.getHeight() + stage.getWidth()) / 2f) / 50f);

        table.add(GetButtonScrollPane());

        stage.addActor(table);
        stage.setDebugAll(SettingsManager.getSettings().debugDraw);
    }

    public ScrollPane GetButtonScrollPane()
    {
        VerticalGroup verticalGroup = new VerticalGroup();

        verticalGroup.addActor(getDebugDrawTextButton());
        verticalGroup.addActor(getNoGravityTextButton());
        verticalGroup.addActor(getInfiniteFuelTextButton());

        ScrollPane scrollPane = new ScrollPane(verticalGroup);

        return scrollPane;
    }

    private TextButton getDebugDrawTextButton()
    {
        final TextButton debugDrawTextButton = new TextButton(
            "Debug draw",<commit_msg>debug menu spacing<commit_after>package com.draga.manager.screen;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.scenes.scene2d.InputEvent;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
import com.badlogic.gdx.scenes.scene2d.ui.VerticalGroup;
import com.draga.BeepingClickListener;
import com.draga.manager.GameManager;
import com.draga.manager.SettingsManager;
import com.draga.manager.SkinManager;

public class DebugMenuScreen implements Screen
{
    private Stage stage;

    public DebugMenuScreen()
    {
        stage = new Stage();
        Gdx.input.setInputProcessor(stage);

        Table table = new Table();
        table.setFillParent(true);
        table.pad(((stage.getHeight() + stage.getWidth()) / 2f) / 50f);

        table.row();
        table
            .add()
            .expand();

        table.row();
        table.add(GetButtonScrollPane());

        table.row();
        table
            .add()
            .expand();

        TextButton backTextButton = getBackTextButton();
        table.row();
        table
            .add(backTextButton)
            .bottom();

        stage.addActor(table);
        stage.setDebugAll(SettingsManager.getSettings().debugDraw);
    }

    private TextButton getBackTextButton()
    {
        TextButton backTextButton = new TextButton("Back", SkinManager.BasicSkin);
        backTextButton.addListener(new BeepingClickListener(){
            @Override
            public void clicked(InputEvent event, float x, float y)
            {
                super.clicked(event, x, y);
                GameManager.getGame().setScreen(new MenuScreen());
            }
        });

        return backTextButton;
    }

    public ScrollPane GetButtonScrollPane()
    {
        VerticalGroup verticalGroup = new VerticalGroup();

        verticalGroup.addActor(getDebugDrawTextButton());
        verticalGroup.addActor(getNoGravityTextButton());
        verticalGroup.addActor(getInfiniteFuelTextButton());

        ScrollPane scrollPane = new ScrollPane(verticalGroup);

        return scrollPane;
    }

    private TextButton getDebugDrawTextButton()
    {
        final TextButton debugDrawTextButton = new TextButton(
            "Debug draw",
{'fraction_non_alphanumeric': 0.10492610837438424, 'fraction_numerical': 0.004433497536945813, 'mean_word_length': 2.9735812133072406, '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': '3397528', 'n_tokens_mistral': 1231, 'n_tokens_neox': 1169, 'n_words': 203}