Exemplo n.º 1
0
  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);
  }
Exemplo n.º 2
0
  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 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);
  }