From 217305584179c0149b5e0242b7de2e82c320e9e9 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 25 Oct 2009 00:19:03 +0000 Subject: [PATCH] fix problem with splash images not showing up initially --- direct/src/plugin/p3dInstance.cxx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/direct/src/plugin/p3dInstance.cxx b/direct/src/plugin/p3dInstance.cxx index ff9f607629..3e3e66e903 100644 --- a/direct/src/plugin/p3dInstance.cxx +++ b/direct/src/plugin/p3dInstance.cxx @@ -1847,7 +1847,18 @@ make_splash_window() { } } + if (_current_background_image != IT_none) { + _splash_window->set_image_filename(_image_files[_current_background_image]._filename, P3DSplashWindow::IP_background); + } + + // Update the splash window. + if (_splash_window != NULL) { + } + if (_current_button_image != IT_none) { + _splash_window->set_image_filename(_image_files[_current_button_image]._filename, P3DSplashWindow::IP_button_ready); + _splash_window->set_image_filename(_image_files[_current_button_image + 1]._filename, P3DSplashWindow::IP_button_rollover); + _splash_window->set_image_filename(_image_files[_current_button_image + 2]._filename, P3DSplashWindow::IP_button_click); _splash_window->set_button_active(true); } } @@ -1863,7 +1874,8 @@ make_splash_window() { void P3DInstance:: set_background_image(ImageType image_type) { if (image_type != _current_background_image) { - nout << "setting background to " << _image_type_names[image_type] << "\n"; + nout << "setting background to " << _image_type_names[image_type] + << ", splash_window = " << _splash_window << "\n"; // Remove the previous image. _image_files[_current_background_image]._image_placement = P3DSplashWindow::IP_none;