diff LightClone/Source/Dialog.h @ 40:00d17d8f407d

Hookup game over dialog; Remove Code class
author koryspansel
date Thu, 22 Sep 2011 10:21:14 -0700
parents d0ce73ced12e
children a986355cca5f
line wrap: on
line diff
--- a/LightClone/Source/Dialog.h	Thu Sep 22 09:01:42 2011 -0700
+++ b/LightClone/Source/Dialog.h	Thu Sep 22 10:21:14 2011 -0700
@@ -9,6 +9,8 @@
 #include "GuiDialog.h"
 #include "GuiLabel.h"
 #include "GuiButton.h"
+#include <stdarg.h>
+#include <stdio.h>
 
 /*
  * DialogResult
@@ -103,9 +105,17 @@
 	/*
 	 * SetMessage
 	 */
-	void SetMessage(const char* pMessage)
+	void SetMessage(const char* pFormat, ...)
 	{
-		kLabel.SetText(pMessage);
+		va_list kArguments;
+		va_start(kArguments, pFormat);
+
+		char kBuffer[128];
+		vsprintf(kBuffer, pFormat, kArguments);
+
+		kLabel.SetText(kBuffer);
+
+		va_end(kArguments);
 	}
 
 	/*