Revision: 2411
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2411&view=rev
Author:   rorthomas
Date:     2012-01-31 15:30:22 +0000 (Tue, 31 Jan 2012)
Log Message:
-----------
renamed class
fixed menu init
moved texture too in menu

Modified Paths:
--------------
    trunk/source/main/audio/SoundScriptManager.h
    trunk/source/main/gameplay/RoRFrameListener.cpp
    trunk/source/main/gui/Console.h
    trunk/source/main/gui/HighScoreWindow.h
    trunk/source/main/gui/LoadingWindow.h
    trunk/source/main/gui/LobbyGUI.h
    trunk/source/main/gui/MapControl.cpp
    trunk/source/main/gui/SelectorWindow.h
    trunk/source/main/gui/TextureToolWindow.h
    trunk/source/main/gui/gui_menu.cpp
    trunk/source/main/physics/BeamFactory.cpp

Modified: trunk/source/main/audio/SoundScriptManager.h
===================================================================
--- trunk/source/main/audio/SoundScriptManager.h        2012-01-31 15:16:57 UTC 
(rev 2410)
+++ trunk/source/main/audio/SoundScriptManager.h        2012-01-31 15:30:22 UTC 
(rev 2411)
@@ -194,7 +194,7 @@
        float pitchgain_cutoff(float sourcepitch, float targetpitch);
 };
 
-class SoundScriptManager : public ScriptLoader , public 
Singleton2<SoundScriptManager>
+class SoundScriptManager : public ScriptLoader , public 
RoRSingleton<SoundScriptManager>
 {
 public:
        const static int TERRAINSOUND = MAX_TRUCKS+1;

Modified: trunk/source/main/gameplay/RoRFrameListener.cpp
===================================================================
--- trunk/source/main/gameplay/RoRFrameListener.cpp     2012-01-31 15:16:57 UTC 
(rev 2410)
+++ trunk/source/main/gameplay/RoRFrameListener.cpp     2012-01-31 15:30:22 UTC 
(rev 2411)
@@ -901,7 +901,7 @@
        if(!isEmbedded)
        {
                new GUI_MainMenu(this);
-               new GUI_Friction();
+               GUI_Friction::getSingleton();
        }
 
        if(!BSETTING("REPO_MODE"))

Modified: trunk/source/main/gui/Console.h
===================================================================
--- trunk/source/main/gui/Console.h     2012-01-31 15:16:57 UTC (rev 2410)
+++ trunk/source/main/gui/Console.h     2012-01-31 15:30:22 UTC (rev 2411)
@@ -44,11 +44,11 @@
 } msg_t;
 
 class Console :
