Esempio n. 1
0
static void lakka_frame(void)
{
   menu_item_t *active_item = NULL;
   menu_category_t *active_category = NULL;
   lakka_handle_t *lakka = NULL;
   gl_t *gl = (gl_t*)driver_video_resolve(NULL);

   if (!gl)
      return;

   if (!driver.menu)
      return;

   lakka = (lakka_handle_t*)driver.menu->userdata;

   if (!lakka)
      return;

   active_category = (menu_category_t*)
      &lakka->categories[lakka->menu_active_category];

   if (!active_category)
      return;

   active_item = (menu_item_t*)
      &active_category->items[active_category->active_item];

   update_tweens(0.002);

#if defined(HAVE_FBO) && defined(LAKKA_EFFECTS)
   glBindFramebuffer(GL_FRAMEBUFFER, fbo);
   glClearColor(0.0, 0.0, 0.0, 0.0);
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
   lakka_draw_categories(lakka);
   lakka_draw_arrow(lakka);
   glBindFramebuffer(GL_FRAMEBUFFER, 0);
   glViewport(0, 0, gl->win_width, gl->win_height);
   lakka_draw_background();
   lakka_draw_fbo();
#else
   glViewport(0, 0, gl->win_width, gl->win_height);
   lakka_draw_background();
   lakka_draw_categories(lakka);
   lakka_draw_arrow(lakka);
#endif

   if (lakka->depth == 0)
      lakka_draw_text(lakka, active_category->name,
            lakka->title_margin_left, lakka->title_margin_top, 1, 1.0);
   else if (active_item)
      lakka_draw_text(lakka, active_item->name,
            lakka->title_margin_left, lakka->title_margin_top, 1, 1.0);

   gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);

   glDisable(GL_BLEND);
}
Esempio n. 2
0
static void lakka_frame(void)
{
   struct font_output_list *msg;
   gl_t *gl = (gl_t*)driver.video_data;
   menu_category_t *active_category = (menu_category_t*)&categories[menu_active_category];
   menu_item_t *active_item;

   if (!driver.menu || !gl || !active_category)
      return;

   active_item = (menu_item_t*)&active_category->items[active_category->active_item];

   update_tweens(0.002);

   glViewport(0, 0, gl->win_width, gl->win_height);

   lakka_draw_background();

   lakka_draw_categories();

   if (depth == 0 && active_category)
      lakka_draw_text(active_category->name, title_margin_left, title_margin_top, 1, 1.0);
   else if (active_item)
      lakka_draw_text(active_item->name, title_margin_left, title_margin_top, 1, 1.0);

   lakka_draw_icon(textures[TEXTURE_ARROW].id,
        margin_left + hspacing*(menu_active_category+1) + all_categories_x + icon_size/2.0,
        margin_top + vspacing*active_item_factor + icon_size/2.0, arrow_alpha, 0, i_active_zoom);

   gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);
}
Esempio n. 3
0
static void lakka_frame(void)
{
   struct font_output_list *msg;
   gl_t *gl = (gl_t*)driver.video_data;
   menu_category_t *active_category = (menu_category_t*)&categories[menu_active_category];
   menu_item_t *active_item;

   if (!driver.menu || !gl || !active_category)
      return;

   active_item = (menu_item_t*)&active_category->items[active_category->active_item];

   update_tweens(0.002);

   glViewport(0, 0, gl->win_width, gl->win_height);

   lakka_draw_background();

   lakka_draw_categories();

   if (depth == 0)
   {
      if (active_category)
         lakka_draw_text(&active_category->out, 15.0, 40.0, 1, 1.0);
   }
   else
   {
      if (active_item)
         lakka_draw_text(&active_item->out, 15.0, 40.0, 1, 1.0);

      lakka_draw_icon(textures[TEXTURE_ARROW].id,
            156 + HSPACING*(menu_active_category+1) + all_categories_x + 150 +-dim/2.0,
            300 + VSPACING*2.4 + (dim/2.0), 1, 0, I_ACTIVE_ZOOM);
   }

   gl_set_viewport(gl, gl->win_width, gl->win_height, false, false);
}