Revision: 1749
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=1749&view=rev
Author:   rorthomas
Date:     2011-03-11 11:18:05 +0000 (Fri, 11 Mar 2011)

Log Message:
-----------
improved selectorwindow a bit

Modified Paths:
--------------
    trunk/source/main/gui/SelectorWindow.cpp
    trunk/source/main/gui/gui_manager.cpp

Modified: trunk/source/main/gui/SelectorWindow.cpp
===================================================================
--- trunk/source/main/gui/SelectorWindow.cpp    2011-03-11 11:17:45 UTC (rev 
1748)
+++ trunk/source/main/gui/SelectorWindow.cpp    2011-03-11 11:18:05 UTC (rev 
1749)
@@ -585,7 +585,10 @@
 void SelectorWindow::setPreviewImage(Ogre::String texture)
 {
        if(texture == "" || texture == "none")
-               texture = _L("unknown.dds");
+       {
+               mPreviewStaticImage->setVisible(false);
+               return;
+       }
 
        String group="";
        try
@@ -595,9 +598,14 @@
        {
        }
        if(group == "")
-               texture = ("unknown.dds"); // without _L() !
+       {
+               // texture not found, hide widget
+               mPreviewStaticImage->setVisible(false);
+               return;
+       }
 
        mPreviewStaticImage->setImageTexture(texture);
+       mPreviewStaticImage->setVisible(true);
 }
 
 bool SelectorWindow::isFinishedSelecting()

Modified: trunk/source/main/gui/gui_manager.cpp
===================================================================
--- trunk/source/main/gui/gui_manager.cpp       2011-03-11 11:17:45 UTC (rev 
1748)
+++ trunk/source/main/gui/gui_manager.cpp       2011-03-11 11:18:05 UTC (rev 
1749)
@@ -84,6 +84,8 @@
        mPlatform->initialise(mWindow, mSceneManager, 
Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME, gui_logfilename); 
// use cache resource group so preview images are working
        mGUI = new MyGUI::Gui();
        mGUI->initialise(mResourceFileName);
+       
//MyGUI::PluginManager::getInstance().loadPlugin("Plugin_BerkeliumWidget.dll");
+
 }
 
 void GUIManager::destroyGui()


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to