mirror of
				https://github.com/Ryujinx/Opentk.git
				synced 2025-11-04 05:04:54 +00:00 
			
		
		
		
	[Examples] Test Mouse.SetPosition
This commit is contained in:
		
							parent
							
								
									7eefb3e3ff
								
							
						
					
					
						commit
						b89c920f32
					
				| 
						 | 
					@ -139,9 +139,24 @@ namespace Examples.Tests
 | 
				
			||||||
                case Key.Comma: TargetRenderFrequency--; break;
 | 
					                case Key.Comma: TargetRenderFrequency--; break;
 | 
				
			||||||
                case Key.Period: TargetRenderFrequency++; break;
 | 
					                case Key.Period: TargetRenderFrequency++; break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                case Key.Space:
 | 
					                case Key.Enter:
 | 
				
			||||||
                    CursorVisible = !CursorVisible;
 | 
					                    CursorVisible = !CursorVisible;
 | 
				
			||||||
                    break;
 | 
					                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                case Key.C:
 | 
				
			||||||
 | 
					                    if (Cursor == MouseCursor.Default)
 | 
				
			||||||
 | 
					                        Cursor = Pencil;
 | 
				
			||||||
 | 
					                    else if (Cursor == Pencil)
 | 
				
			||||||
 | 
					                        Cursor = MouseCursor.Empty;
 | 
				
			||||||
 | 
					                    else
 | 
				
			||||||
 | 
					                        Cursor = MouseCursor.Default;
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                case Key.Space:
 | 
				
			||||||
 | 
					                    Point p = new Point(Width / 2, Height / 2);
 | 
				
			||||||
 | 
					                    p = PointToScreen(p);
 | 
				
			||||||
 | 
					                    OpenTK.Input.Mouse.SetPosition(p.X, p.Y);
 | 
				
			||||||
 | 
					                    break;
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (!keyboard_keys.ContainsKey(e.Key))
 | 
					            if (!keyboard_keys.ContainsKey(e.Key))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue