Simplify SelectSlides and fix a couple of problems there

This commit is contained in:
Flamefire committed 2014-12-13 13:52:59 +01:00
1 parent cea1d43e6b
commit 1ba0d429a1
26 files changed
+317 -350

No files matched your search

@@ -194,7 +194,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -236,7 +236,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -278,7 +278,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -295,7 +295,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -337,8 +337,8 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>-5</TextRelativeY> <TextRelativeY>5</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
@@ -194,7 +194,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -236,7 +236,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -278,7 +278,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -295,7 +295,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -337,8 +337,8 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>-5</TextRelativeY> <TextRelativeY>5</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
@@ -194,7 +194,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -236,7 +236,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -278,7 +278,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -320,7 +320,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -362,7 +362,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -295,7 +295,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -337,8 +337,8 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>-5</TextRelativeY> <TextRelativeY>5</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
@@ -46,22 +46,22 @@
<SkinArrowLeftSelected>Minus</SkinArrowLeftSelected> <SkinArrowLeftSelected>Minus</SkinArrowLeftSelected>
<SkinArrowRightSelected>Plus</SkinArrowRightSelected> <SkinArrowRightSelected>Plus</SkinArrowRightSelected>
<Rect> <Rect>
<X>1090</X> <X>1070</X>
<Y>680</Y> <Y>680</Y>
<W>200</W> <W>200</W>
<H>50</H> <H>30</H>
<Z>-2</Z> <Z>-2</Z>
</Rect> </Rect>
<RectArrowLeft> <RectArrowLeft>
<X>1195</X> <X>1195</X>
<Y>682</Y> <Y>680</Y>
<W>30</W> <W>30</W>
<H>30</H> <H>30</H>
<Z>-2</Z> <Z>-2</Z>
</RectArrowLeft> </RectArrowLeft>
<RectArrowRight> <RectArrowRight>
<X>1240</X> <X>1235</X>
<Y>682</Y> <Y>680</Y>
<W>30</W> <W>30</W>
<H>30</H> <H>30</H>
<Z>-2</Z> <Z>-2</Z>
@@ -73,9 +73,9 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>-15</TextRelativeX> <TextRelativeX>0</TextRelativeX>
<TextRelativeY>-8</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>500</TextMaxW> <TextMaxW>25</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
<TextStyle>Bold</TextStyle> <TextStyle>Bold</TextStyle>
<NumVisible>1</NumVisible> <NumVisible>1</NumVisible>
@@ -418,7 +418,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>186</TextMaxW> <TextMaxW>186</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -460,7 +460,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -502,7 +502,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -544,7 +544,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -586,7 +586,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -628,7 +628,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -670,7 +670,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>20</TextH> <TextH>20</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>86</TextMaxW> <TextMaxW>86</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -302,7 +302,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -344,7 +344,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -386,7 +386,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -428,7 +428,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -470,7 +470,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>308</TextMaxW> <TextMaxW>308</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -512,7 +512,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -145,7 +145,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -187,7 +187,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -338,7 +338,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>616</TextMaxW> <TextMaxW>616</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -380,7 +380,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>154</TextMaxW> <TextMaxW>154</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -422,7 +422,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>154</TextMaxW> <TextMaxW>154</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -464,7 +464,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>123.2</TextMaxW> <TextMaxW>123.2</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -187,7 +187,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -229,7 +229,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -271,7 +271,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>500</TextMaxW> <TextMaxW>500</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -313,7 +313,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>500</TextMaxW> <TextMaxW>500</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -355,7 +355,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>500</TextMaxW> <TextMaxW>500</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -317,7 +317,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>616</TextMaxW> <TextMaxW>616</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -359,7 +359,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>616</TextMaxW> <TextMaxW>616</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -401,7 +401,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>308</TextMaxW> <TextMaxW>308</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -443,7 +443,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>308</TextMaxW> <TextMaxW>308</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -485,7 +485,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>308</TextMaxW> <TextMaxW>308</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -527,7 +527,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>308</TextMaxW> <TextMaxW>308</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -569,7 +569,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>616</TextMaxW> <TextMaxW>616</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -611,7 +611,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>616</TextMaxW> <TextMaxW>616</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -280,7 +280,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -322,7 +322,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -364,7 +364,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -406,7 +406,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -448,7 +448,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>205.33</TextMaxW> <TextMaxW>205.33</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -490,7 +490,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>150</TextMaxW> <TextMaxW>150</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -348,7 +348,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>600</TextMaxW> <TextMaxW>600</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -509,7 +509,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>219.2</TextMaxW> <TextMaxW>219.2</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -551,7 +551,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>208.67</TextMaxW> <TextMaxW>208.67</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -593,7 +593,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>208.67</TextMaxW> <TextMaxW>208.67</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -635,7 +635,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>313</TextMaxW> <TextMaxW>313</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -677,7 +677,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>27</TextH> <TextH>27</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>313</TextMaxW> <TextMaxW>313</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
+4 -4
View File
@@ -899,7 +899,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>25</TextH> <TextH>25</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>280</TextMaxW> <TextMaxW>280</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -941,7 +941,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>25</TextH> <TextH>25</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>280</TextMaxW> <TextMaxW>280</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -983,7 +983,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>25</TextH> <TextH>25</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>280</TextMaxW> <TextMaxW>280</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -1025,7 +1025,7 @@
<TextColor Name="TextColor" /> <TextColor Name="TextColor" />
<TextSelColor Name="TextSelColor" /> <TextSelColor Name="TextSelColor" />
<TextH>25</TextH> <TextH>25</TextH>
<TextRelativeX>0</TextRelativeX> <TextRelativeX>50</TextRelativeX>
<TextRelativeY>0</TextRelativeY> <TextRelativeY>0</TextRelativeY>
<TextMaxW>280</TextMaxW> <TextMaxW>280</TextMaxW>
<TextFont>Outline</TextFont> <TextFont>Outline</TextFont>
@@ -83,12 +83,12 @@ namespace VocaluxeLib.PartyModes.Challenge
int max = numPlayed.Max(); int max = numPlayed.Max();
int num = Rounds[0].Player.Count; int playersPerRound = Rounds[0].Player.Count;
List<int> result = new List<int>(); List<int> result = new List<int>();
List<int> other = new List<int>(); List<int> other = new List<int>();
List<int> last = new List<int>(); List<int> last = new List<int>();
for (int i = 0; i < numPlayed.Count; i++) for (int i = 0; i < _NumPlayer; i++)
{ {
if (roundIndex == 0 || numPlayed[i] < max) if (roundIndex == 0 || numPlayed[i] < max)
{ {
@@ -111,7 +111,7 @@ namespace VocaluxeLib.PartyModes.Challenge
} }
} }
while (result.Count < num && other.Count > 0) while (result.Count < playersPerRound && other.Count > 0)
{ {
int n = other.Count; int n = other.Count;
int r = _Rand.Next(n); int r = _Rand.Next(n);
@@ -119,7 +119,7 @@ namespace VocaluxeLib.PartyModes.Challenge
other.RemoveAt(r); other.RemoveAt(r);
} }
while (result.Count < num) while (result.Count < playersPerRound)
{ {
int n = last.Count; int n = last.Count;
int r = _Rand.Next(n); int r = _Rand.Next(n);
@@ -127,7 +127,7 @@ namespace VocaluxeLib.PartyModes.Challenge
last.RemoveAt(r); last.RemoveAt(r);
} }
while (result.Count > num) while (result.Count > playersPerRound)
{ {
int n = result.Count; int n = result.Count;
int r = _Rand.Next(n); int r = _Rand.Next(n);
@@ -127,7 +127,7 @@ namespace VocaluxeLib.PartyModes.Challenge
_SelectSlides[_SelectSlideNumPlayers].Clear(); _SelectSlides[_SelectSlideNumPlayers].Clear();
for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++) for (int i = _PartyMode.GetMinPlayer(); i <= _PartyMode.GetMaxPlayer(); i++)
_SelectSlides[_SelectSlideNumPlayers].AddValue(i.ToString()); _SelectSlides[_SelectSlideNumPlayers].AddValue(i.ToString());
_SelectSlides[_SelectSlideNumPlayers].Selection = _PartyMode.GameData.NumPlayer - _PartyMode.GetMinPlayer(); _SelectSlides[_SelectSlideNumPlayers].SelectedValue = _PartyMode.GameData.NumPlayer.ToString();
_UpdateMicsAtOnce(); _UpdateMicsAtOnce();
_SetRoundSteps(); _SetRoundSteps();
+1 -1
View File
@@ -134,7 +134,7 @@ namespace Vocaluxe.Screens
private void _SaveConfig() private void _SaveConfig()
{ {
CLanguage.LanguageId = _SelectSlides[_SelectSlideLanguage].Selection; CLanguage.LanguageId = _SelectSlides[_SelectSlideLanguage].Selection;
CConfig.Config.Game.Language = _SelectSlides[_SelectSlideLanguage].Value; CConfig.Config.Game.Language = _SelectSlides[_SelectSlideLanguage].SelectedValue;
CConfig.Config.Debug.DebugLevel = (EDebugLevel)_SelectSlides[_SelectSlideDebugLevel].Selection; CConfig.Config.Debug.DebugLevel = (EDebugLevel)_SelectSlides[_SelectSlideDebugLevel].Selection;
CConfig.Config.Game.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection; CConfig.Config.Game.SongMenu = (ESongMenu)_SelectSlides[_SelectSlideSongMenu].Selection;
CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection; CConfig.Config.Game.SongSorting = (ESongSorting)_SelectSlides[_SelectSlideSongSorting].Selection;
+5 -5
View File
@@ -171,15 +171,15 @@ namespace Vocaluxe.Screens
CConfig.SaveConfig(); CConfig.SaveConfig();
if (_OldCoverTheme != _SelectSlides[_SelectSlideCover].Value) if (_OldCoverTheme != _SelectSlides[_SelectSlideCover].SelectedValue)
CCover.ReloadCovers(); CCover.ReloadCovers();
} }
private void _OnChange() private void _OnChange()
{ {
if (CConfig.Config.Theme.Theme != _SelectSlides[_SelectSlideTheme].Value) if (CConfig.Config.Theme.Theme != _SelectSlides[_SelectSlideTheme].SelectedValue)
{ {
CConfig.Config.Theme.Theme = _SelectSlides[_SelectSlideTheme].Value; CConfig.Config.Theme.Theme = _SelectSlides[_SelectSlideTheme].SelectedValue;
CThemes.Reload(); CThemes.Reload();
CGraphics.ReloadTheme(); CGraphics.ReloadTheme();
@@ -188,9 +188,9 @@ namespace Vocaluxe.Screens
return; return;
} }
if (CConfig.Config.Theme.Skin != _SelectSlides[_SelectSlideSkin].Value) if (CConfig.Config.Theme.Skin != _SelectSlides[_SelectSlideSkin].SelectedValue)
{ {
CConfig.Config.Theme.Skin = _SelectSlides[_SelectSlideSkin].Value; CConfig.Config.Theme.Skin = _SelectSlides[_SelectSlideSkin].SelectedValue;
CThemes.ReloadSkin(); CThemes.ReloadSkin();
CGraphics.ReloadSkin(); CGraphics.ReloadSkin();
+34 -47
View File
@@ -109,7 +109,7 @@ namespace Vocaluxe.Screens
break; break;
case EEditMode.PlayerName: case EEditMode.PlayerName:
_SelectSlides[_SelectSlideProfiles].RenameValue( _SelectSlides[_SelectSlideProfiles].RenameValue(
CProfiles.AddGetPlayerName(_SelectSlides[_SelectSlideProfiles].ValueIndex, keyEvent.Unicode)); CProfiles.AddGetPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag, keyEvent.Unicode));
_ProfilesChanged = true; _ProfilesChanged = true;
break; break;
} }
@@ -155,7 +155,7 @@ namespace Vocaluxe.Screens
if (_EditMode == EEditMode.PlayerName) if (_EditMode == EEditMode.PlayerName)
{ {
_SelectSlides[_SelectSlideProfiles].RenameValue( _SelectSlides[_SelectSlideProfiles].RenameValue(
CProfiles.GetDeleteCharInPlayerName(_SelectSlides[_SelectSlideProfiles].ValueIndex)); CProfiles.GetDeleteCharInPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag));
_ProfilesChanged = true; _ProfilesChanged = true;
} }
else else
@@ -168,22 +168,22 @@ namespace Vocaluxe.Screens
} }
if (_SelectSlides[_SelectSlideDifficulty].Selected) if (_SelectSlides[_SelectSlideDifficulty].Selected)
{ {
CProfiles.SetDifficulty(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetDifficulty(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EGameDifficulty)_SelectSlides[_SelectSlideDifficulty].Selection); (EGameDifficulty)_SelectSlides[_SelectSlideDifficulty].Selection);
} }
else if (_SelectSlides[_SelectSlideAvatars].Selected) else if (_SelectSlides[_SelectSlideAvatars].Selected)
{ {
CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag,
_SelectSlides[_SelectSlideAvatars].ValueIndex); _SelectSlides[_SelectSlideAvatars].SelectedTag);
} }
else if (_SelectSlides[_SelectSlideUserRole].Selected) else if (_SelectSlides[_SelectSlideUserRole].Selected)
{ {
CProfiles.SetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EUserRole)_SelectSlides[_SelectSlideUserRole].Selection); (EUserRole)_SelectSlides[_SelectSlideUserRole].Selection);
} }
else if (_SelectSlides[_SelectSlideActive].Selected) else if (_SelectSlides[_SelectSlideActive].Selected)
{ {
CProfiles.SetActive(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetActive(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EOffOn)_SelectSlides[_SelectSlideActive].Selection); (EOffOn)_SelectSlides[_SelectSlideActive].Selection);
} }
} }
@@ -215,24 +215,24 @@ namespace Vocaluxe.Screens
} }
else if (_SelectSlides[_SelectSlideDifficulty].Selected) else if (_SelectSlides[_SelectSlideDifficulty].Selected)
{ {
CProfiles.SetDifficulty(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetDifficulty(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EGameDifficulty)_SelectSlides[_SelectSlideDifficulty].Selection); (EGameDifficulty)_SelectSlides[_SelectSlideDifficulty].Selection);
} }
else if (_SelectSlides[_SelectSlideAvatars].Selected) else if (_SelectSlides[_SelectSlideAvatars].Selected)
{ {
CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag,
_SelectSlides[_SelectSlideAvatars].ValueIndex); _SelectSlides[_SelectSlideAvatars].SelectedTag);
if (CWebcam.IsDeviceAvailable() && _WebcamTexture != null) if (CWebcam.IsDeviceAvailable() && _WebcamTexture != null)
_OnDiscardSnapshot(); _OnDiscardSnapshot();
} }
else if (_SelectSlides[_SelectSlideUserRole].Selected) else if (_SelectSlides[_SelectSlideUserRole].Selected)
{ {
CProfiles.SetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EUserRole)_SelectSlides[_SelectSlideUserRole].Selection); (EUserRole)_SelectSlides[_SelectSlideUserRole].Selection);
} }
else if (_SelectSlides[_SelectSlideActive].Selected) else if (_SelectSlides[_SelectSlideActive].Selected)
{ {
CProfiles.SetActive(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetActive(_SelectSlides[_SelectSlideProfiles].SelectedTag,
(EOffOn)_SelectSlides[_SelectSlideActive].Selection); (EOffOn)_SelectSlides[_SelectSlideActive].Selection);
} }
else if (_Buttons[_ButtonWebcam].Selected) else if (_Buttons[_ButtonWebcam].Selected)
@@ -260,16 +260,16 @@ namespace Vocaluxe.Screens
if (_SelectSlides[_SelectSlideProfiles].Selection > -1) if (_SelectSlides[_SelectSlideProfiles].Selection > -1)
{ {
_Buttons[_ButtonPlayerName].Text.Text = CProfiles.GetPlayerName(_SelectSlides[_SelectSlideProfiles].ValueIndex); _Buttons[_ButtonPlayerName].Text.Text = CProfiles.GetPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag);
if (_EditMode == EEditMode.PlayerName) if (_EditMode == EEditMode.PlayerName)
_Buttons[_ButtonPlayerName].Text.Text += "|"; _Buttons[_ButtonPlayerName].Text.Text += "|";
_SelectSlides[_SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(_SelectSlides[_SelectSlideProfiles].ValueIndex); _SelectSlides[_SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(_SelectSlides[_SelectSlideProfiles].SelectedTag);
_SelectSlides[_SelectSlideUserRole].Selection = (int)CProfiles.GetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].ValueIndex); _SelectSlides[_SelectSlideUserRole].Selection = (int)CProfiles.GetUserRoleProfile(_SelectSlides[_SelectSlideProfiles].SelectedTag);
_SelectSlides[_SelectSlideActive].Selection = (int)CProfiles.GetActive(_SelectSlides[_SelectSlideProfiles].ValueIndex); _SelectSlides[_SelectSlideActive].Selection = (int)CProfiles.GetActive(_SelectSlides[_SelectSlideProfiles].SelectedTag);
int avatarID = CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].ValueIndex); int avatarID = CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].SelectedTag);
_SelectSlides[_SelectSlideAvatars].SetSelectionByValueIndex(avatarID); _SelectSlides[_SelectSlideAvatars].SelectedTag = avatarID;
if (_Snapshot == null) if (_Snapshot == null)
{ {
if (CWebcam.IsCapturing()) if (CWebcam.IsCapturing())
@@ -357,7 +357,7 @@ namespace Vocaluxe.Screens
_Buttons[_ButtonWebcam].Visible = CWebcam.IsDeviceAvailable(); _Buttons[_ButtonWebcam].Visible = CWebcam.IsDeviceAvailable();
int id = CProfiles.NewAvatar(file); int id = CProfiles.NewAvatar(file);
CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].ValueIndex, id); CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag, id);
_LoadAvatars(false); _LoadAvatars(false);
} }
@@ -381,10 +381,9 @@ namespace Vocaluxe.Screens
_EditMode = EEditMode.None; _EditMode = EEditMode.None;
int id = CProfiles.NewProfile(); int id = CProfiles.NewProfile();
_LoadProfiles(false); _LoadProfiles(false);
_SelectSlides[_SelectSlideProfiles].SetSelectionByValueIndex(id); _SelectSlides[_SelectSlideProfiles].SelectedTag = id;
CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].ValueIndex, CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag, _SelectSlides[_SelectSlideAvatars].SelectedTag);
_SelectSlides[_SelectSlideAvatars].ValueIndex);
_SelectElement(_Buttons[_ButtonPlayerName]); _SelectElement(_Buttons[_ButtonPlayerName]);
_EditMode = EEditMode.PlayerName; _EditMode = EEditMode.PlayerName;
@@ -400,7 +399,7 @@ namespace Vocaluxe.Screens
{ {
_EditMode = EEditMode.None; _EditMode = EEditMode.None;
CProfiles.DeleteProfile(_SelectSlides[_SelectSlideProfiles].ValueIndex); CProfiles.DeleteProfile(_SelectSlides[_SelectSlideProfiles].SelectedTag);
int selection = _SelectSlides[_SelectSlideProfiles].Selection; int selection = _SelectSlides[_SelectSlideProfiles].Selection;
if (_SelectSlides[_SelectSlideProfiles].NumValues - 1 > selection) if (_SelectSlides[_SelectSlideProfiles].NumValues - 1 > selection)
@@ -413,29 +412,23 @@ namespace Vocaluxe.Screens
{ {
string name = String.Empty; string name = String.Empty;
if (_EditMode == EEditMode.PlayerName) if (_EditMode == EEditMode.PlayerName)
name = CProfiles.GetPlayerName(_SelectSlides[_SelectSlideProfiles].ValueIndex); name = CProfiles.GetPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag);
int selectedProfileID = _SelectSlides[_SelectSlideProfiles].ValueIndex; int selectedProfileID = _SelectSlides[_SelectSlideProfiles].SelectedTag;
_SelectSlides[_SelectSlideProfiles].Clear(); _SelectSlides[_SelectSlideProfiles].Clear();
CProfile[] profiles = CProfiles.GetProfiles(); CProfile[] profiles = CProfiles.GetProfiles();
foreach (CProfile profile in profiles) foreach (CProfile profile in profiles)
{ _SelectSlides[_SelectSlideProfiles].AddValue(profile.PlayerName, null, profile.ID);
_SelectSlides[_SelectSlideProfiles].AddValue(
profile.PlayerName,
null,
profile.ID,
-1);
}
if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0) if (CProfiles.NumProfiles > 0 && CProfiles.NumAvatars > 0)
{ {
if (selectedProfileID != -1) if (selectedProfileID != -1)
_SelectSlides[_SelectSlideProfiles].SetSelectionByValueIndex(selectedProfileID); _SelectSlides[_SelectSlideProfiles].SelectedTag = selectedProfileID;
else else
{ {
_SelectSlides[_SelectSlideProfiles].Selection = 0; _SelectSlides[_SelectSlideProfiles].Selection = 0;
selectedProfileID = _SelectSlides[_SelectSlideProfiles].ValueIndex; selectedProfileID = _SelectSlides[_SelectSlideProfiles].SelectedTag;
} }
if (!keep) if (!keep)
@@ -443,39 +436,33 @@ namespace Vocaluxe.Screens
_SelectSlides[_SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(selectedProfileID); _SelectSlides[_SelectSlideDifficulty].Selection = (int)CProfiles.GetDifficulty(selectedProfileID);
_SelectSlides[_SelectSlideUserRole].Selection = (int)CProfiles.GetUserRoleProfile(selectedProfileID); _SelectSlides[_SelectSlideUserRole].Selection = (int)CProfiles.GetUserRoleProfile(selectedProfileID);
_SelectSlides[_SelectSlideActive].Selection = (int)CProfiles.GetActive(selectedProfileID); _SelectSlides[_SelectSlideActive].Selection = (int)CProfiles.GetActive(selectedProfileID);
_SelectSlides[_SelectSlideAvatars].SetSelectionByValueIndex(CProfiles.GetAvatarID(selectedProfileID)); _SelectSlides[_SelectSlideAvatars].SelectedTag = CProfiles.GetAvatarID(selectedProfileID);
} }
if (_EditMode == EEditMode.PlayerName) if (_EditMode == EEditMode.PlayerName)
CProfiles.SetPlayerName(_SelectSlides[_SelectSlideProfiles].ValueIndex, name); CProfiles.SetPlayerName(_SelectSlides[_SelectSlideProfiles].SelectedTag, name);
} }
_ProfilesChanged = false; _ProfilesChanged = false;
} }
private void _LoadAvatars(bool keep) private void _LoadAvatars(bool keep)
{ {
int selectedAvatarID = _SelectSlides[_SelectSlideAvatars].ValueIndex; int selectedAvatarID = _SelectSlides[_SelectSlideAvatars].SelectedTag;
_SelectSlides[_SelectSlideAvatars].Clear(); _SelectSlides[_SelectSlideAvatars].Clear();
IEnumerable<CAvatar> avatars = CProfiles.GetAvatars(); IEnumerable<CAvatar> avatars = CProfiles.GetAvatars();
if (avatars != null) if (avatars != null)
{ {
foreach (CAvatar avatar in avatars) foreach (CAvatar avatar in avatars)
{ _SelectSlides[_SelectSlideAvatars].AddValue(avatar.GetDisplayName(), null, avatar.ID);
_SelectSlides[_SelectSlideAvatars].AddValue(
avatar.GetDisplayName(),
null,
avatar.ID,
-1);
}
} }
if (keep) if (keep)
{ {
_SelectSlides[_SelectSlideAvatars].SetSelectionByValueIndex(selectedAvatarID); _SelectSlides[_SelectSlideAvatars].SelectedTag = selectedAvatarID;
CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].ValueIndex, selectedAvatarID); CProfiles.SetAvatar(_SelectSlides[_SelectSlideProfiles].SelectedTag, selectedAvatarID);
} }
else else
_SelectSlides[_SelectSlideAvatars].SetSelectionByValueIndex(CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].ValueIndex)); _SelectSlides[_SelectSlideAvatars].SelectedTag = CProfiles.GetAvatarID(_SelectSlides[_SelectSlideProfiles].SelectedTag);
_AvatarsChanged = false; _AvatarsChanged = false;
} }
+6 -10
View File
@@ -522,12 +522,12 @@ namespace Vocaluxe.Screens
_HandleSelectButton(); _HandleSelectButton();
return true; return true;
} }
else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].ValueSelected) else if (_SelectSlides[_SelectSlideOptionsPlaylistOpen].IsValueSelected)
{ {
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection); _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistOpen].Selection);
return true; return true;
} }
else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].ValueSelected) else if (_SelectSlides[_SelectSlideOptionsPlaylistAdd].IsValueSelected)
{ {
_OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1); _OpenPlaylist(_SelectSlides[_SelectSlideOptionsPlaylistAdd].Selection - 1);
return true; return true;
@@ -1171,7 +1171,7 @@ namespace Vocaluxe.Screens
{ {
if (CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].IsGameModeAvailable(gameMode)) if (CSongs.VisibleSongs[_SongMenu.GetPreviewSongNr()].IsGameModeAvailable(gameMode))
{ {
_SelectSlides[_SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), gameMode)); _SelectSlides[_SelectSlideOptionsMode].AddValue(Enum.GetName(typeof(EGameMode), gameMode), null, (int)gameMode);
_AvailableGameModes.Add(gameMode); _AvailableGameModes.Add(gameMode);
} }
} }
@@ -1189,11 +1189,7 @@ namespace Vocaluxe.Screens
_CheckAndAddGameMode(EGameMode.TR_GAMEMODE_MEDLEY); _CheckAndAddGameMode(EGameMode.TR_GAMEMODE_MEDLEY);
//Set SelectSlide-Selection to last selected game-mode if possible //Set SelectSlide-Selection to last selected game-mode if possible
for (int i = 0; i < _AvailableGameModes.Count; i++) _SelectSlides[_SelectSlideOptionsMode].SelectedTag = (int)lastMode;
{
if (_AvailableGameModes[i] == lastMode)
_SelectSlides[_SelectSlideOptionsMode].SetSelectionByValueIndex(i);
}
_SelectSlides[_SelectSlideOptionsMode].Visible = true; _SelectSlides[_SelectSlideOptionsMode].Visible = true;
_SelectSlides[_SelectSlideOptionsPlaylistAdd].Visible = true; _SelectSlides[_SelectSlideOptionsPlaylistAdd].Visible = true;
_Buttons[_ButtonOptionsSing].Visible = true; _Buttons[_ButtonOptionsSing].Visible = true;
@@ -1242,9 +1238,9 @@ namespace Vocaluxe.Screens
_SelectSlides[_SelectSlideOptionsNumMedleySongs].AddValue(i.ToString()); _SelectSlides[_SelectSlideOptionsNumMedleySongs].AddValue(i.ToString());
} }
if (_SelectSlides[_SelectSlideOptionsNumMedleySongs].NumValues >= 5) if (_SelectSlides[_SelectSlideOptionsNumMedleySongs].NumValues >= 5)
_SelectSlides[_SelectSlideOptionsNumMedleySongs].SetSelectionByValueIndex(4); _SelectSlides[_SelectSlideOptionsNumMedleySongs].SelectedValue = "5";
else else
_SelectSlides[_SelectSlideOptionsNumMedleySongs].SetSelectionByValueIndex(_SelectSlides[_SelectSlideOptionsNumMedleySongs].NumValues - 1); _SelectSlides[_SelectSlideOptionsNumMedleySongs].SelectLastValue();
_SelectElement(_Buttons[_ButtonOptionsStartMedley]); _SelectElement(_Buttons[_ButtonOptionsStartMedley]);
} }
+8 -6
View File
@@ -29,8 +29,10 @@ namespace VocaluxeLib.Menu
get get
{ {
for (int team = 0; team < _NumTeams; team++) for (int team = 0; team < _NumTeams; team++)
{
if (_TeamList[team].Count < _NumPlayerTeams[team]) if (_TeamList[team].Count < _NumPlayerTeams[team])
return false; return false;
}
return true; return true;
} }
} }
@@ -350,7 +352,7 @@ namespace VocaluxeLib.Menu
IncreaseTeamNum(); IncreaseTeamNum();
} }
if (numPressed <= _SelectSlides[_SelectSlideTeams].NumValues) if (numPressed <= _SelectSlides[_SelectSlideTeams].NumValues)
_SelectSlides[_SelectSlideTeams].SetSelectionByValueIndex(numPressed - 1); _SelectSlides[_SelectSlideTeams].SelectedTag = numPressed;
} }
} }
if (_SelectingFastPlayerNr > 0 && _SelectingFastPlayerNr <= _NumPlayerTeams[_CurrentTeam]) if (_SelectingFastPlayerNr > 0 && _SelectingFastPlayerNr <= _NumPlayerTeams[_CurrentTeam])
@@ -488,7 +490,7 @@ namespace VocaluxeLib.Menu
else if (mouseEvent.RB) else if (mouseEvent.RB)
{ {
bool exit = true; bool exit = true;
if (_SelectSlides[_SelectSlidePlayer].Selected && _TeamList[_CurrentTeam].Count > 0) if (_SelectSlides[_SelectSlidePlayer].Selected && _TeamList[_CurrentTeam].Count > _SelectSlides[_SelectSlidePlayer].Selection)
{ {
int currentSelection = _SelectSlides[_SelectSlidePlayer].Selection; int currentSelection = _SelectSlides[_SelectSlidePlayer].Selection;
int id = _TeamList[_CurrentTeam][currentSelection]; int id = _TeamList[_CurrentTeam][currentSelection];
@@ -539,8 +541,8 @@ namespace VocaluxeLib.Menu
public override void LoadTheme(string xmlPath) public override void LoadTheme(string xmlPath)
{ {
base.LoadTheme(xmlPath); base.LoadTheme(xmlPath);
_SelectSlides[_SelectSlidePlayer].WithTextures = true; _SelectSlides[_SelectSlidePlayer].DrawTextures = true;
_SelectSlides[_SelectSlidePlayer].SelectionByHover = true; _SelectSlides[_SelectSlidePlayer].SelectByHovering = true;
_AddStatic(_ChooseAvatarStatic); _AddStatic(_ChooseAvatarStatic);
} }
@@ -684,7 +686,7 @@ namespace VocaluxeLib.Menu
_SelectSlides[_SelectSlidePlayer].AddValue("", _NameSelections[_NameSelection].TextureEmptyTile); _SelectSlides[_SelectSlidePlayer].AddValue("", _NameSelections[_NameSelection].TextureEmptyTile);
if (selection >= _TeamList[_CurrentTeam].Count) if (selection >= _TeamList[_CurrentTeam].Count)
selection = _TeamList[_CurrentTeam].Count - 1; selection = _TeamList[_CurrentTeam].Count - 1;
_SelectSlides[_SelectSlidePlayer].SetSelectionByValueIndex(selection); _SelectSlides[_SelectSlidePlayer].Selection = selection;
} }
private void _UpdateTeamSlide() private void _UpdateTeamSlide()
@@ -692,7 +694,7 @@ namespace VocaluxeLib.Menu
_SelectSlides[_SelectSlideTeams].Visible = _Teams; _SelectSlides[_SelectSlideTeams].Visible = _Teams;
_SelectSlides[_SelectSlideTeams].Clear(); _SelectSlides[_SelectSlideTeams].Clear();
for (int i = 1; i <= _NumTeams; i++) for (int i = 1; i <= _NumTeams; i++)
_SelectSlides[_SelectSlideTeams].AddValue("Team " + i); _SelectSlides[_SelectSlideTeams].AddValue("Team " + i, null, i);
} }
private void _UpdateButtonVisibility() private void _UpdateButtonVisibility()
+3 -6
View File
@@ -1145,12 +1145,9 @@ namespace VocaluxeLib.Menu
string t1 = CBase.Language.Translate(_Text1.Text).Replace("%a", song.Artist).Replace("%t", song.Title); string t1 = CBase.Language.Translate(_Text1.Text).Replace("%a", song.Artist).Replace("%t", song.Title);
_PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ t1; //TODO: Add text field for the number _PlaylistElements[i].Text1.Text = /*(Offset + i + 1) + ") " + */ t1; //TODO: Add text field for the number
_PlaylistElements[i].SelectSlide.Clear(); _PlaylistElements[i].SelectSlide.Clear();
for (int g = 0; g < pec.Modes.Count; g++) foreach (EGameMode gm in pec.Modes)
{ _PlaylistElements[i].SelectSlide.AddValue(Enum.GetName(typeof(EGameMode), gm), null, (int)gm);
_PlaylistElements[i].SelectSlide.AddValue(Enum.GetName(typeof(EGameMode), pec.Modes[g])); _PlaylistElements[i].SelectSlide.SelectedTag = (int)pec.Mode;
if (pec.Modes[g] == pec.Mode)
_PlaylistElements[i].SelectSlide.SetSelectionByValueIndex(g);
}
} }
else else
{ {
+178 -193
View File
@@ -17,6 +17,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Xml.Serialization; using System.Xml.Serialization;
using VocaluxeLib.Draw; using VocaluxeLib.Draw;
@@ -61,8 +62,23 @@ namespace VocaluxeLib.Menu
public int NumVisible; public int NumVisible;
} }
public sealed class CSelectSlide : CMenuElementBase, IMenuElement, ICloneable, IThemeable public sealed class CSelectSlide : CMenuElementBase, IMenuElement, IThemeable
{ {
private struct SValue
{
public string Text;
public int TranslationId;
public int Tag;
public CTextureRef Texture;
}
private class CElement
{
public CText Text;
public CStatic Img;
public SRectF Bounds;
}
private readonly int _PartyModeID; private readonly int _PartyModeID;
private SThemeSelectSlide _Theme; private SThemeSelectSlide _Theme;
@@ -138,52 +154,52 @@ namespace VocaluxeLib.Menu
} }
} }
} }
public bool ValueSelected public bool IsValueSelected
{ {
get { return Selected && !_ArrowLeftSelected && !_ArrowRightSelected; } get { return Selected && !_ArrowLeftSelected && !_ArrowRightSelected; }
} }
public bool SelectionByHover;
private bool _ArrowLeftSelected; private bool _ArrowLeftSelected;
private bool _ArrowRightSelected; private bool _ArrowRightSelected;
private readonly List<string> _ValueNames; public bool SelectByHovering;
private readonly List<int> _ValuePartyModeIDs; public bool DrawTextures;
private readonly List<CTextureRef> _Textures;
private readonly List<int> _ValueIndexes;
private readonly List<SRectF> _ValueBounds = new List<SRectF>();
public bool WithTextures;
private int _Selection = -1; private int _Selection = -1;
public int Selection public int Selection
{ {
get { return _Selection; } get { return _Selection; }
set { _Selection = value.Clamp(0, _ValueNames.Count - 1, false); } set
}
public string Value
{
get { return (_Selection >= 0 && _Selection < _ValueNames.Count) ? _ValueNames[_Selection] : null; }
}
public int ValueIndex
{
get
{ {
if (_Selection >= 0 && _ValueIndexes.Count > _Selection) value = value.Clamp(0, _Values.Count - 1, false);
return _ValueIndexes[_Selection]; if (value == _Selection)
return -1; return;
_Selection = value;
_Invalidate();
} }
} }
public string SelectedValue
{
get { return _Selection >= 0 ? _Values[_Selection].Text : null; }
set { Selection = _Values.FindIndex(val => val.Text == value); }
}
public int SelectedTag
{
get { return _Selection >= 0 ? _Values[_Selection].Tag : -1; }
set { Selection = _Values.FindIndex(val => val.Tag == value); }
}
public int NumValues public int NumValues
{ {
get { return _ValueNames.Count; } get { return _Values.Count; }
} }
private readonly List<SValue> _Values = new List<SValue>();
private readonly List<CElement> _VisibleElements = new List<CElement>();
private bool _NeedsRevalidate = true;
private int _NumVisible = -1; private int _NumVisible = -1;
private CTextureRef _Texture; private CTextureRef _Texture;
private CTextureRef _TextureArrowLeft; private CTextureRef _TextureArrowLeft;
@@ -197,10 +213,11 @@ namespace VocaluxeLib.Menu
get { return _NumVisible; } get { return _NumVisible; }
set set
{ {
if (value > 0) if (value <= 0 || value == _NumVisible)
_NumVisible = value; return;
_NumVisible = value;
_ValueBounds.Clear(); _Invalidate();
} }
} }
@@ -210,11 +227,6 @@ namespace VocaluxeLib.Menu
ThemeLoaded = false; ThemeLoaded = false;
_TextH = 1f; _TextH = 1f;
_MaxW = 0f; _MaxW = 0f;
_Textures = new List<CTextureRef>();
_ValueIndexes = new List<int>();
_ValueNames = new List<string>();
_ValuePartyModeIDs = new List<int>();
} }
public CSelectSlide(CSelectSlide slide) public CSelectSlide(CSelectSlide slide)
@@ -241,15 +253,11 @@ namespace VocaluxeLib.Menu
_TextRelativeY = slide._TextRelativeY; _TextRelativeY = slide._TextRelativeY;
_MaxW = slide._MaxW; _MaxW = slide._MaxW;
_Textures = new List<CTextureRef>(slide._Textures); _Values.AddRange(slide._Values);
_ValueIndexes = new List<int>(slide._ValueIndexes);
_ValueNames = new List<string>(slide._ValueNames);
_ValueBounds = new List<SRectF>(slide._ValueBounds);
_ValuePartyModeIDs = new List<int>(slide._ValuePartyModeIDs);
_Selection = slide._Selection; _Selection = slide._Selection;
_NumVisible = slide._NumVisible; _NumVisible = slide._NumVisible;
WithTextures = slide.WithTextures; DrawTextures = slide.DrawTextures;
Visible = slide.Visible; Visible = slide.Visible;
} }
@@ -258,11 +266,6 @@ namespace VocaluxeLib.Menu
_PartyModeID = partyModeID; _PartyModeID = partyModeID;
_Theme = theme; _Theme = theme;
_Textures = new List<CTextureRef>();
_ValueIndexes = new List<int>();
_ValueNames = new List<string>();
_ValuePartyModeIDs = new List<int>();
ThemeLoaded = true; ThemeLoaded = true;
} }
@@ -382,58 +385,53 @@ namespace VocaluxeLib.Menu
return ThemeLoaded; return ThemeLoaded;
} }
public void AddValue(string value) private void _Invalidate()
{ {
AddValue(value, _PartyModeID); _NeedsRevalidate = true;
} }
public void AddValue(string value, int partyModeID) /// <summary>
/// Adds an entry to the slide.
/// </summary>
/// <param name="text">Label to show</param>
/// <param name="texture">Texture to show</param>
/// <param name="tag">User value (e.g. id of entry)</param>
public void AddValue(string text, CTextureRef texture = null, int tag = 0)
{ {
AddValue(value, null, _ValueIndexes.Count, partyModeID); AddValue(text, _PartyModeID, texture, tag);
} }
public void AddValue(string value, CTextureRef texture) /// <summary>
/// Adds an entry to the slide.
/// </summary>
/// <param name="text">Label to show</param>
/// <param name="translationId">Translation id to use for the text</param>
/// <param name="texture">Texture to show</param>
/// <param name="tag">User value (e.g. id of entry)</param>
public void AddValue(string text, int translationId, CTextureRef texture = null, int tag = 0)
{ {
AddValue(value, texture, _ValueIndexes.Count, _PartyModeID); SValue value = new SValue {Text = text, TranslationId = translationId, Tag = tag, Texture = texture};
}
private void _AddValue(string value, CTextureRef texture, int valueIndex) _Values.Add(value);
{
AddValue(value, texture, valueIndex, _PartyModeID);
}
public void AddValue(string value, CTextureRef texture, int valueIndex, int partyModeID) if (Selection < 0)
{
_ValueNames.Add(value);
_Textures.Add(texture);
_ValueIndexes.Add(valueIndex);
_ValuePartyModeIDs.Add(partyModeID);
if (Selection == -1)
Selection = 0; Selection = 0;
_ValueBounds.Clear(); _Invalidate();
} }
public void AddValues(IEnumerable<string> values) public void AddValues(IEnumerable<string> values)
{ {
foreach (string value in values) foreach (string value in values)
_AddValue(value, null, _PartyModeID); AddValue(value);
_ValueBounds.Clear();
} }
public void AddValues(string[] values, CTextureRef[] textures) public void AddValues(string[] values, CTextureRef[] textures)
{ {
if (values.Length != textures.Length) Debug.Assert(values.Length == textures.Length);
return;
for (int i = 0; i < values.Length; i++) for (int i = 0; i < values.Length; i++)
AddValue(values[i], textures[i]); AddValue(values[i], textures[i]);
if (Selection == -1)
Selection = 0;
_ValueBounds.Clear();
} }
public void SetValues<T>(int selection) public void SetValues<T>(int selection)
@@ -447,31 +445,20 @@ namespace VocaluxeLib.Menu
RenameValue(Selection, newName); RenameValue(Selection, newName);
} }
public void RenameValue(int selection, string newName, CTextureRef newTexture = null) public void RenameValue(int index, string newName, CTextureRef newTexture = null)
{ {
if (selection < 0 && selection >= _ValueNames.Count) if (index < 0 && index >= _Values.Count)
return; return;
_ValueNames[selection] = newName; SValue value = _Values[index];
_Textures[selection] = newTexture; value.Text = newName;
} value.Texture = newTexture;
_Values[index] = value;
public bool SetSelectionByValueIndex(int valueIndex)
{
for (int i = 0; i < _ValueIndexes.Count; i++)
{
if (_ValueIndexes[i] == valueIndex)
{
Selection = i;
return true;
}
}
return false;
} }
public bool SelectNextValue() public bool SelectNextValue()
{ {
if (Selection < _ValueNames.Count - 1) if (Selection < _Values.Count - 1)
{ {
Selection++; Selection++;
return true; return true;
@@ -491,50 +478,46 @@ namespace VocaluxeLib.Menu
public void SelectFirstValue() public void SelectFirstValue()
{ {
if (_ValueNames.Count > 0) if (_Values.Count > 0)
Selection = 0; Selection = 0;
} }
public void SelectLastValue() public void SelectLastValue()
{ {
if (_ValueNames.Count > 0) if (_Values.Count > 0)
Selection = _ValueNames.Count - 1; Selection = _Values.Count - 1;
} }
public void Clear() public void Clear()
{ {
_Values.Clear();
_Selection = -1; _Selection = -1;
_ValueNames.Clear(); _Invalidate();
_Textures.Clear(); }
_ValueBounds.Clear();
_ValueIndexes.Clear(); private int _GetCurOffset()
{
int offset = _Selection - _NumVisible / 2;
return offset.Clamp(0, _Values.Count - _NumVisible, true);
}
private void _SelectAtPos(int x, int y)
{
if (_NeedsRevalidate)
_Revalidate();
int index = _VisibleElements.FindIndex(el => CHelper.IsInBounds(el.Bounds, x, y));
if (index < 0)
return;
Selection = index + _GetCurOffset();
} }
public void ProcessMouseMove(int x, int y) public void ProcessMouseMove(int x, int y)
{ {
_ArrowLeftSelected = CHelper.IsInBounds(RectArrowLeft, x, y) && _Selection > 0; _ArrowLeftSelected = CHelper.IsInBounds(RectArrowLeft, x, y) && _Selection > 0;
_ArrowRightSelected = CHelper.IsInBounds(RectArrowRight, x, y) && _Selection < _ValueNames.Count - 1; _ArrowRightSelected = CHelper.IsInBounds(RectArrowRight, x, y) && _Selection < _Values.Count - 1;
if (SelectionByHover) if (SelectByHovering)
{ _SelectAtPos(x, y);
for (int i = 0; i < _ValueBounds.Count; i++)
{
if (CHelper.IsInBounds(_ValueBounds[i], x, y))
{
int offset = _Selection - _NumVisible / 2;
if (_ValueNames.Count - _NumVisible - offset < 0)
offset = _ValueNames.Count - _NumVisible;
if (offset < 0)
offset = 0;
Selection = i + offset;
_ValueBounds.Clear();
break;
}
}
}
} }
public void ProcessMouseLBClick(int x, int y) public void ProcessMouseLBClick(int x, int y)
@@ -547,21 +530,78 @@ namespace VocaluxeLib.Menu
if (_ArrowRightSelected) if (_ArrowRightSelected)
SelectNextValue(); SelectNextValue();
for (int i = 0; i < _ValueBounds.Count; i++) _SelectAtPos(x, y);
}
private void _Revalidate()
{
if (!_NeedsRevalidate)
return;
_NeedsRevalidate = false;
int numvis = Math.Min(_NumVisible, _Values.Count);
if (numvis != _VisibleElements.Count)
{ {
if (CHelper.IsInBounds(_ValueBounds[i], x, y)) _VisibleElements.Clear();
for (int i = 0; i < numvis; i++)
{ {
int offset = _Selection - _NumVisible / 2; var el = new CElement
{
Text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", _PartyModeID),
Img = new CStatic(_PartyModeID)
};
_VisibleElements.Add(el);
}
}
if (numvis == 0)
return;
if (_ValueNames.Count - _NumVisible - offset < 0) float elWidth = (Rect.W - _TextRelativeX * 2) / numvis;
offset = _ValueNames.Count - _NumVisible; //Center point of the first entry
float xStart = Rect.X + _TextRelativeX + elWidth / 2f;
if (offset < 0) int offset = _GetCurOffset();
offset = 0;
Selection = i + offset; for (int i = 0; i < numvis; i++)
_ValueBounds.Clear(); {
break; CText text = _VisibleElements[i].Text;
RectangleF textBounds;
float curX = xStart + elWidth * i;
if (String.IsNullOrEmpty(_Values[i + offset].Text))
{
text.Visible = false;
textBounds = new RectangleF();
}
else
{
text.Visible = true;
text.Text = _Values[i + offset].Text;
text.TranslationID = _Values[i + offset].TranslationId;
text.Color = (i + offset == Selection) ? _SelTextColor : _TextColor;
textBounds = CBase.Fonts.GetTextBounds(text);
text.X = curX;
text.Z = Rect.Z;
}
CStatic img = _VisibleElements[i].Img;
if (!DrawTextures || _Values[i + offset].Texture == null)
{
if (text.Visible)
text.Y = Rect.Y + (Rect.H - textBounds.Height) / 2 - _TextRelativeY;
img.Visible = false;
_VisibleElements[i].Bounds = new SRectF(text.X - textBounds.Width / 2f, text.Y, textBounds.Width, textBounds.Height, Rect.Z);
}
else
{
text.Y = (int)(Rect.Y + Rect.H - textBounds.Height - _TextRelativeY);
img.Texture = _Values[i + offset].Texture;
float alpha = (i + offset == _Selection) ? 1f : 0.35f;
img.Color = new SColorF(1f, 1f, 1f, alpha);
float size = Rect.H - textBounds.Height - 2 * _TextRelativeY;
if (size > elWidth)
size = elWidth;
var imgRect = new SRectF(curX - size / 2, Rect.Y + _TextRelativeY, size, size, Rect.Z);
img.MaxRect = imgRect;
_VisibleElements[i].Bounds = imgRect;
} }
} }
} }
@@ -584,7 +624,7 @@ namespace VocaluxeLib.Menu
CBase.Drawing.DrawTexture(_TextureArrowLeft, RectArrowLeft, _ColorArrow); CBase.Drawing.DrawTexture(_TextureArrowLeft, RectArrowLeft, _ColorArrow);
} }
if (_Selection < _ValueNames.Count - 1 || CBase.Settings.GetProgramState() == EProgramState.EditTheme) if (_Selection < _Values.Count - 1 || CBase.Settings.GetProgramState() == EProgramState.EditTheme)
{ {
if (_ArrowRightSelected) if (_ArrowRightSelected)
CBase.Drawing.DrawTexture(_SelTextureArrowRight, RectArrowRight, _SelColorArrow); CBase.Drawing.DrawTexture(_SelTextureArrowRight, RectArrowRight, _SelColorArrow);
@@ -592,63 +632,12 @@ namespace VocaluxeLib.Menu
CBase.Drawing.DrawTexture(_TextureArrowRight, RectArrowRight, _ColorArrow); CBase.Drawing.DrawTexture(_TextureArrowRight, RectArrowRight, _ColorArrow);
} }
if (_NumVisible < 1 || _ValueNames.Count == 0) if (_NeedsRevalidate)
return; _Revalidate();
foreach (CElement element in _VisibleElements)
float x = Rect.X + (Rect.W - _TextRelativeX) * 0.1f;
float dx = (Rect.W - _TextRelativeX) * 0.8f / _NumVisible;
//float y = Rect.Y + (Rect.H - TextH);
int offset = _Selection - _NumVisible / 2;
if (_ValueNames.Count - _NumVisible - offset < 0)
offset = _ValueNames.Count - _NumVisible;
if (offset < 0)
offset = 0;
int numvis = _NumVisible;
if (_ValueNames.Count < numvis)
numvis = _ValueNames.Count;
_ValueBounds.Clear();
for (int i = 0; i < numvis; i++)
{ {
var text = new CText(0, 0, 0, _TextH, _MaxW, EAlignment.Center, _Theme.TextStyle, _Theme.TextFont, _TextColor, "T", element.Text.Draw();
_ValuePartyModeIDs[i + offset]); element.Img.Draw();
if (_ValueNames[i + offset] != "")
text.Text = _ValueNames[i + offset];
else
text.Visible = false;
var alpha = new SColorF(1f, 1f, 1f, 0.35f);
if (i + offset == _Selection)
{
text.Color = _SelTextColor;
alpha = new SColorF(1f, 1f, 1f, 1f);
}
RectangleF bounds = CBase.Fonts.GetTextBounds(text);
text.X = (x + dx / 2f + dx * i) + _TextRelativeX;
if (!WithTextures)
text.Y = (int)((Rect.Y + (Rect.H - bounds.Height) / 2) + _TextRelativeY);
else
text.Y = (int)((Rect.Y + (Rect.H - bounds.Height)) + _TextRelativeY);
text.Z = Rect.Z;
text.Draw();
if (WithTextures)
{
float dh = text.Y - Rect.Y - Rect.H * 0.1f;
var rect = new SRectF(text.X - dh / 2, Rect.Y + Rect.H * 0.05f, dh, dh, Rect.Z);
CBase.Drawing.DrawTexture(_Textures[i + offset], rect, alpha, rect);
_ValueBounds.Add(rect);
}
else
_ValueBounds.Add(new SRectF(text.X - bounds.Width / 2f, text.Y, bounds.Width, bounds.Height, Rect.Z));
} }
} }
@@ -686,6 +675,7 @@ namespace VocaluxeLib.Menu
_SelTexture = CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID); _SelTexture = CBase.Themes.GetSkinTexture(_Theme.SkinSelected, _PartyModeID);
_SelTextureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SkinArrowLeftSelected, _PartyModeID); _SelTextureArrowLeft = CBase.Themes.GetSkinTexture(_Theme.SkinArrowLeftSelected, _PartyModeID);
_SelTextureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SkinArrowRightSelected, _PartyModeID); _SelTextureArrowRight = CBase.Themes.GetSkinTexture(_Theme.SkinArrowRightSelected, _PartyModeID);
_Invalidate();
} }
public void ReloadSkin() public void ReloadSkin()
@@ -694,11 +684,6 @@ namespace VocaluxeLib.Menu
LoadSkin(); LoadSkin();
} }
public object Clone()
{
return MemberwiseClone();
}
#region ThemeEdit #region ThemeEdit
public void MoveElement(int stepX, int stepY) public void MoveElement(int stepX, int stepY)
{ {