From 8224a6a38156ccba7c69b66fab3388463fc727b1 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 5 Nov 2020 17:05:16 +0200 Subject: Button icons --- src/render/Font.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'src/render/Font.h') diff --git a/src/render/Font.h b/src/render/Font.h index 51035601..be1eabed 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -63,6 +63,31 @@ enum #define FONT_LOCALE(style) (style) #endif +#ifdef BUTTON_ICONS +enum +{ + BUTTON_NONE = -1, +#if 0 // unused + BUTTON_UP, + BUTTON_DOWN, + BUTTON_LEFT, + BUTTON_RIGHT, +#endif + BUTTON_CROSS, + BUTTON_CIRCLE, + BUTTON_SQUARE, + BUTTON_TRIANGLE, + BUTTON_L1, + BUTTON_L2, + BUTTON_L3, + BUTTON_R1, + BUTTON_R2, + BUTTON_R3, + MAX_BUTTON_ICONS +}; +#endif // BUTTON_ICONS + + class CFont { #ifdef MORE_LANGUAGES @@ -77,6 +102,14 @@ public: static CSprite2d Sprite[MAX_FONTS]; static CFontDetails Details; +#ifdef BUTTON_ICONS + static CSprite2d ButtonSprite[MAX_BUTTON_ICONS]; + static int PS2Symbol; + + static void DrawButton(float x, float y); +#endif // BUTTON_ICONS + + static void Initialise(void); static void Shutdown(void); static void InitPerFrame(void); -- cgit v1.2.3 From 7f4498e0f09a51bce527760c8f3ec1b94dde1e77 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Sat, 7 Nov 2020 20:54:38 +0200 Subject: Check if buttons txd exsist --- src/render/Font.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/render/Font.h') diff --git a/src/render/Font.h b/src/render/Font.h index be1eabed..bf747859 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -103,6 +103,7 @@ public: static CFontDetails Details; #ifdef BUTTON_ICONS + static int32 ButtonsSlot; static CSprite2d ButtonSprite[MAX_BUTTON_ICONS]; static int PS2Symbol; -- cgit v1.2.3 From 808f7c46f1df9acaf8d00ebde7cb1925e1d27f94 Mon Sep 17 00:00:00 2001 From: erorcun Date: Thu, 19 Nov 2020 02:09:04 +0300 Subject: Infamous XBOX subtitle outline --- src/render/Font.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/render/Font.h') diff --git a/src/render/Font.h b/src/render/Font.h index bf747859..7b67e310 100644 --- a/src/render/Font.h +++ b/src/render/Font.h @@ -116,6 +116,10 @@ public: static void InitPerFrame(void); static void PrintChar(float x, float y, wchar c); static void PrintString(float x, float y, wchar *s); +#ifdef XBOX_SUBTITLES + static void PrintStringFromBottom(float x, float y, wchar *str); + static void PrintOutlinedString(float x, float y, wchar *str, float outlineStrength, bool fromBottom, CRGBA outlineColor); +#endif static int GetNumberLines(float xstart, float ystart, wchar *s); static void GetTextRect(CRect *rect, float xstart, float ystart, wchar *s); #ifdef MORE_LANGUAGES -- cgit v1.2.3