]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/splash.cxx
Just a gimmick: make background color configurable. Maybe some dark color
[flightgear.git] / src / Main / splash.cxx
index c0bc348c949208d9639a1702584e4177fbb2a24d..334cd63aae55604e0f9c73d2e32f152ff9c47461 100644 (file)
 #include <simgear/math/sg_random.h>
 #include <simgear/misc/sg_path.hxx>
 
+#include <GUI/new_gui.hxx>
+
 #include "globals.hxx"
 #include "fg_props.hxx"
 #include "splash.hxx"
 #include "fg_os.hxx"
+#include "renderer.hxx"
 
 static const int fontsize = 19;
 static const char fontname[] = "default.txf";
@@ -140,6 +143,7 @@ void fgSplashUpdate ( float alpha ) {
     if (!screen_width || !screen_height)
         return;
 
+    globals->get_renderer()->resize(screen_width, screen_height);
     int size = screen_width < (screen_height - 5 * fontsize)
             ? screen_width : screen_height - 5 * fontsize;
     if (size > 512)
@@ -164,7 +168,9 @@ void fgSplashUpdate ( float alpha ) {
     glDisable(GL_LIGHTING);
 
     // draw the background
-    glColor4f( 0.0, 0.0, 0.0, alpha );
+    FGColor c(0.0, 0.0, 0.0);
+    c.merge(fgGetNode("/sim/gui/colors/splash-screen"));
+    glColor4f(c.red(), c.green(), c.blue(), alpha );
     glBegin(GL_POLYGON);
     glVertex2f(0.0, 0.0);
     glVertex2f(screen_width, 0.0);
@@ -197,7 +203,10 @@ void fgSplashUpdate ( float alpha ) {
         float left, right, bot, top;
 
         info.begin();
-        glColor4f(1.0, 0.9, 0.0, alpha);
+        FGColor c(1.0, 0.9, 0.0);
+        c.merge(fgGetNode("/sim/gui/colors/splash-font"));
+        glColor4f(c.red(), c.green(), c.blue(), alpha);
+
         font.getBBox(progress_text, fontsize, 0, &left, &right, &bot, &top);
         info.start2f((screen_width - right) / 2.0, 10.0 - bot);
         info.puts(progress_text);