-       public Singleton2<Console>,
+       public RoRSingleton<Console>,
        public Ogre::LogListener,
        public InterThreadStoreVector<msg_t>
 {
-       friend class Singleton2<Console>;
+       friend class RoRSingleton<Console>;
        Console();
        ~Console();
 public:

Modified: trunk/source/main/gui/HighScoreWindow.h
===================================================================
--- trunk/source/main/gui/HighScoreWindow.h     2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/gui/HighScoreWindow.h     2012-01-31 15:30:22 UTC (rev 
2411)
@@ -33,9 +33,9 @@
 
 class HighScoreWindow :
        public wraps::BaseLayout,
-       public Singleton2<HighScoreWindow>
+       public RoRSingleton<HighScoreWindow>
 {
-       friend class Singleton2<HighScoreWindow>;
+       friend class RoRSingleton<HighScoreWindow>;
        HighScoreWindow();
        ~HighScoreWindow();
 public:

Modified: trunk/source/main/gui/LoadingWindow.h
===================================================================
--- trunk/source/main/gui/LoadingWindow.h       2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/gui/LoadingWindow.h       2012-01-31 15:30:22 UTC (rev 
2411)
@@ -30,9 +30,9 @@
 ATTRIBUTE_CLASS_LAYOUT(LoadingWindow, "LoadingWindow.layout");
 class LoadingWindow :
        public wraps::BaseLayout,
-       public Singleton2<LoadingWindow>
+       public RoRSingleton<LoadingWindow>
 {
-       friend class Singleton2<LoadingWindow>;
+       friend class RoRSingleton<LoadingWindow>;
        LoadingWindow();
        ~LoadingWindow();
 public:

Modified: trunk/source/main/gui/LobbyGUI.h
===================================================================
--- trunk/source/main/gui/LobbyGUI.h    2012-01-31 15:16:57 UTC (rev 2410)
+++ trunk/source/main/gui/LobbyGUI.h    2012-01-31 15:30:22 UTC (rev 2411)
@@ -29,10 +29,10 @@
 ATTRIBUTE_CLASS_LAYOUT(LobbyGUI, "Lobby.layout");
 class LobbyGUI :
        public wraps::BaseLayout,
-       public Singleton2<LobbyGUI>,
+       public RoRSingleton<LobbyGUI>,
        public IRCWrapper
 {
-       friend class Singleton2<LobbyGUI>;
+       friend class RoRSingleton<LobbyGUI>;
        LobbyGUI();
        ~LobbyGUI();
 public:

Modified: trunk/source/main/gui/MapControl.cpp
===================================================================
--- trunk/source/main/gui/MapControl.cpp        2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/gui/MapControl.cpp        2012-01-31 15:30:22 UTC (rev 
2411)
@@ -114,7 +114,7 @@
 
 void MapControl::setVisibility(bool value)
 {
-       if(!value) GUIManager::getSingleton().unfocus();
+       //if(!value) GUIManager::getSingleton().unfocus();
        mMainWidget->setVisible(value);
 }
 

Modified: trunk/source/main/gui/SelectorWindow.h
===================================================================
--- trunk/source/main/gui/SelectorWindow.h      2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/gui/SelectorWindow.h      2012-01-31 15:30:22 UTC (rev 
2411)
@@ -33,9 +33,9 @@
 
 class SelectorWindow :
        public wraps::BaseLayout,
-       public Singleton2<SelectorWindow>
+       public RoRSingleton<SelectorWindow>
 {
-       friend class Singleton2<SelectorWindow>;
+       friend class RoRSingleton<SelectorWindow>;
        SelectorWindow();
        ~SelectorWindow();
 public:

Modified: trunk/source/main/gui/TextureToolWindow.h
===================================================================
--- trunk/source/main/gui/TextureToolWindow.h   2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/gui/TextureToolWindow.h   2012-01-31 15:30:22 UTC (rev 
2411)
@@ -33,9 +33,9 @@
 
 class TextureToolWindow :
        public wraps::BaseLayout,
-       public Singleton2<TextureToolWindow>
+       public RoRSingleton<TextureToolWindow>
 {
-       friend class Singleton2<TextureToolWindow>;
+       friend class RoRSingleton<TextureToolWindow>;
        TextureToolWindow();
        ~TextureToolWindow();
 public:

Modified: trunk/source/main/gui/gui_menu.cpp
===================================================================
--- trunk/source/main/gui/gui_menu.cpp  2012-01-31 15:16:57 UTC (rev 2410)
+++ trunk/source/main/gui/gui_menu.cpp  2012-01-31 15:30:22 UTC (rev 2411)
@@ -40,6 +40,7 @@
 
 GUI_MainMenu::GUI_MainMenu(RoRFrameListener *efl) : mefl(efl), menuWidth(800), 
menuHeight(20), vehicleListNeedsUpdate(false)
 {
+       setSingleton(this);
        pthread_mutex_init(&updateLock, NULL);
 
        //MyGUI::WidgetPtr back = createWidget<MyGUI::Widget>("Panel", 0, 0, 
912, 652,MyGUI::Align::Default, "Back");
@@ -118,6 +119,7 @@
        //p->addItem(_L("Camera Control"), MyGUI::MenuItemType::Normal, 
"cameratool");
        p->addItem(_L("Friction Settings"), MyGUI::MenuItemType::Normal, 
"frictiongui");
        p->addItem(_L("Show Console"), MyGUI::MenuItemType::Normal, 
"showConsole");
+       p->addItem(_L("Texture Tool"), MyGUI::MenuItemType::Normal, 
"texturetool");
        pop.push_back(p);
 
        // === debug
@@ -137,8 +139,6 @@
        p->addItem(_L("show Beam strength"), MyGUI::MenuItemType::Normal, 
"debug-beam-strength");
        p->addItem(_L("show Beam hydros"), MyGUI::MenuItemType::Normal, 
"debug-beam-hydros");
        p->addItem(_L("show Beam commands"), MyGUI::MenuItemType::Normal, 
"debug-beam-commands");
-       p->addItem("-", MyGUI::MenuItemType::Separator);
-       p->addItem(_L("Texture Tool"), MyGUI::MenuItemType::Normal, 
"texturetool");
        pop.push_back(p);
 
        

Modified: trunk/source/main/physics/BeamFactory.cpp
===================================================================
--- trunk/source/main/physics/BeamFactory.cpp   2012-01-31 15:16:57 UTC (rev 
2410)
+++ trunk/source/main/physics/BeamFactory.cpp   2012-01-31 15:30:22 UTC (rev 
2411)
@@ -40,7 +40,7 @@
 using namespace Ogre;
 
 
-template<> BeamFactory *StreamableFactory < BeamFactory, Beam 
>::SINGLETON_MEMBER = 0;
+template<> BeamFactory *StreamableFactory < BeamFactory, Beam >::_instance = 0;
 
 BeamFactory::BeamFactory(SceneManager *manager, SceneNode *parent, 
RenderWindow* win, Network *net, float *mapsizex, float *mapsizez, Collisions 
*icollisions, HeightFinder *mfinder, Water *_w, Camera *pcam) : 
          manager(manager)

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


------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to