<commit_before>package com.pqbyte.coherence;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.Touchpad;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.utils.viewport.FillViewport;
import com.badlogic.gdx.utils.viewport.FitViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import javafx.scene.control.Tab;

public class Hud {

  private static final float VIEWPORT_WIDTH = 1100;

  private Stage stage;
  private Touchpad movementController;
  private Touchpad shooterController;

  /**
   * The overlay displayed over the game.
   *
   * @param batch The drawing batch.
   */
  public Hud(Batch batch) {
    float screenWidth = Gdx.graphics.getWidth();
    float screenHeight = Gdx.graphics.getHeight();

    Viewport viewport = new FitViewport(
        VIEWPORT_WIDTH,
        VIEWPORT_WIDTH * (screenHeight / screenWidth)
    );

    stage = new Stage(viewport, batch);
    movementController = makeController();
    shooterController = makeController();

    Table bottomTable = new Table();
    bottomTable.setFillParent(true);
    bottomTable.bottom().padBottom(10).padLeft(30).padRight(30);
    bottomTable.add(movementController);
    bottomTable.add().expandX();
    bottomTable.add(shooterController);
    bottomTable.setDebug(true);
    stage.addActor(bottomTable);
  }

  private Touchpad makeController() {
    Skin skin = new Skin();<commit_msg>Show touchpad table only when debug mode is on<commit_after>package com.pqbyte.coherence;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Batch;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Skin;
import com.badlogic.gdx.scenes.scene2d.ui.Table;
import com.badlogic.gdx.scenes.scene2d.ui.Touchpad;
import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
import com.badlogic.gdx.utils.viewport.FillViewport;
import com.badlogic.gdx.utils.viewport.FitViewport;
import com.badlogic.gdx.utils.viewport.Viewport;
import javafx.scene.control.Tab;

public class Hud {

  private static final float VIEWPORT_WIDTH = 1100;

  private Stage stage;
  private Touchpad movementController;
  private Touchpad shooterController;

  /**
   * The overlay displayed over the game.
   *
   * @param batch The drawing batch.
   */
  public Hud(Batch batch) {
    float screenWidth = Gdx.graphics.getWidth();
    float screenHeight = Gdx.graphics.getHeight();

    Viewport viewport = new FitViewport(
        VIEWPORT_WIDTH,
        VIEWPORT_WIDTH * (screenHeight / screenWidth)
    );

    stage = new Stage(viewport, batch);
    movementController = makeController();
    shooterController = makeController();

    Table bottomTable = new Table();
    bottomTable.setFillParent(true);
    bottomTable.bottom().padBottom(10).padLeft(30).padRight(30);
    bottomTable.add(movementController);
    bottomTable.add().expandX();
    bottomTable.add(shooterController);
    bottomTable.setDebug(Constants.isDebug());
    stage.addActor(bottomTable);
  }

  private Touchpad makeController() {
    Skin skin = new Skin();
{'fraction_non_alphanumeric': 0.11014925373134328, 'fraction_numerical': 0.00955223880597015, 'mean_word_length': 4.219626168224299, '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': '7471745', 'n_tokens_mistral': 1129, 'n_tokens_neox': 1066, 'n_words': 203}