diff EXCLUDE/GLTSF/src/Window.cpp @ 4737:0e18c79c4111

Renamed Window::Update to Window::Handle_Events. Removed Window::Clear. Added Window::Show_Cursor/Hide_Cursor. Added On_Resized event.
author dewyatt
date Sat, 12 Jun 2010 03:19:43 -0400
parents 0c7c67d4e6ee
children
line wrap: on
line diff
--- a/EXCLUDE/GLTSF/src/Window.cpp	Fri Jun 11 18:32:18 2010 -0400
+++ b/EXCLUDE/GLTSF/src/Window.cpp	Sat Jun 12 03:19:43 2010 -0400
@@ -17,6 +17,7 @@
 Window::~Window()
 {
 	Finalize();
+	Show_Cursor();
 }
 
 void Window::Initialize(const std::wstring &Title, const Video_Mode &Mode, bool Fullscreen)
@@ -219,6 +220,9 @@
 {
 	switch (Message)
 	{
+	case WM_SIZE:
+		Call_Listener(On_Resized(LOWORD(lParam), HIWORD(lParam)));
+		break;
 	case WM_CLOSE:
 		Call_Listener(On_Close());
 		break;
@@ -250,7 +254,7 @@
 		ShowWindow(my_Handle, SW_HIDE);
 }
 
-void Window::Update()
+void Window::Handle_Events()
 {
 	MSG Message = {0};
 	while (PeekMessageW(&Message, NULL, 0, 0, PM_REMOVE))
@@ -266,7 +270,12 @@
 		SwapBuffers(my_Device_Context);
 }
 
-void Window::Clear()
+void Window::Show_Cursor()
 {
-	glClear(GL_COLOR_BUFFER_BIT);
+	ShowCursor(TRUE);
 }
+
+void Window::Hide_Cursor()
+{
+	ShowCursor(FALSE);
+}