EventThread: Add 'recenter' parameter to window resize request
If true, centers the window on the current screen with the new size.
This commit is contained in:
		
							parent
							
								
									d09fec941b
								
							
						
					
					
						commit
						a92adee7f8
					
				
					 3 changed files with 37 additions and 7 deletions
				
			
		| 
						 | 
				
			
			@ -201,9 +201,10 @@ RB_METHOD(graphicsResizeWindow)
 | 
			
		|||
	RB_UNUSED_PARAM;
 | 
			
		||||
 | 
			
		||||
	int width, height;
 | 
			
		||||
	rb_get_args(argc, argv, "ii", &width, &height RB_ARG_END);
 | 
			
		||||
	bool recenter = false;
 | 
			
		||||
	rb_get_args(argc, argv, "ii|b", &width, &height, &recenter RB_ARG_END);
 | 
			
		||||
 | 
			
		||||
	shState->eThread().requestWindowResize(width, height);
 | 
			
		||||
	shState->eThread().requestWindowResize(width, height, recenter);
 | 
			
		||||
 | 
			
		||||
	return Qnil;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue