From b015f2c3130fcb42fb250fddc9a2293a4073b6d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sun, 6 Jan 2013 16:29:37 +0100 Subject: [PATCH] Added SetSelectionToSelectSlide and use this on party-screen. --- Vocaluxe/Screens/CScreenParty.cs | 2 ++ VocaluxeLib/Menu/CMenu.cs | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Vocaluxe/Screens/CScreenParty.cs b/Vocaluxe/Screens/CScreenParty.cs index 452dd271..a597b338 100644 --- a/Vocaluxe/Screens/CScreenParty.cs +++ b/Vocaluxe/Screens/CScreenParty.cs @@ -118,6 +118,8 @@ namespace Vocaluxe.Screens } SelectSlides[htSelectSlides(SelectSlideModes)].Selection = 0; UpdateSelection(); + + SetInteractionToSelectSlide(SelectSlides[htSelectSlides(SelectSlideModes)]); } public override bool UpdateGame() diff --git a/VocaluxeLib/Menu/CMenu.cs b/VocaluxeLib/Menu/CMenu.cs index adfbb690..587a0702 100644 --- a/VocaluxeLib/Menu/CMenu.cs +++ b/VocaluxeLib/Menu/CMenu.cs @@ -1552,6 +1552,25 @@ namespace Vocaluxe.Menu return false; } + public bool SetInteractionToSelectSlide(CSelectSlide slide) + { + for (int i = 0; i < _Interactions.Count; i++) + { + if (_Interactions[i].Type == EType.TSelectSlide) + { + if (_SelectSlides[_Interactions[i].Num] == slide) + { + _UnsetSelected(); + _UnsetHighlighted(_Selection); + _Selection = i; + _SetSelected(); + return true; + } + } + } + return false; + } + public void ProcessMouseClick(int x, int y) { if (_Selection >= _Interactions.Count || _Selection < 0)