Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 11, 2011, 12:21:32 PM (14 years ago)
Author:
dafrick
Message:

Removing editMode stuff, since that doesn't work anymore and that won't change for quite some time.
Seperating CEGUI from NotificationQueue stuff by introducing a new NotificationQueue called the NotificationQueueCEGUI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/tutoriallevel2/src/modules/notifications/NotificationQueue.cc

    r8445 r8446  
    3838
    3939#include "core/CoreIncludes.h"
    40 #include "core/GameMode.h"
    41 #include "core/GUIManager.h"
    42 #include "core/LuaState.h"
    43 #include "util/Convert.h"
    4440#include "util/SubString.h"
    4541
     
    8884        }
    8985
    90         this->create(); // Creates the NotificationQueue in lua.
    91 
    9286        COUT(3) << "NotificationQueue '" << this->getName() << "' created." << std::endl;
    9387    }
     
    108102            NotificationManager::getInstance().unregisterQueue(this);
    109103        }
    110     }
    111 
    112     /**
    113     @brief
    114         Destroys the NotificationQueue.
    115         Used in lua and NotificationManager.
    116     @param noGraphics
    117         If this is set to true (false is default), then the queue is not removed in lua. This is used to destroy the queue, after the GUIManager has been destroyed.
    118     */
    119     void NotificationQueue::destroy(bool noGraphics)
    120     {
    121         // Remove the NotificationQueue in lua.
    122         if(GameMode::showsGraphics() && !noGraphics)
    123             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.removeQueue(\"" + this->getName() +  "\")");
    124 
     104       
    125105        COUT(3) << "NotificationQueue '" << this->getName() << "' destroyed." << std::endl;
    126 
    127         this->OrxonoxClass::destroy();
    128     }
    129 
    130     /**
    131     @brief
    132         Creates the NotificationQueue in lua.
    133     */
    134     void NotificationQueue::create(void)
    135     {
    136         if(GameMode::showsGraphics())
    137             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.createQueue(\"" + this->getName() +  "\", " + multi_cast<std::string>(this->getMaxSize()) + ")");
    138106    }
    139107
     
    236204        this->notifications_.insert(this->notifications_.begin(), container);
    237205
    238         // Push the Notification to the GUI.
    239         if(GameMode::showsGraphics())
    240             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.pushNotification(\"" + this->getName() + "\", \"" + notification->getMessage() + "\")");
     206        // Inform that a Notification was pushed.
     207        this->notificationPushed(notification);
    241208
    242209        COUT(5) << "Notification \"" << notification->getMessage() << "\" pushed to NotificationQueue '" << this->getName() << "'" << endl;
     
    269236        delete container;
    270237
    271         // Pops the Notification from the GUI.
    272         if(GameMode::showsGraphics())
    273             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.popNotification(\"" + this->getName() + "\")");
     238        // Inform that a Notification was popped.
     239        this->notificationPopped();
    274240    }
    275241
     
    295261        delete *containerIterator;
    296262
    297         // Removes the Notification from the GUI.
    298         if(GameMode::showsGraphics())
    299             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.removeNotification(\"" + this->getName() + "\", " + multi_cast<std::string>(index) + ")");
     263        // TODO: index automatically cast?
     264        // Inform that a Notification was removed.
     265        this->notificationRemoved(index);
    300266    }
    301267
     
    316282        this->notifications_.clear();
    317283        this->size_ = 0;
    318 
    319         // Clear the NotificationQueue in the GUI.
    320         if(GameMode::showsGraphics() && !noGraphics)
    321             GUIManager::getInstance().getLuaState()->doString("NotificationLayer.clearQueue(\"" + this->getName() + "\")");
    322284    }
    323285
Note: See TracChangeset for help on using the changeset viewer.