Start preparing menu_widgets.c to become independent of menu code

This commit is contained in:
twinaphex 2020-02-16 14:17:33 +01:00
parent fc9edda0ef
commit e6d64f72ec
4 changed files with 19 additions and 17 deletions

View File

@ -23,7 +23,7 @@
#include "../../config.h"
#endif
#include "../menu_driver.h"
#include "../gfx_display.h"
#include "../../retroarch.h"
#include "../../gfx/common/d3d_common.h"

View File

@ -34,6 +34,22 @@
RETRO_BEGIN_DECLS
#define COLOR_TEXT_ALPHA(color, alpha) (color & 0xFFFFFF00) | alpha
#define HEX_R(hex) ((hex >> 16) & 0xFF) * (1.0f / 255.0f)
#define HEX_G(hex) ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f)
#define HEX_B(hex) ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f)
#define COLOR_HEX_TO_FLOAT(hex, alpha) { \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha \
}
extern float osk_dark[16];
typedef struct menu_display_ctx_driver
{
/* Draw graphics to the screen. */

View File

@ -54,21 +54,6 @@ RETRO_BEGIN_DECLS
#define MENU_SETTINGS_CHEEVOS_START 0x40000
#define MENU_SETTINGS_NETPLAY_ROOMS_START 0x80000
#define COLOR_TEXT_ALPHA(color, alpha) (color & 0xFFFFFF00) | alpha
#define HEX_R(hex) ((hex >> 16) & 0xFF) * (1.0f / 255.0f)
#define HEX_G(hex) ((hex >> 8 ) & 0xFF) * (1.0f / 255.0f)
#define HEX_B(hex) ((hex >> 0 ) & 0xFF) * (1.0f / 255.0f)
#define COLOR_HEX_TO_FLOAT(hex, alpha) { \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha, \
HEX_R(hex), HEX_G(hex), HEX_B(hex), alpha \
}
extern float osk_dark[16];
enum menu_settings_type
{
MENU_SETTINGS_NONE = FILE_TYPE_LAST + 1,

View File

@ -38,8 +38,9 @@
#include "../../tasks/task_content.h"
#include "../../ui/ui_companion_driver.h"
#include "../menu_driver.h"
#include "../gfx_animation.h"
#include "../gfx_display.h"
#include "../menu_driver.h"
#include "../../gfx/font_driver.h"