public HighScoresScreen() : base(_menu) { _signPost = _menu.FindName("SignPost") as SignPost; _signPost.SignText = "Naar Home"; (_signPost.FindName("canvasSignpost") as Canvas).MouseLeftButtonDown += SignPost_MouseLeftButtonDown; }
public EndScreen() : base(_menu) { txtScore = _menu.FindName("txtTotalPoints") as TextBlock; _highscores = _menu.FindName("imgHighscoresPressed") as Image; _highscores.MouseEnter += ImgMouseEnter; _highscores.MouseLeave += ImgMouseLeave; _highscores.MouseLeftButtonDown += ImgHighscoresClick; _signPost = _menu.FindName("SignPost") as SignPost; _signPost.SignText = "Naar Home"; (_signPost.FindName("canvasSignpost") as Canvas).MouseLeftButtonDown += SignPost_MouseLeftButtonDown; SetLoseScore(500); }
public ChooseSideScreen() : base(_menu) { Canvas npcMe = _menu.FindName("npcME") as Canvas; if (npcMe == null) { throw new NotImplementedException("MEer not implemented"); } ME me = new ME(); me.SetValue(Canvas.TopProperty, 140.0); me.SetValue(Canvas.LeftProperty, 60.0); npcMe.Children.Add(me); npcMe.MouseLeftButtonUp += ButtonMeMouseLeftButtonUp; npcMe.MouseEnter += ButtonMouseEnter; Canvas npcKraker = _menu.FindName("npcKraker") as Canvas; if (npcKraker == null) { throw new NotImplementedException("Kraker not implemented"); } Kraker kraker = new Kraker(); kraker.SetValue(Canvas.TopProperty, 200.0); kraker.SetValue(Canvas.LeftProperty, 100.0); npcKraker.Children.Add(kraker); npcKraker.MouseLeftButtonUp += ButtonKrakerMouseLeftButtonUp; npcKraker.MouseEnter += ButtonMouseEnter; // todo: implement kraker and remove the 3 lines below; kraker.Opacity = 0.5; npcKraker.Cursor = Cursors.Wait; ToolTipService.SetToolTip(npcKraker, "Kraker is momenteel in de huidige versie niet beschikbaar."); _signPost = _menu.FindName("SignPost") as SignPost; _signPost.SignText = "Naar Home"; (_signPost.FindName("canvasSignpost") as Canvas).MouseLeftButtonDown += SignPost_MouseLeftButtonDown; }
public HelpScreen() : base(_menu) { Controls.Add(new HelpControlHolder { Name = "Q", Key = Key.Q, KeyName = "Shuffle Weapon Down", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/q.png", GridCol = 0, GridRow = 0 }); Controls.Add(new HelpControlHolder { Name = "W", Key = Key.W, KeyName = "Jump", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/w.png", GridCol = 1, GridRow = 0 }); Controls.Add(new HelpControlHolder { Name = "E", Key = Key.E, KeyName = "Shuffle Weapon Up", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/e.png", GridCol = 2, GridRow = 0 }); Controls.Add(new HelpControlHolder { Name = "A", Key = Key.A, KeyName = "Move to Left", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/a.png", GridCol = 0, GridRow = 1 }); Controls.Add(new HelpControlHolder { Name = "D", Key = Key.D, KeyName = "Move to Right", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/d.png", GridCol = 2, GridRow = 1 }); Controls.Add(new HelpControlHolder { Name = "Left", Key = Key.Left, KeyName = "Aim Weapon to Left", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/left.png", GridCol = 0, GridRow = 3 }); Controls.Add(new HelpControlHolder { Name = "Up", Key = Key.Up, KeyName = "Shuffle Weapon Up", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/up.png", GridCol = 1, GridRow = 2 }); Controls.Add(new HelpControlHolder { Name = "Right", Key = Key.Right, KeyName = "Aim Weapon to Right", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/right.png", GridCol = 2, GridRow = 3 }); Controls.Add(new HelpControlHolder { Name = "Down", Key = Key.Down, KeyName = "Shuffle Weapon Down", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/down.png", GridCol = 1, GridRow = 3 }); Controls.Add(new HelpControlHolder { Name = "Control", Key = Key.Ctrl, KeyName = "Jump", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/control.png", GridCol = 0, GridRow = 4 }); Controls.Add(new HelpControlHolder { Name = "Space", Key = Key.Space, KeyName = "Shoot Weapon", ImgString = @"/ResourceFramework;component/Images/Buttons/Control/space.png", GridCol = 1, GridRow = 4, Width = 350, Height = 100, GridColWidth = 3 }); _bulletEngine = new BulletEngine(new Canvas()); _meer = new ME { Name = "testMEer", Position = new Point(800, 650) }; _meer.WeaponEngine.SetBulletEngine(_bulletEngine); _btnResource = _menu.Resources.MergedDictionaries[0]; _cnvsMe = _menu.FindName("cnvsMe") as Canvas; if (_cnvsMe == null) { throw new NotImplementedException("ME not implemented"); } _cnvsMe.Children.Add(_bulletEngine.Container); _cnvsMe.Children.Add(_meer); _txtKeyName = _menu.FindName("txtKeyName") as TextBlock; if (_txtKeyName == null) { throw new NotImplementedException("txtKeyName not implemented"); } _btnGrid = _menu.FindName("btnGrid") as Grid; if (_btnGrid == null) { throw new NotImplementedException("btnGrid not implemented"); } CreateButtons(); _signPost = _menu.FindName("SignPost") as SignPost; if (_signPost == null) { throw new NotImplementedException("SignPost not implemented"); } _signPost.SignText = "Naar Home"; (_signPost.FindName("canvasSignpost") as Canvas).MouseLeftButtonDown += SignPostMouseLeftButtonDown; Updated += HelpScreenUpdated; Shown += HelpScreenShown; }