2016-05-31 3 views
-1

Windows 범용 응용 프로그램에서 탐색 할 때 문제가 있습니다. 마우스 클릭을 사용하여 .csam 파일에서 .xaml로 탐색하려는 경우 응용 프로그램이 중지됩니다. 터치를 사용하면 애플리케이션이 작동하지만 클릭을 사용하면 작동하지 않습니다. 발표에Monogame에서 .csam 파일을 .xaml로 탐색하는 방법은 무엇입니까?

// Mitos 
       if (mitsTrues.Contains(mouseX, mouseY)) { 
        var ccc = new Frame(); 
        ccc.Navigate(typeof(Credits)); 

        Window.Current.Content = ccc; 
        Window.Current.Activate(); 
       } 

       // Ayuda cerca de ti 
       if (help.Contains(mouseX, mouseY)) { 
        var rootFrame = new Frame(); 
        rootFrame.Navigate(typeof(Help)); 

        Window.Current.Content = rootFrame; 
        Window.Current.Activate(); 
       } 

       // Faqs 
       if (faqs.Contains(mouseX, mouseY)) { 
        var rootFrame = new Frame(); 
        rootFrame.Navigate(typeof(FaqPage)); 

        Window.Current.Content = rootFrame; 
        Window.Current.Activate(); 
       } 

답변

1

솔루션 누를에서 마우스 클릭을 변경할 수 있습니다 : (SexAppRetos.cs)는 다음과 같이

내 코드입니다.

game.mouseState.LeftButton == ButtonState.Released 

game.mouseState.LeftButton == ButtonState.Pressed