view LightClone/Source/GuiEvent.cpp @ 75:57c0ce406a68 tip

Add main menu
author koryspansel <koryspansel@bendbroadband.com>
date Tue, 18 Oct 2011 17:08:17 -0700
parents b4dc5d674e22
children
line wrap: on
line source

/*
 * GuiEvent
 */

#include "GuiEvent.h"

/*
 * GuiEvent
 */
GuiEvent::GuiEvent(const char* pEventName) : kName(pEventName)
{
}

/*
 * ~GuiEvent
 */
GuiEvent::~GuiEvent()
{
	for(uint32 i = 0; i < kSubscriptions.Size(); ++i)
	{
		delete kSubscriptions[i];
	}

	kSubscriptions.Clear();
}

/*
 * Fire
 */
void GuiEvent::Fire(GuiEventArguments& kArguments)
{
	for(uint32 i = 0; i < kSubscriptions.Size(); ++i)
	{
		(*kSubscriptions[i])(kArguments);
	}
}