From 1969e16d4d6a9f7a74a24be9418fc30e239f0b49 Mon Sep 17 00:00:00 2001
From: Sam Lantinga <[EMAIL REDACTED]>
Date: Sun, 23 Oct 2011 01:34:01 -0400
Subject: [PATCH] Added explicit control over the fade direction
---
screenlib/SDL_FrameBuf.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/screenlib/SDL_FrameBuf.h b/screenlib/SDL_FrameBuf.h
index 4b2667d4..864a63e6 100644
--- a/screenlib/SDL_FrameBuf.h
+++ b/screenlib/SDL_FrameBuf.h
@@ -86,6 +86,16 @@ class FrameBuf : public UIArea {
void Update() {
SDL_RenderPresent(renderer);
}
+ void FadeOut(void) {
+ if (!faded) {
+ Fade();
+ }
+ }
+ void FadeIn(void) {
+ if (faded) {
+ Fade();
+ }
+ }
void Fade(void); /* Fade screen out, then in */
/* Drawing routines */