98 lines
2.5 KiB
C
Raw Normal View History

2014-05-09 23:50:40 +02:00
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel De Matteis
* Copyright (C) 2014 - Jean-André Santoni
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MENU_DISP_LAKKA_H
#define _MENU_DISP_LAKKA_H
#include "../../../gfx/gl_common.h"
#include "../../../gfx/fonts/fonts.h"
2014-07-18 06:25:04 +02:00
#define THEME "flatui" // flatui or monochrome themes are available
#define DELAY 0.02
extern int depth;
extern int num_categories;
extern float all_categories_x;
extern int menu_active_category;
extern float global_alpha;
2014-08-01 15:11:23 +02:00
extern float HSPACING;
extern float VSPACING;
extern float C_ACTIVE_ZOOM;
extern float C_PASSIVE_ZOOM;
extern float I_ACTIVE_ZOOM;
extern float I_PASSIVE_ZOOM;
extern float ABOVE_SUBITEM_OFFSET;
extern float ABOVE_ITEM_OFFSET;
2014-08-01 15:11:23 +02:00
extern float ACTIVE_ITEM_FACTOR;
extern float UNDER_ITEM_OFFSET;
2014-05-08 01:12:51 +07:00
typedef struct
{
2014-05-12 15:36:01 +02:00
char name[256];
2014-05-08 01:12:51 +07:00
GLuint icon;
float alpha;
float zoom;
float y;
2014-05-27 02:02:39 +02:00
} menu_subitem_t;
2014-05-08 01:12:51 +07:00
typedef struct
{
2014-05-09 21:43:04 +02:00
char name[256];
char rom[256];
2014-05-08 01:12:51 +07:00
float alpha;
float zoom;
float y;
int active_subitem;
int num_subitems;
2014-05-27 02:02:39 +02:00
menu_subitem_t *subitems;
} menu_item_t;
2014-05-08 01:12:51 +07:00
typedef struct
{
2014-05-09 21:43:04 +02:00
char name[256];
char libretro[256];
2014-05-08 01:12:51 +07:00
GLuint icon;
GLuint item_icon;
2014-05-08 01:12:51 +07:00
float alpha;
float zoom;
int active_item;
int num_items;
2014-05-27 02:02:39 +02:00
menu_item_t *items;
} menu_category_t;
typedef float (*easingFunc)(float, float, float, float);
typedef void (*tweenCallback) (void);
typedef struct
{
int alive;
float duration;
float running_since;
float initial_value;
float target_value;
float* subject;
easingFunc easing;
tweenCallback callback;
} tween_t;
2014-05-27 02:02:39 +02:00
extern menu_category_t *categories;
void add_tween(float duration, float target_value, float* subject, easingFunc easing, tweenCallback callback);
float inOutQuad(float t, float b, float c, float d);
#endif /* MENU_DISP_LAKKA_H */