~ubuntu-branches/ubuntu/vivid/mygui/vivid

« back to all changes in this revision

Viewing changes to Wrappers/MyGUI_RenderWindow_Export/DemoKeeper.cpp

  • Committer: Package Import Robot
  • Author(s): Scott Howard, Bret Curtis, Scott Howard
  • Date: 2014-09-18 17:57:48 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140918175748-dd8va78mvpw1jbes
Tags: 3.2.1-1
[ Bret Curtis ]
* Updated license for majority of files from LGPL to Expat (MIT)

[ Scott Howard ]
* New upstream release
* Updated patch to add build option for system GLEW libraries
* All patches accepted upstream except shared_libraries.patch
* Bumped SONAME due to dropped symbols, updated *.symbols and package
  names
* Updated license of debian/* to Expat with permission of all authors
* Don't install Doxygen autogenerated md5 and map files (thanks
  lintian)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*!
 
2
        @file
 
3
        @author         Albert Semenov
 
4
        @date           01/2009
 
5
*/
 
6
#include "DemoKeeper.h"
 
7
 
 
8
namespace demo
 
9
{
 
10
 
 
11
        DemoKeeper::DemoKeeper() :
 
12
                mFrameStartDelegate(nullptr)
 
13
        {
 
14
        }
 
15
 
 
16
        void DemoKeeper::setupResources()
 
17
        {
 
18
                base::BaseManager::setupResources();
 
19
                addResourceLocation(getRootMedia() + "/Wrapper/WrapperBaseApp");
 
20
        }
 
21
 
 
22
        void DemoKeeper::createScene()
 
23
        {
 
24
                MyGUI::Gui::getInstance().eventFrameStart += MyGUI::newDelegate(this, &DemoKeeper::notifyFrameStart);
 
25
        }
 
26
 
 
27
        void DemoKeeper::destroyScene()
 
28
        {
 
29
                MyGUI::Gui::getInstance().eventFrameStart -= MyGUI::newDelegate(this, &DemoKeeper::notifyFrameStart);
 
30
        }
 
31
 
 
32
        void DemoKeeper::notifyFrameStart(float _time)
 
33
        {
 
34
                if (mFrameStartDelegate  != nullptr)
 
35
                        mFrameStartDelegate(_time);
 
36
        }
 
37
 
 
38
        void DemoKeeper::setFrameEvent(HandleFrameStart _delegate)
 
39
        {
 
40
                mFrameStartDelegate = _delegate;
 
41
        }
 
42
 
 
43
} // namespace demo