<commit_before>var Menu;

Menu = function(title, items, x, y, width, height) {
  'use strict';
  this.title = title;
  this.items = items;
  this.selectedItem = items[0];
  this.x = x;
  this.y = y;
  this.width = width;
  this.height = height;
};

Menu.prototype.render = function(context) {
  'use strict';
  var i, textMeasure, itemY;
  itemY = 50;
  // Background
  context.fillStyle = '#000000';
  context.fillRect(0, 0, this.width, this.height);

  // Draw title
  context.font = 'bold 80px Monaco, Courier New, monospace';
  context.fillStyle = '#FFFFFF';
  textMeasure = context.measureText(this.title);
  context.fillText(this.title, (this.width / 2) - (textMeasure.width / 2), 100);

  // Draw items
  for (i = 0; i < this.items.length; i++) {
    if (this.items[i] === this.selectedItem) {
      context.font = 'bold 80px Monaco, Courier New, monospace';
    context.fillStyle = '#FFCC33';
    } else {
      context.font = 'bold 60px Monaco, Courier New, monospace';
    context.fillStyle = '#FFFFFF';
    }
    textMeasure = context.measureText(this.items[i]);
    context.fillText(this.items[i], (this.width / 2) -
                     (textMeasure.width / 2), 200 + itemY);
    itemY += 100;
  }
};

Menu.prototype.update = function() {
};<commit_msg>Make font smaller and move up and down throughout the menu<commit_after>var Menu;

Menu = function(title, items, x, y, width, height) {
  'use strict';
  this.title = title;
  this.items = items;
  this.selectedItem = 0;
  this.x = x;
  this.y = y;
  this.width = width;
  this.height = height;
  this.textSize = 50;
};

Menu.prototype.render = function(context) {
  'use strict';
  var i, textMeasure, itemY;
  itemY = 50;
  // Background
  context.fillStyle = '#000000';
  context.fillRect(0, 0, this.width, this.height);

  // Draw title
  context.font = 'bold 65px Monaco, Courier New, monospace';
  context.fillStyle = '#FFFFFF';
  textMeasure = context.measureText(this.title);
  context.fillText(this.title, (this.width / 2) - (textMeasure.width / 2), 100);

  // Draw items
  for (i = 0; i < this.items.length; i++) {
    if (i === this.selectedItem) {
      context.font = 'bold 55px Monaco, Courier New, monospace';
    context.fillStyle = '#FFCC33';
    } else {
      context.font = 'bold 45px Monaco, Courier New, monospace';
    context.fillStyle = '#FFFFFF';
    }
    textMeasure = context.measureText(this.items[i]);
    context.fillText(this.items[i], (this.width / 2) -
                     (textMeasure.width / 2), 200 + itemY);
    itemY += 100;
  }
};

Menu.prototype.update = function(inputHandler) {
  if (inputHandler.pressed) {
    if (inputHandler.keysDown[inputHandler.KEY.UP] || inputHandler.keysDown[inputHandler.KEY.W]) {
      if (this.selectedItem > 0) {
        this.selectedItem -= 1;
      }
  } else if (inputHandler.keysDown[inputHandler.KEY.DOWN] || inputHandler.keysDown[inputHandler.KEY.S]) {
      if (this.selectedItem < this.items.length - 1) {
        this.selectedItem += 1;
      }
    } else if (inputHandler.keysDown[inputHandler.KEY.RTN]) {
      //TODO: Use display manager to switch to game
    }
  }
};
{'fraction_non_alphanumeric': 0.1518743992310157, 'fraction_numerical': 0.02306952899711631, 'mean_word_length': 3.0025641025641026, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 4, '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': '3055745', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1055, 'n_words': 251}