Browse Source

Switched windows size values from hard coded to use a common set of variables

David Wimsey 11 years ago
parent
commit
d59bc04608
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Samples/basic/drag/src/main.cpp

+ 2 - 2
Samples/basic/drag/src/main.cpp

@@ -87,7 +87,7 @@ int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv)
 
 
 	// Rocket initialisation.
 	// Rocket initialisation.
 	Rocket::Core::SetRenderInterface(&opengl_renderer);
 	Rocket::Core::SetRenderInterface(&opengl_renderer);
-	opengl_renderer.SetViewport(1024,768);
+	opengl_renderer.SetViewport(window_width, window_height);
 
 
 	ShellSystemInterface system_interface;
 	ShellSystemInterface system_interface;
 	Rocket::Core::SetSystemInterface(&system_interface);
 	Rocket::Core::SetSystemInterface(&system_interface);
@@ -95,7 +95,7 @@ int main(int ROCKET_UNUSED_PARAMETER(argc), char** ROCKET_UNUSED_PARAMETER(argv)
 	Rocket::Core::Initialise();
 	Rocket::Core::Initialise();
 
 
 	// Create the main Rocket context and set it on the shell's input layer.
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(window_width, window_height));
 	if (context == NULL)
 	if (context == NULL)
 	{
 	{
 		Rocket::Core::Shutdown();
 		Rocket::Core::Shutdown();