Re-submission of the Volumetric Fog PR, with cleanup.

This commit is contained in:
Areloch 2015-12-01 00:10:13 -06:00
parent 272e3138a0
commit a90eb9762b
62 changed files with 2541 additions and 6 deletions

View file

@ -321,8 +321,11 @@ void GuiCanvas::setWindowTitle(const char *newTitle)
mPlatformWindow->setCaption(newTitle);
}
CanvasSizeChangeSignal GuiCanvas::smCanvasSizeChangeSignal;
void GuiCanvas::handleResize( WindowId did, S32 width, S32 height )
{
getCanvasSizeChangeSignal().trigger(this);
if (Journal::IsPlaying() && mPlatformWindow)
{
mPlatformWindow->lockSize(false);

View file

@ -33,6 +33,10 @@
#include "platform/platformInput.h"
#endif
#ifndef _SIGNAL_H_
#include "core/util/tSignal.h"
#endif
#include "component/interfaces/IProcessInput.h"
#include "windowManager/platformWindowMgr.h"
#include "gfx/gfxFence.h"
@ -74,6 +78,8 @@
/// screen will be painted normally. If you are making an animated GuiControl
/// you need to add your control to the dirty areas of the canvas.
///
class guiCanvas;
typedef Signal<void(GuiCanvas* canvas)> CanvasSizeChangeSignal;
class GuiCanvas : public GuiControl, public IProcessInput
{
@ -183,6 +189,8 @@ protected:
virtual void setupFences();
void checkLockMouseMove( const GuiEvent& event );
//Signal used to let others know this canvas has changed size.
static CanvasSizeChangeSignal smCanvasSizeChangeSignal;
GuiControl *mMenuBarCtrl;
@ -200,6 +208,8 @@ public:
static void initPersistFields();
static CanvasSizeChangeSignal& getCanvasSizeChangeSignal() { return smCanvasSizeChangeSignal; }
/// @name Rendering methods
///
/// @{