From 5cb9caa966da9f3f341ede6dba0cb967e649e404 Mon Sep 17 00:00:00 2001 From: Raimon Zamora Date: Thu, 12 Oct 2023 17:07:34 +0200 Subject: [PATCH] - [NEW] draw::isfading() - Ocultem el cursor del SO --- source/jdraw.cpp | 6 ++++++ source/jdraw.h | 1 + 2 files changed, 7 insertions(+) diff --git a/source/jdraw.cpp b/source/jdraw.cpp index 4b90493..6b1da68 100644 --- a/source/jdraw.cpp +++ b/source/jdraw.cpp @@ -58,6 +58,7 @@ namespace draw sel_color = transparent = 0; for (int i=0;i<256;++i) color_indices[i] = i; + SDL_ShowCursor(SDL_DISABLE); //textsurf = loadSurface("font.gif"); } @@ -416,6 +417,11 @@ namespace draw for (int i=0; i<256; ++i) if (decPalEntry(i, 8)) fading_out = true; } + bool isfading() + { + return fading_in || fading_out; + } + // Refresca la pantalla void render() { diff --git a/source/jdraw.h b/source/jdraw.h index a5f560a..dd32167 100644 --- a/source/jdraw.h +++ b/source/jdraw.h @@ -102,6 +102,7 @@ namespace draw void fadein(); void fadeout(); + bool isfading(); //void print(const char* text, const int x, const int y, const uint8_t color, const uint8_t borde);