view LightClone/Source/GuiDialog.cpp @ 39:d0ce73ced12e

Added base GuiDialog for event handling; Hookup level complete dialog
author koryspansel <koryspansel@bendbroadband.com>
date Thu, 22 Sep 2011 09:01:42 -0700
parents
children
line wrap: on
line source

/*
 * GuiDialog
 */

#include "GuiDialog.h"

/*
 * EventResult
 */
const char* GuiDialog::EventResult = "GuiDialog:EventResult";

/*
 * GuiDialog
 */
GuiDialog::GuiDialog() : GuiImage()
{
	ClearFlag(GuiElementFlag_Visible);
}

/*
 * Show
 */
ErrorCode GuiDialog::Show()
{
	return SetFlag(GuiElementFlag_Visible), Error_Success;
}

/*
 * Close
 */
void GuiDialog::Close(uint32 nResult)
{
	ClearFlag(GuiElementFlag_Visible);

	GuiResultArguments kArguments(this, nResult);
	Fire(GuiDialog::EventResult, kArguments);
}