public void draw(RenderHelper renderer) {
    Texture texture;
    if (m_pressed && !m_is_disabled) {
      texture = m_texture_pressed;
    } else {
      texture = m_texture_unpressed;
    }

    float[] default_color = m_color;
    if (m_is_disabled) {
      float[] font_color = m_item_font.getColor();
      for (int i = 0; i < 4; ++i) m_tmp_color[i] = font_color[i];
      m_item_font.setColor(m_color_disabled);
      m_color = m_color_disabled;
    }

    renderer.pushModelMat();
    renderer.modelMatTranslate(m_position.x, m_position.y, 0.f);
    renderer.modelMatScale(m_size.x, m_size.y, 0.f);

    drawTexture(renderer, texture);

    // Render font
    m_item_font.draw(renderer);

    if (m_is_disabled) {
      m_color = default_color;
      m_item_font.setColor(m_tmp_color);
    }

    renderer.popModelMat();
  }
  public void draw(RenderHelper renderer) {
    renderer.pushModelMat();
    renderer.modelMatTranslate(m_position.x, m_position.y, 0.f);
    renderer.modelMatScale(m_size.x, m_size.y, 0.f);

    drawTexture(renderer, m_texture);

    m_item_font.draw(renderer);

    renderer.popModelMat();
  }
  public void draw(RenderHelper renderer) {
    renderer.pushModelMat();
    renderer.modelMatTranslate(m_position.x, m_position.y, 0.f);
    renderer.modelMatScale(m_size.x, m_size.y, 0.f);

    if (m_is_selected) drawTexture(renderer, m_selected_texture);
    else drawTexture(renderer, m_normal_texture);

    m_item_font.draw(renderer);

    renderer.popModelMat();
  }
  public MenuItemButton(
      Vector position,
      Vector size,
      Font2DSettings font_settings,
      String font_string,
      TextureManager tex_manager) {
    super(position, size);

    m_item_font = new Font2D(tex_manager, size, font_settings, (int) Math.round(size.y * 0.7));
    m_item_font.setString(font_string);

    m_texture_pressed = tex_manager.get(R.raw.texture_main_menu_pressed_button, false);
    m_texture_unpressed = tex_manager.get(R.raw.texture_main_menu_unpressed_button, false);

    m_position_data = new VertexBufferFloat(VertexBufferFloat.sprite_position_data, 3);
    RenderHelper.initColorArray(0xffffffff, m_color);

    // disabled button color
    RenderHelper.initColorArray(0xff888888, m_color_disabled);
  }
  public MenuItemString(
      Vector position,
      Vector size,
      Font2DSettings font_settings,
      String entry,
      TextureManager tex_manager) {

    super(position, size);
    m_item_font = new Font2D(tex_manager, m_size, font_settings, (int) (m_size.y * 0.5f));
    m_item_font.setString(entry);

    m_position_data = new VertexBufferFloat(VertexBufferFloat.sprite_position_data, 3);
    RenderHelper.initColorArray(0xffffffff, m_color);

    m_normal_texture = tex_manager.get(R.raw.texture_grey_unpressed_button);
    m_selected_texture = tex_manager.get(R.raw.texture_grey_pressed_button);
  }
  public MenuItemKeyboard(
      Vector position,
      Vector size,
      Font2D.Font2DSettings font_settings,
      TextureManager tex_manager,
      Context activity_context,
      String text) {

    super(position, size);

    m_item_font = new Font2D(tex_manager, size, font_settings, (int) Math.round(size.y * 0.5));
    m_dialog_text = text;
    m_tex_manager = tex_manager;
    m_activity_context = activity_context;
    m_texture = m_tex_manager.get(R.raw.texture_grey_unpressed_button);
    m_position_data = new VertexBufferFloat(VertexBufferFloat.sprite_position_data, 3);
    RenderHelper.initColorArray(0xffffffff, m_color);
  }