From 77f2e17d47f3f88444c3a5a154752cb33c13aa7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20K=C3=BCpper?= Date: Sun, 22 Dec 2013 00:07:43 +0100 Subject: [PATCH] Revert "Revert PartyNames-changes on develop-branch." This reverts commit 43545ac47f1a4229df01a9d9709c60d3b39c1a25. Conflicts: VocaluxeLib/Menu/CNameSelection.cs --- .../Screens/PartyScreenChallengeNames.xml | 330 +++++++++- .../PartyModes/Challenge/Textures/Minus.png | Bin 0 -> 3116 bytes .../Challenge/Textures/PlayerSelector.png | Bin 0 -> 1086 bytes Output/PartyModes/Challenge/Textures/Plus.png | Bin 0 -> 6333 bytes Output/PartyModes/Challenge/Textures/Skin.xml | 5 +- .../Screens/PartyScreenTicTacToeNames.xml | 482 ++++++++------ .../PartyModes/TicTacToe/Textures/Minus.png | Bin 0 -> 3116 bytes .../TicTacToe/Textures/PlayerSelector.png | Bin 0 -> 1086 bytes Output/PartyModes/TicTacToe/Textures/Plus.png | Bin 0 -> 6333 bytes Output/PartyModes/TicTacToe/Textures/Skin.xml | 5 +- .../CPartyScreenChallengeNames.cs | 358 +--------- .../PartyModeTicTacToe/CPartyModeTicTacToe.cs | 12 + .../CPartyScreenTicTacToeNames.cs | 548 +--------------- Vocaluxe/Base/CMain.cs | 15 + Vocaluxe/Base/CProfiles.cs | 10 - Vocaluxe/Screens/CScreenNames.cs | 6 + VocaluxeLib/IBasic.cs | 3 + VocaluxeLib/Menu/CMenuPartyNameSelection.cs | 612 ++++++++++++++++++ VocaluxeLib/Menu/CNameSelection.cs | 29 +- VocaluxeLib/Menu/CSelectSlide.cs | 25 +- VocaluxeLib/PartyModes/CPartyMode.cs | 10 + VocaluxeLib/PartyModes/IPartyMode.cs | 2 + VocaluxeLib/Profile/CProfile.cs | 10 + VocaluxeLib/VocaluxeLib.csproj | 1 + 24 files changed, 1351 insertions(+), 1112 deletions(-) create mode 100644 Output/PartyModes/Challenge/Textures/Minus.png create mode 100644 Output/PartyModes/Challenge/Textures/PlayerSelector.png create mode 100644 Output/PartyModes/Challenge/Textures/Plus.png create mode 100644 Output/PartyModes/TicTacToe/Textures/Minus.png create mode 100644 Output/PartyModes/TicTacToe/Textures/PlayerSelector.png create mode 100644 Output/PartyModes/TicTacToe/Textures/Plus.png create mode 100644 VocaluxeLib/Menu/CMenuPartyNameSelection.cs diff --git a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml index 42fb5218..c87205b7 100644 --- a/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml +++ b/Output/PartyModes/Challenge/Screens/PartyScreenChallengeNames.xml @@ -57,7 +57,7 @@ - + Button @@ -65,7 +65,7 @@ Button 985 - 600 + 625 0,00 150 50 @@ -122,7 +122,7 @@ Button 145 - 600 + 625 0,00 150 50 @@ -172,17 +172,17 @@ 26 - + - CoverTile + Plus - CoverTile + Plus - 0 - 0 + 145 + 1200 0,00 - 100 - 100 + 40 + 40 ButtonColor @@ -191,12 +191,12 @@ ButtonSColor - 50 - 102 + 75 + 10 - 20 + 27 - 98 + 142 ButtonTextColor @@ -220,18 +220,18 @@ - - + + - CoverTile + Minus - CoverTile + Minus - 0 - 0 + 145 + 1200 0,00 - 100 - 100 + 40 + 40 ButtonColor @@ -240,12 +240,12 @@ ButtonSColor - 50 - 102 + 75 + 10 - 20 + 27 - 98 + 142 ButtonTextColor @@ -269,6 +269,282 @@ - + + + + Plus + + Plus + + 145 + 1200 + 0,00 + 40 + 40 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 27 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + Minus + + Minus + + 145 + 1200 + 0,00 + 40 + 40 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 27 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 40 + 100 + 0,00 + 1200 + 50 + + 45 + 105 + 0,00 + 40 + 40 + + 1170 + 105 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 27,00 + + + + 205,33 + + Outline + + Bold + + 2 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlidePlayer + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlidePlayer + + 40 + 160 + 0,00 + 1200 + 150 + + 45 + 210 + 0,00 + 40 + 40 + + 1170 + 210 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 27,00 + + + -5,00 + + 205,33 + + Outline + + Bold + + 8 + + + + 42 + 327 + 0,00 + 1200 + 393 + + CoverTile + + + 1,00 + 1,00 + 1,00 + 0,20 + + PlayerSelector + + + + 100 + 100 + + 10 + 2 + + 20,71 + 30,00 + + + + 2,0 + + Outline + + TextColor + + + + 17 + + + diff --git a/Output/PartyModes/Challenge/Textures/Minus.png b/Output/PartyModes/Challenge/Textures/Minus.png new file mode 100644 index 0000000000000000000000000000000000000000..9bdede57bfffd4f9a472430bd7976dd102b6f5cb GIT binary patch literal 3116 zcmeHJ={pn(A01?w8lgc(Xv}1qMAzPsjAbw*#x_*8?wBF6WEpEz$}+NN7nixrr0mPQ zRQ4r8Wtog*&vG%!z9f0w_b<2~-w*fqJm+_w^ZW37&T~GUSPQ(d;Bm?0002M`hs9VO zarfU4;5phk(N3iR0QZ4~DZ%haMm~zfU@#pW9p~iE6%`hdUC6Vuv!bG+Y3XSM0)fS1 zsi~>e*49!el+Dde5C{|>A8%@A+Sk{oprBA%TI%WH$>DIMq@;55avdBT#>U39wY3`> z8^XfEejfZh`v33zo525P0#5*P%@_lq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4IR&?<#E^+;P^ zX5%<#`tl!ayQuCF#kr4j5#-HB_M8t;))<)ED1y zH9LJpdF-48Ob_A2p1g*kFRG)ONLR77BLd%LIyQ_K3iPMJyH{9aKAm#(cy zJ55=>alCEC7=cZ<-MJAniSp6>?o!VKi_^UOkx#nuHL}4}X>-e{_QUEvA5r&c0uzZ-(sm3Z`Nacpxrg| zbM>%^$rQ_<$t0SGS6xOjxhCw(x2-jrxa5aKv6amh=b+bOLB5o$3Q!fuWR-K{to?U4 z#Xp#3(0P<*xMSHlSx$u0x^C>7E(zi6zP*NVqfX3z?_&L^46J3C5uoauJ|*}d2++ME2trW;+`lXVat7``5n zcJ4MJJEzKOz({6;b;W8Kxjd!x#Fm>lFPcDi8fgyB_Dy<@-NRDT>i3ljNeR382#$GY-Bb>akukWP?8$>hXD-r$Y^1rvNQ(!BqXkGlD(>^>zSea8@l;nbkY zi^qJ^bDoTQRG)2gF&%^x(KVb}y=B@0ju48uCmo=bcgP0ZDrtl-c~Tw~LZ?d{GVr7Q;!*DgSpka-FYTFt=tQm|$3FFm zCN&^@3%9jNaltrvb)xHSZjGF_UifuXV*ofqJf>X#_ecK)h(CK% literal 0 HcmV?d00001 diff --git a/Output/PartyModes/Challenge/Textures/PlayerSelector.png b/Output/PartyModes/Challenge/Textures/PlayerSelector.png new file mode 100644 index 0000000000000000000000000000000000000000..c57ab300c6f81daf0fa108e731ea9f8864af7f7e GIT binary patch literal 1086 zcmeAS@N?(olHy`uVBq!ia0vp^zd)FS4M=vpiLwP!jKx9jP7LeL$-D$|*pj^6U4S$Y z{B+)352QE?JR*x37`TN&n2}-D90{Nxdx@v7EBhT5MiD*UuHKV5Kq1-8kcblJ{M_8s zyb>Unfx)>bHL)Z$MWH;iBtya7(>EYRFO{8vfqAN@i(^Q|t+%%f{iFj$+AjWgD_M5* z^@63v?^O>dd3fn7q<&EPAarNxg2hYE2`yl~HC-t=MOu1|hSHfAbGXv}%+ju{IzP{o zq2b?ZXZssb(yEr;M!rU#MOif;9=@A&MxHVa->RI{Ik{Bw@N#4SPkUF% z{j>UV?N;Ta?9DCy?-#8S`<+*JQ@CR5wRJ9hdkgPI?ao^J_RgOEZ#usouHf6dIqTc& z-R|YbOC|0Z?%Sqh?^%@ZccJ?6SNRv)_AfqvhMg^OTe185d6VsD@$($}_{#G4ufDo8 zJp&DW-}V1r+1VBp&XoUC{~=9TtCk2@DU>+8Xt=<*klBg7g^xoPgi!=x5->r>7j6s?r7#i3h0O^45J5CU z1+35vCDJA&cM)qYy3>H(!t?=}xd@Ly0|ASB(apv1a>E5j7IK05qHk;S0(QJwK(ooZtj#P7jqH}`c}Wn zeEi~G?2OsGJcnvTe;(_*_x6>#=ex5URrxWY{HyEDz(1KdYfeXDSTo1Mtzxw z3$MF>JNoTtt^S!BVe2pYpVr+Cf3-Gr?bgpK*PpTPwOFVB?QYFy(HnUWZ@lB1UnMTT zU-aj0>tEO2*?ARBOPQ52>B*IzhllSzJujVqT4np|{tFBZ3xD%6HRiFe7S=op%DJAd KelF{r5}E*YeWUFF literal 0 HcmV?d00001 diff --git a/Output/PartyModes/Challenge/Textures/Plus.png b/Output/PartyModes/Challenge/Textures/Plus.png new file mode 100644 index 0000000000000000000000000000000000000000..5b813c530797fc8bb14b5224a76721f1d97e19b2 GIT binary patch literal 6333 zcmeHL=Q|q!_qF#HLD5Fh*sFHXSd|#DSFGAKYOkV7)g~misupQg5w&VJYSgTkP>L8e ztF@`7g#P;e7rzhheV%jgbMA-x+;cvjbaR9uE7LV53JMBVI85L2-yHrg7^wgC(iE3E z3JR)Aa}#TWfAr~-r~3N(0|Nu1Vxrh8tf!af#>NH!0LU-Mx3;#PnVC^iQfg^w2@elH zJw0V%VadwMGBGt7A0L;NmaeO-3-Axv-Q5)w6fApQ=H%o=BoZ|>HM@JdfNp*D{x5MiHq@s`qZNYvBaFc?hcF5XcDMh6^39!U z-+xQ`aJZ=fJ&}c;TUmmAcLPsB!J`h>*RhUX*mGviE7btlLiM3Ko>ezH|NeDdJ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DPhn>Ufi&qNv-OaSQMBRFSd@Gh)%6O|{UoJ^HyDxn zK3=@F2M=Uk%&}N&=|QIu-GHO$_ObQYGL!$i3hX_LU_MzIh(4$<8Vj2-c-vlLg=(HLclE zJNV(Rb8zB!{J|1~P1F}wTLF+0u2;H5+IN=- z5G5$VJe<~c&?~kq)0K)dFUqAD*@|g{}7w3tTQuF_a0xN7(vLO zuK3_$J?74}C7nytBc9SSGnTf}x?yCBTxcjLC%qc~ZD()9y)j)ln&zr4p9jEm5{}Vt zpyc=e!W7&h2SLM1d6FM&5TWBEORdp`EqLQvI~e#HJaVz62-;@zPY9KyC7?kz^veDt z_wlm6^)`^=(S+MyyhLG09^RLrT%WqvaMjMyj)UvRuqURYuPA6u=BIc1F|752)pwCj z)3zR_lP6ja6pG_A@gSLwm8*fv*_}2;e7ra#hN+sUG;6}bz~AijrEuk2^YTt#Q{}MNIdHn)4Q(!zt)x_bD@yVC(mU$@uefk?1TEtk`|z8;w|V~F zyQBKHzi92o58X*i|6}Wr?}b-H-zOUSo-;Es6WH5SD?6|6+cc^1rPniJnm}!8Y1d-R zQ?ngyevPcj3!QeDY6EFP@}d^^A4!`WO_c wDjJVgs@eMzo6jKHD$nqYpYTUP0aw((cl!oM`O8`Va#aer0YV?Ad+*8r0WNL0r~m)} literal 0 HcmV?d00001 diff --git a/Output/PartyModes/Challenge/Textures/Skin.xml b/Output/PartyModes/Challenge/Textures/Skin.xml index 4912e998..b2ea588c 100644 --- a/Output/PartyModes/Challenge/Textures/Skin.xml +++ b/Output/PartyModes/Challenge/Textures/Skin.xml @@ -148,8 +148,11 @@ ScrollUp.png ScrollDown.png Invisible.png + PlayerSelector.png + Plus.png + Minus.png [Blue]BG_Video.mp4 - \ No newline at end of file + diff --git a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml index 2e73b1b1..00a64260 100644 --- a/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml +++ b/Output/PartyModes/TicTacToe/Screens/PartyScreenTicTacToeNames.xml @@ -57,163 +57,7 @@ - - - - 58 - 375 - - -1,00 - - 20 - - - - Player1 - - - TextSColor - - Center - - Center - - - - Outline - - TR_SCREENNAMES_TEAM1 - - - - - - - 58 - 500 - - -1,00 - - 20 - - - - Player2 - - - TextSColor - - Center - - Center - - - - Outline - - TR_SCREENNAMES_TEAM2 - - - - - - - ScrollUp - - ScrollUp - - 609 - 90 - -0,01 - 28 - 15 - - - ButtonColor - - - ButtonSColor - - - 75 - 10 - - 27 - - 142 - - - ButtonTextColor - - - ButtonTextSColor - - Center - - Center - - - - Outline - - - - - - - - - - - - - ScrollDown - - ScrollDown - - 609 - 345 - -0,01 - 28 - 15 - - - ButtonColor - - - ButtonSColor - - - 75 - 10 - - 27 - - 142 - - - ButtonTextColor - - - ButtonTextSColor - - Center - - Center - - - - Outline - - - - - - - - - - + Button @@ -328,17 +172,17 @@ 26 - + - CoverTile + Plus - CoverTile + Plus - 0 - 0 + 145 + 1200 0,00 - 100 - 100 + 40 + 40 ButtonColor @@ -347,12 +191,12 @@ ButtonSColor - 50 - 102 + 75 + 10 - 20 + 27 - 98 + 142 ButtonTextColor @@ -376,18 +220,18 @@ - - + + - CoverTile + Minus - CoverTile + Minus - 0 - 0 + 145 + 1200 0,00 - 100 - 100 + 40 + 40 ButtonColor @@ -396,12 +240,12 @@ ButtonSColor - 50 - 102 + 75 + 10 - 20 + 27 - 98 + 142 ButtonTextColor @@ -425,6 +269,282 @@ - + + + + Plus + + Plus + + 145 + 1200 + 0,00 + 40 + 40 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 27 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + Minus + + Minus + + 145 + 1200 + 0,00 + 40 + 40 + + + ButtonColor + + + ButtonSColor + + + 75 + 10 + + 27 + + 142 + + + ButtonTextColor + + + ButtonTextSColor + + Center + + Center + + + + Outline + + + + + + + + + + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlide + + 40 + 100 + 0,00 + 1200 + 50 + + 45 + 105 + 0,00 + 40 + 40 + + 1170 + 105 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 27,00 + + + + 205,33 + + Outline + + Bold + + 2 + + + + Invisible + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlidePlayer + + SelectSlideArrowLeft + + SelectSlideArrowRight + + SelectSlidePlayer + + 40 + 160 + 0,00 + 1200 + 150 + + 45 + 210 + 0,00 + 40 + 40 + + 1170 + 210 + 0,00 + 40 + 40 + + + SelectSlideColor + + + SelectSlideSColor + + + SelectSlideHColor + + + ArrowColor + + + ArrowSColor + + + TextColor + + + TextSColor + + 27,00 + + + -5,00 + + 205,33 + + Outline + + Bold + + 8 + + + + 42 + 327 + 0,00 + 1200 + 393 + + CoverTile + + + 1,00 + 1,00 + 1,00 + 0,20 + + PlayerSelector + + + + 100 + 100 + + 10 + 2 + + 20,71 + 30,00 + + + + 2,0 + + Outline + + TextColor + + + + 17 + + + diff --git a/Output/PartyModes/TicTacToe/Textures/Minus.png b/Output/PartyModes/TicTacToe/Textures/Minus.png new file mode 100644 index 0000000000000000000000000000000000000000..9bdede57bfffd4f9a472430bd7976dd102b6f5cb GIT binary patch literal 3116 zcmeHJ={pn(A01?w8lgc(Xv}1qMAzPsjAbw*#x_*8?wBF6WEpEz$}+NN7nixrr0mPQ zRQ4r8Wtog*&vG%!z9f0w_b<2~-w*fqJm+_w^ZW37&T~GUSPQ(d;Bm?0002M`hs9VO zarfU4;5phk(N3iR0QZ4~DZ%haMm~zfU@#pW9p~iE6%`hdUC6Vuv!bG+Y3XSM0)fS1 zsi~>e*49!el+Dde5C{|>A8%@A+Sk{oprBA%TI%WH$>DI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bU>T=;f*CMwwA?A0(we3ImE1R##m7!S+?34|j*7ljXGmC|?)4IR&?<#E^+;P^ zX5%<#`tl!ayQuCF#kr4j5#-HB_M8t;))<)ED1y zH9LJpdF-48Ob_A2p1g*kFRG)ONLR77BLd%LIyQ_K3iPMJyH{9aKAm#(cy zJ55=>alCEC7=cZ<-MJAniSp6>?o!VKi_^UOkx#nuHL}4}X>-e{_QUEvA5r&c0uzZ-(sm3Z`Nacpxrg| zbM>%^$rQ_<$t0SGS6xOjxhCw(x2-jrxa5aKv6amh=b+bOLB5o$3Q!fuWR-K{to?U4 z#Xp#3(0P<*xMSHlSx$u0x^C>7E(zi6zP*NVqfX3z?_&L^46J3C5uoauJ|*}d2++ME2trW;+`lXVat7``5n zcJ4MJJEzKOz({6;b;W8Kxjd!x#Fm>lFPcDi8fgyB_Dy<@-NRDT>i3ljNeR382#$GY-Bb>akukWP?8$>hXD-r$Y^1rvNQ(!BqXkGlD(>^>zSea8@l;nbkY zi^qJ^bDoTQRG)2gF&%^x(KVb}y=B@0ju48uCmo=bcgP0ZDrtl-c~Tw~LZ?d{GVr7Q;!*DgSpka-FYTFt=tQm|$3FFm zCN&^@3%9jNaltrvb)xHSZjGF_UifuXV*ofqJf>X#_ecK)h(CK% literal 0 HcmV?d00001 diff --git a/Output/PartyModes/TicTacToe/Textures/PlayerSelector.png b/Output/PartyModes/TicTacToe/Textures/PlayerSelector.png new file mode 100644 index 0000000000000000000000000000000000000000..c57ab300c6f81daf0fa108e731ea9f8864af7f7e GIT binary patch literal 1086 zcmeAS@N?(olHy`uVBq!ia0vp^zd)FS4M=vpiLwP!jKx9jP7LeL$-D$|*pj^6U4S$Y z{B+)352QE?JR*x37`TN&n2}-D90{Nxdx@v7EBhT5MiD*UuHKV5Kq1-8kcblJ{M_8s zyb>Unfx)>bHL)Z$MWH;iBtya7(>EYRFO{8vfqAN@i(^Q|t+%%f{iFj$+AjWgD_M5* z^@63v?^O>dd3fn7q<&EPAarNxg2hYE2`yl~HC-t=MOu1|hSHfAbGXv}%+ju{IzP{o zq2b?ZXZssb(yEr;M!rU#MOif;9=@A&MxHVa->RI{Ik{Bw@N#4SPkUF% z{j>UV?N;Ta?9DCy?-#8S`<+*JQ@CR5wRJ9hdkgPI?ao^J_RgOEZ#usouHf6dIqTc& z-R|YbOC|0Z?%Sqh?^%@ZccJ?6SNRv)_AfqvhMg^OTe185d6VsD@$($}_{#G4ufDo8 zJp&DW-}V1r+1VBp&XoUC{~=9TtCk2@DU>+8Xt=<*klBg7g^xoPgi!=x5->r>7j6s?r7#i3h0O^45J5CU z1+35vCDJA&cM)qYy3>H(!t?=}xd@Ly0|ASB(apv1a>E5j7IK05qHk;S0(QJwK(ooZtj#P7jqH}`c}Wn zeEi~G?2OsGJcnvTe;(_*_x6>#=ex5URrxWY{HyEDz(1KdYfeXDSTo1Mtzxw z3$MF>JNoTtt^S!BVe2pYpVr+Cf3-Gr?bgpK*PpTPwOFVB?QYFy(HnUWZ@lB1UnMTT zU-aj0>tEO2*?ARBOPQ52>B*IzhllSzJujVqT4np|{tFBZ3xD%6HRiFe7S=op%DJAd KelF{r5}E*YeWUFF literal 0 HcmV?d00001 diff --git a/Output/PartyModes/TicTacToe/Textures/Plus.png b/Output/PartyModes/TicTacToe/Textures/Plus.png new file mode 100644 index 0000000000000000000000000000000000000000..5b813c530797fc8bb14b5224a76721f1d97e19b2 GIT binary patch literal 6333 zcmeHL=Q|q!_qF#HLD5Fh*sFHXSd|#DSFGAKYOkV7)g~misupQg5w&VJYSgTkP>L8e ztF@`7g#P;e7rzhheV%jgbMA-x+;cvjbaR9uE7LV53JMBVI85L2-yHrg7^wgC(iE3E z3JR)Aa}#TWfAr~-r~3N(0|Nu1Vxrh8tf!af#>NH!0LU-Mx3;#PnVC^iQfg^w2@elH zJw0V%VadwMGBGt7A0L;NmaeO-3-Axv-Q5)w6fApQ=H%o=BoZ|>HM@JdfNp*D{x5MiHq@s`qZNYvBaFc?hcF5XcDMh6^39!U z-+xQ`aJZ=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*zlHf{b9vL*9!StFVswCbfosB zezvt>(y5dl+|Pl4i5Ic)m}L*Q)$%DPhn>Ufi&qNv-OaSQMBRFSd@Gh)%6O|{UoJ^HyDxn zK3=@F2M=Uk%&}N&=|QIu-GHO$_ObQYGL!$i3hX_LU_MzIh(4$<8Vj2-c-vlLg=(HLclE zJNV(Rb8zB!{J|1~P1F}wTLF+0u2;H5+IN=- z5G5$VJe<~c&?~kq)0K)dFUqAD*@|g{}7w3tTQuF_a0xN7(vLO zuK3_$J?74}C7nytBc9SSGnTf}x?yCBTxcjLC%qc~ZD()9y)j)ln&zr4p9jEm5{}Vt zpyc=e!W7&h2SLM1d6FM&5TWBEORdp`EqLQvI~e#HJaVz62-;@zPY9KyC7?kz^veDt z_wlm6^)`^=(S+MyyhLG09^RLrT%WqvaMjMyj)UvRuqURYuPA6u=BIc1F|752)pwCj z)3zR_lP6ja6pG_A@gSLwm8*fv*_}2;e7ra#hN+sUG;6}bz~AijrEuk2^YTt#Q{}MNIdHn)4Q(!zt)x_bD@yVC(mU$@uefk?1TEtk`|z8;w|V~F zyQBKHzi92o58X*i|6}Wr?}b-H-zOUSo-;Es6WH5SD?6|6+cc^1rPniJnm}!8Y1d-R zQ?ngyevPcj3!QeDY6EFP@}d^^A4!`WO_c wDjJVgs@eMzo6jKHD$nqYpYTUP0aw((cl!oM`O8`Va#aer0YV?Ad+*8r0WNL0r~m)} literal 0 HcmV?d00001 diff --git a/Output/PartyModes/TicTacToe/Textures/Skin.xml b/Output/PartyModes/TicTacToe/Textures/Skin.xml index 4965d2eb..9145b6bf 100644 --- a/Output/PartyModes/TicTacToe/Textures/Skin.xml +++ b/Output/PartyModes/TicTacToe/Textures/Skin.xml @@ -222,8 +222,11 @@ ScrollUp.png ScrollDown.png Invisible.png + PlayerSelector.png + Plus.png + Minus.png [Blue]BG_Video.mp4 - \ No newline at end of file + diff --git a/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs b/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs index 16b275de..203d54f2 100644 --- a/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs +++ b/PartyModes/PartyModeChallenge/CPartyScreenChallengeNames.cs @@ -25,7 +25,7 @@ using VocaluxeLib.Profile; namespace VocaluxeLib.PartyModes.Challenge { // ReSharper disable UnusedMember.Global - public class CPartyScreenChallengeNames : CMenuParty + public class CPartyScreenChallengeNames : CMenuPartyNameSelection // ReSharper restore UnusedMember.Global { // Version number for theme files. Increment it, if you've changed something on the theme files! @@ -34,58 +34,14 @@ namespace VocaluxeLib.PartyModes.Challenge get { return 1; } } - private const string _ButtonNext = "ButtonNext"; - private const string _ButtonBack = "ButtonBack"; - private const string _ButtonPlayerDestination = "ButtonPlayerDestination"; - private const string _ButtonPlayerChoose = "ButtonPlayerChoose"; - - private List _PlayerChooseButtons; - private List _PlayerDestinationButtons; - //PlayerDestinationButtons-Option - private const int _PlayerDestinationButtonsNumH = 3; - private const int _PlayerDestinationButtonsFirstX = 900; - private const int _PlayerDestinationButtonsFirstY = 105; - private const int _PlayerDestinationButtonsSpaceH = 15; - private const int _PlayerDestinationButtonsSpaceW = 25; - //PlayerChooseButtons-Option - private List _PlayerChooseButtonsVisibleProfiles; - private const int _PlayerChooseButtonsNumH = 7; - private const int _PlayerChooseButtonsNumW = 4; - private const int _PlayerChooseButtonsFirstX = 52; - private const int _PlayerChooseButtonsFirstY = 105; - private const int _PlayerChooseButtonsSpaceH = 15; - private const int _PlayerChooseButtonsSpaceW = 25; - private const int _PlayerChooseButtonsOffset = 0; - - private CStatic _ChooseAvatarStatic; - private bool _SelectingMouseActive; - private int _OldMouseX; - private int _OldMouseY; - private bool _ButtonsAdded; - - private int _NumPlayer = 4; - + private int _NumPlayer = 4; private SDataFromScreen _Data; - private class CPlayerChooseButton - { - public CButton Button; - public int ProfileID; - } - public override void Init() { base.Init(); - _ChooseAvatarStatic = GetNewStatic(); - _ChooseAvatarStatic.Visible = false; - - _PlayerChooseButtonsVisibleProfiles = new List(); - _Data.ScreenNames.ProfileIDs = new List(); - - _ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose}; - _Data = new SDataFromScreen(); var names = new SFromScreenNames {FadeBack = false, ProfileIDs = new List()}; _Data.ScreenNames = names; @@ -109,320 +65,24 @@ namespace VocaluxeLib.PartyModes.Challenge } } - public override bool HandleInput(SKeyEvent keyEvent) - { - base.HandleInput(keyEvent); - - if (keyEvent.KeyPressed) {} - else - { - switch (keyEvent.Key) - { - case Keys.Back: - case Keys.Escape: - _Back(); - break; - - case Keys.Enter: - if (_Buttons[_ButtonBack].Selected) - _Back(); - - if (_Buttons[_ButtonNext].Selected) - _Next(); - - if (!_OnAdd()) - _OnRemove(); - break; - - case Keys.Delete: - _OnRemove(); - break; - } - } - return true; - } - - public override bool HandleMouse(SMouseEvent mouseEvent) - { - base.HandleMouse(mouseEvent); - - //Check if LeftButton is hold and Select-Mode active - if (mouseEvent.LBH && _SelectingMouseActive) - { - //Update coords for Drag/Drop-Texture - _ChooseAvatarStatic.Rect.X += mouseEvent.X - _OldMouseX; - _ChooseAvatarStatic.Rect.Y += mouseEvent.Y - _OldMouseY; - _OldMouseX = mouseEvent.X; - _OldMouseY = mouseEvent.Y; - } - // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar - else if (_SelectingMouseActive) - { - //Reset variables - _SelectingMouseActive = false; - _ChooseAvatarStatic.Visible = false; - } - - if (mouseEvent.LB && _IsMouseOver(mouseEvent)) - { - if (_Buttons[_ButtonBack].Selected) - _Back(); - - if (_Buttons[_ButtonNext].Selected) - _Next(); - - if (!_OnAdd()) - _OnRemove(); - } - - if (mouseEvent.RB) - _Back(); - - return true; - } - public override void OnShow() { base.OnShow(); - - if (!_ButtonsAdded) - { - _AddButtonPlayerDestination(); - _AddButtonPlayerChoose(); - _ButtonsAdded = true; - } - - _UpdateButtonPlayerDestination(); - _UpdateButtonPlayerChoose(); - - _UpdateButtonNext(); + SetPartyModeData(_NumPlayer); } - public override bool UpdateGame() - { - return true; - } - - public override bool Draw() - { - base.Draw(); - if (_ChooseAvatarStatic.Visible) - _ChooseAvatarStatic.Draw(); - return true; - } - - private void _AddButtonPlayerDestination() - { - _Buttons[_ButtonPlayerDestination].Visible = false; - _PlayerDestinationButtons = new List(); - int row = 0; - int column = 0; - for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) - { - CButton b = GetNewButton(_Buttons[_ButtonPlayerDestination]); - b.Rect.X = _PlayerDestinationButtonsFirstX + column * (b.Rect.W + _PlayerDestinationButtonsSpaceH); - b.Rect.Y = _PlayerDestinationButtonsFirstY + row * (b.Rect.H + _PlayerDestinationButtonsSpaceW); - _PlayerDestinationButtons.Add(b); - column++; - if (column >= _PlayerDestinationButtonsNumH) - { - row++; - column = 0; - } - b.Visible = true; - b.Enabled = false; - _AddButton(b); - } - } - - private void _AddButtonPlayerChoose() - { - _Buttons[_ButtonPlayerChoose].Visible = false; - _PlayerChooseButtons = new List(); - int row = 0; - int column = 0; - for (int i = 1; i <= _PlayerChooseButtonsNumH * _PlayerChooseButtonsNumW; i++) - { - CButton b = GetNewButton(_Buttons[_ButtonPlayerChoose]); - b.Rect.X = _PlayerChooseButtonsFirstX + column * (b.Rect.W + _PlayerChooseButtonsSpaceH); - b.Rect.Y = _PlayerChooseButtonsFirstY + row * (b.Rect.H + _PlayerChooseButtonsSpaceW); - var pcb = new CPlayerChooseButton {Button = b, ProfileID = -1}; - _PlayerChooseButtons.Add(pcb); - column++; - if (column >= _PlayerChooseButtonsNumH) - { - row++; - column = 0; - } - b.Visible = true; - b.Enabled = false; - _AddButton(b); - } - } - - private void _UpdateButtonPlayerChoose() - { - _UpdateVisibleProfiles(); - if ((_PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH) * (_PlayerChooseButtonsOffset + 1) - _PlayerChooseButtonsVisibleProfiles.Count >= - (_PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH) * _PlayerChooseButtonsOffset) - _UpdateButtonPlayerChoose(_PlayerChooseButtonsOffset - 1); - else - _UpdateButtonPlayerChoose(_PlayerChooseButtonsOffset); - } - - private void _UpdateButtonPlayerChoose(int offset) - { - const int numButtonPlayerChoose = _PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH; - if (offset < 0) - offset = 0; - - if (numButtonPlayerChoose * (offset + 1) - _PlayerChooseButtonsVisibleProfiles.Count <= numButtonPlayerChoose) - { - for (int i = 0; i < numButtonPlayerChoose; i++) - { - if ((i + offset * numButtonPlayerChoose) < _PlayerChooseButtonsVisibleProfiles.Count) - { - int id = _PlayerChooseButtonsVisibleProfiles[i + offset * numButtonPlayerChoose]; - _PlayerChooseButtons[i].ProfileID = id; - _PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetAvatar(id); - _PlayerChooseButtons[i].Button.SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f); - _PlayerChooseButtons[i].Button.SelColor = new SColorF(1, 1, 1, 1); - _PlayerChooseButtons[i].Button.Enabled = true; - } - else - { - _PlayerChooseButtons[i].ProfileID = -1; - _PlayerChooseButtons[i].Button.Text.Text = String.Empty; - _PlayerChooseButtons[i].Button.Texture = _Buttons[_ButtonPlayerChoose].Texture; - _PlayerChooseButtons[i].Button.SelTexture = _Buttons[_ButtonPlayerChoose].SelTexture; - _PlayerChooseButtons[i].Button.Color = _Buttons[_ButtonPlayerChoose].Color; - _PlayerChooseButtons[i].Button.SelColor = _Buttons[_ButtonPlayerChoose].SelColor; - _PlayerChooseButtons[i].Button.Enabled = false; - } - } - } - } - - private void _UpdateVisibleProfiles() - { - _PlayerChooseButtonsVisibleProfiles.Clear(); - CProfile[] profiles = CBase.Profiles.GetProfiles(); - foreach (CProfile profile in profiles) - { - bool visible = false; - //Show profile only if active - if (profile.Active == EOffOn.TR_CONFIG_ON) - visible = _Data.ScreenNames.ProfileIDs.All(profileID => profileID != profile.ID); - if (visible) - _PlayerChooseButtonsVisibleProfiles.Add(profile.ID); - } - } - - private void _UpdateButtonPlayerDestination() - { - for (int i = 0; i < _PlayerDestinationButtons.Count; i++) - { - if (_NumPlayer > i) - { - _PlayerDestinationButtons[i].Visible = true; - _PlayerDestinationButtons[i].Enabled = true; - } - else - { - _PlayerDestinationButtons[i].Visible = false; - _PlayerDestinationButtons[i].Enabled = false; - } - } - for (int i = 0; i < _NumPlayer; i++) - { - if (i < _Data.ScreenNames.ProfileIDs.Count) - { - if (_Data.ScreenNames.ProfileIDs[i] != -1) - { - int id = _Data.ScreenNames.ProfileIDs[i]; - _PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[i].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[i].Texture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerDestinationButtons[i].Enabled = true; - } - } - else - { - _PlayerDestinationButtons[i].Color = _Buttons[_ButtonPlayerDestination].Color; - _PlayerDestinationButtons[i].SelColor = _Buttons[_ButtonPlayerDestination].SelColor; - _PlayerDestinationButtons[i].Texture = _Buttons[_ButtonPlayerDestination].Texture; - _PlayerDestinationButtons[i].SelTexture = _Buttons[_ButtonPlayerDestination].SelTexture; - _PlayerDestinationButtons[i].Text.Text = String.Empty; - _PlayerDestinationButtons[i].Enabled = false; - } - } - } - - private void _UpdateButtonNext() - { - if (_Data.ScreenNames.ProfileIDs.Count == _NumPlayer) - { - _Buttons[_ButtonNext].Visible = true; - _SetInteractionToButton(_Buttons[_ButtonNext]); - } - else - _Buttons[_ButtonNext].Visible = false; - } - - private bool _OnAdd() - { - foreach (CPlayerChooseButton button in _PlayerChooseButtons) - { - int id = button.ProfileID; - if (!button.Button.Selected || id == -1 || _Data.ScreenNames.ProfileIDs.Count >= _NumPlayer) - continue; - _Data.ScreenNames.ProfileIDs.Add(id); - int added = _Data.ScreenNames.ProfileIDs.Count - 1; - _UpdateButtonNext(); - //Update texture and name - _PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[added].Texture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[added].SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerDestinationButtons[added].Enabled = true; - //Update Tiles-List - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return true; - } - return false; - } - - private void _OnRemove() - { - for (int i = 0; i < _PlayerDestinationButtons.Count; i++) - { - if (!_PlayerDestinationButtons[i].Selected) - continue; - if ((i + 1) > _Data.ScreenNames.ProfileIDs.Count) - continue; - _Data.ScreenNames.ProfileIDs.RemoveAt(i); - _UpdateButtonNext(); - _UpdateButtonPlayerDestination(); - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return; - } - } - - private void _Back() + public override void Back() { + List ids = GetTeamIDs(0); + _Data.ScreenNames.ProfileIDs = ids; _Data.ScreenNames.FadeBack = true; _PartyMode.DataFromScreen(ThemeName, _Data); } - private void _Next() + public override void Next() { + List ids = GetTeamIDs(0); + _Data.ScreenNames.ProfileIDs = ids; _Data.ScreenNames.FadeBack = false; _PartyMode.DataFromScreen(ThemeName, _Data); } diff --git a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs index d3628d3e..404ae1f5 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyModeTicTacToe.cs @@ -135,6 +135,8 @@ namespace VocaluxeLib.PartyModes.TicTacToe private const int _MinPlayer = 2; private const int _MaxTeams = 2; private const int _MinTeams = 2; + private const int _MinPlayerPerTeam = 1; + private const int _MaxPlayerPerTeam = 10; private const int _NumFields = 9; private enum EStage @@ -480,6 +482,16 @@ namespace VocaluxeLib.PartyModes.TicTacToe return _MinTeams; } + public override int GetMinPlayerPerTeam() + { + return _MinPlayerPerTeam; + } + + public override int GetMaxPlayerPerTeam() + { + return _MaxPlayerPerTeam; + } + public override int GetMaxNumRounds() { return _NumFields; diff --git a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs index 4f8a86cd..0fd0d3cd 100644 --- a/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs +++ b/PartyModes/PartyModeTicTacToe/CPartyScreenTicTacToeNames.cs @@ -25,7 +25,7 @@ using VocaluxeLib.Profile; namespace VocaluxeLib.PartyModes.TicTacToe { // ReSharper disable UnusedMember.Global - public class CPartyScreenTicTacToeNames : CMenuParty + public class CPartyScreenTicTacToeNames : CMenuPartyNameSelection // ReSharper restore UnusedMember.Global { // Version number for theme files. Increment it, if you've changed something on the theme files! @@ -34,38 +34,6 @@ namespace VocaluxeLib.PartyModes.TicTacToe get { return 1; } } - private const string _ButtonNext = "ButtonNext"; - private const string _ButtonBack = "ButtonBack"; - private const string _ButtonPlayerDestination = "ButtonPlayerDestination"; - private const string _ButtonPlayerChoose = "ButtonPlayerChoose"; - private const string _ButtonPlayerChooseScrollUp = "ButtonPlayerChooseScrollUp"; - private const string _ButtonPlayerChooseScrollDown = "ButtonPlayerChooseScrollDown"; - - private List _PlayerChooseButtons; - private List _PlayerDestinationButtons; - //PlayerDestinationButtons-Option - private const int _PlayerDestinationButtonsNumH = 10; - private const int _PlayerDestinationButtonsFirstX = 58; - private const int _PlayerDestinationButtonsFirstY = 380; - private const int _PlayerDestinationButtonsSpaceH = 15; - private const int _PlayerDestinationButtonsSpaceW = 25; - //PlayerChooseButtons-Option - private List _PlayerChooseButtonsVisibleProfiles; - private const int _PlayerChooseButtonsNumH = 10; - private const int _PlayerChooseButtonsNumW = 2; - private const int _PlayerChooseButtonsFirstX = 58; - private const int _PlayerChooseButtonsFirstY = 105; - private const int _PlayerChooseButtonsSpaceH = 15; - private const int _PlayerChooseButtonsSpaceW = 25; - private int _PlayerChooseButtonsOffset; - - private CStatic _ChooseAvatarStatic; - private bool _SelectingMouseActive; - private int _OldMouseX; - private int _OldMouseY; - private int _SelectedPlayerNr = -1; - private bool _ButtonsAdded; - private int _NumPlayerTeam1 = 2; private int _NumPlayerTeam2 = 2; @@ -81,16 +49,9 @@ namespace VocaluxeLib.PartyModes.TicTacToe { base.Init(); - _ChooseAvatarStatic = GetNewStatic(); - _ChooseAvatarStatic.Visible = false; - - _PlayerChooseButtonsVisibleProfiles = new List(); - _Data.ScreenNames.ProfileIDsTeam1 = new List(); _Data.ScreenNames.ProfileIDsTeam2 = new List(); - _ThemeButtons = new string[] {_ButtonBack, _ButtonNext, _ButtonPlayerDestination, _ButtonPlayerChoose, _ButtonPlayerChooseScrollUp, _ButtonPlayerChooseScrollDown}; - _Data = new SDataFromScreen(); var names = new SFromScreenNames {FadeToConfig = false, ProfileIDsTeam1 = new List(), ProfileIDsTeam2 = new List()}; _Data.ScreenNames = names; @@ -122,514 +83,33 @@ namespace VocaluxeLib.PartyModes.TicTacToe } } - public override bool HandleInput(SKeyEvent keyEvent) - { - base.HandleInput(keyEvent); - - if (keyEvent.KeyPressed) {} - else - { - switch (keyEvent.Key) - { - case Keys.Back: - case Keys.Escape: - _Back(); - break; - - case Keys.Enter: - if (_Buttons[_ButtonBack].Selected) - _Back(); - - if (_Buttons[_ButtonNext].Selected) - _Next(); - - if (_Buttons[_ButtonPlayerChooseScrollUp].Selected) - _Scroll(-1); - - if (_Buttons[_ButtonPlayerChooseScrollDown].Selected) - _Scroll(1); - - if (!_OnAdd()) - _OnRemove(); - break; - - case Keys.Delete: - _OnRemove(); - break; - } - } - return true; - } - - public override bool HandleMouse(SMouseEvent mouseEvent) - { - base.HandleMouse(mouseEvent); - - //Check if LeftButton is hold and Select-Mode inactive - if (mouseEvent.LBH && !_SelectingMouseActive) - { - //Save mouse-coords - _OldMouseX = mouseEvent.X; - _OldMouseY = mouseEvent.Y; - //Check if mouse if over tile - foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons) - { - if (chooseButton.Button.Selected) - { - _SelectedPlayerNr = chooseButton.ProfileID; - if (_SelectedPlayerNr != -1) - { - //Activate mouse-selecting - _SelectingMouseActive = true; - //Update of Drag/Drop-Texture - _ChooseAvatarStatic.Visible = true; - _ChooseAvatarStatic.Rect = chooseButton.Button.Rect; - _ChooseAvatarStatic.Rect.Z = -100; - _ChooseAvatarStatic.Color = new SColorF(1, 1, 1, 1); - _ChooseAvatarStatic.Texture = CBase.Profiles.GetAvatar(_SelectedPlayerNr); - } - } - } - return true; - } - - //Check if LeftButton is hold and Select-Mode active - if (mouseEvent.LBH && _SelectingMouseActive) - { - //Update coords for Drag/Drop-Texture - _ChooseAvatarStatic.Rect.X += mouseEvent.X - _OldMouseX; - _ChooseAvatarStatic.Rect.Y += mouseEvent.Y - _OldMouseY; - _OldMouseX = mouseEvent.X; - _OldMouseY = mouseEvent.Y; - - return true; - } - // LeftButton isn't hold anymore, but Selec-Mode is still active -> "Drop" of Avatar - if (_SelectingMouseActive) - { - //Check if really a player was selected - if (_SelectedPlayerNr != -1) - { - //Foreach Drop-Area - for (int i = 0; i < _PlayerDestinationButtons.Count; i++) - { - //Check first, if area is "active" - if (_PlayerDestinationButtons[i].Visible) - { - //Check if Mouse is in area - if (CHelper.IsInBounds(_PlayerDestinationButtons[i].Rect, mouseEvent)) - { - int added = -1; - //Add Player-ID to list. - if (i - _PlayerDestinationButtonsNumH < 0) - { - if (_Data.ScreenNames.ProfileIDsTeam1.Count < (i + 1)) - { - _Data.ScreenNames.ProfileIDsTeam1.Add(_SelectedPlayerNr); - added = _Data.ScreenNames.ProfileIDsTeam1.Count - 1; - } - else if (_Data.ScreenNames.ProfileIDsTeam1.Count >= (i + 1)) - { - _Data.ScreenNames.ProfileIDsTeam1[i] = _SelectedPlayerNr; - added = i; - } - } - else if (i - _PlayerDestinationButtonsNumH >= 0) - { - if (_Data.ScreenNames.ProfileIDsTeam2.Count < ((i - _PlayerDestinationButtonsNumH) + 1)) - { - _Data.ScreenNames.ProfileIDsTeam2.Add(_SelectedPlayerNr); - added = _Data.ScreenNames.ProfileIDsTeam2.Count - 1 + _PlayerDestinationButtonsNumH; - } - else if (_Data.ScreenNames.ProfileIDsTeam2.Count >= ((i - _PlayerDestinationButtonsNumH) + 1)) - { - _Data.ScreenNames.ProfileIDsTeam2[i - _PlayerDestinationButtonsNumH] = _SelectedPlayerNr; - added = i; - } - } - _UpdateButtonNext(); - //Update texture and name - _PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[added].Texture = _ChooseAvatarStatic.Texture; - _PlayerDestinationButtons[added].SelTexture = _ChooseAvatarStatic.Texture; - _PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetPlayerName(_SelectedPlayerNr); - _PlayerDestinationButtons[added].Enabled = true; - //Update Tiles-List - _UpdateButtonPlayerChoose(); - } - } - } - _SelectedPlayerNr = -1; - } - //Reset variables - _SelectingMouseActive = false; - _ChooseAvatarStatic.Visible = false; - return true; - } - - if (mouseEvent.LB && _IsMouseOver(mouseEvent)) - { - if (_Buttons[_ButtonBack].Selected) - _Back(); - - if (_Buttons[_ButtonNext].Selected) - _Next(); - - if (_Buttons[_ButtonPlayerChooseScrollUp].Selected) - _Scroll(-1); - - if (_Buttons[_ButtonPlayerChooseScrollDown].Selected) - _Scroll(1); - } - - if (mouseEvent.LD && _IsMouseOver(mouseEvent)) - { - if (!_OnAdd()) - _OnRemove(); - } - - if (mouseEvent.RB) - _Back(); - - return true; - } public override void OnShow() { base.OnShow(); - - if (!_ButtonsAdded) - { - _AddButtonPlayerDestination(); - _AddButtonPlayerChoose(); - _ButtonsAdded = true; - } - - _UpdateButtonPlayerDestination(); - _UpdateButtonPlayerChoose(); - - _UpdateButtonNext(); + SetPartyModeData(2, _NumPlayerTeam1 + _NumPlayerTeam2, new int[] { _NumPlayerTeam1, _NumPlayerTeam2 }); } - public override bool UpdateGame() + public override void Back() { - return true; - } - - public override bool Draw() - { - base.Draw(); - if (_ChooseAvatarStatic.Visible) - _ChooseAvatarStatic.Draw(); - return true; - } - - private void _Scroll(int offset) - { - if (offset < 0 && _PlayerChooseButtonsOffset > 0) + List[] ids = GetTeamIDs(); + if(ids.Length == 2) { - _PlayerChooseButtonsOffset += offset; - _UpdateButtonPlayerChoose(); + _Data.ScreenNames.ProfileIDsTeam1 = ids[0]; + _Data.ScreenNames.ProfileIDsTeam2 = ids[1]; } - else if (_PlayerChooseButtonsVisibleProfiles.Count < _PlayerChooseButtons.Count + (_PlayerChooseButtonsOffset + offset) * _PlayerChooseButtonsNumH) - { - _PlayerChooseButtonsOffset += offset; - _UpdateButtonPlayerChoose(); - } - } - - private void _AddButtonPlayerDestination() - { - _Buttons[_ButtonPlayerDestination].Visible = false; - _PlayerDestinationButtons = new List(); - int row = 0; - int column = 0; - for (int i = 1; i <= _PartyMode.GetMaxPlayer(); i++) - { - CButton b = GetNewButton(_Buttons[_ButtonPlayerDestination]); - b.Rect.X = _PlayerDestinationButtonsFirstX + column * (b.Rect.W + _PlayerDestinationButtonsSpaceH); - b.Rect.Y = _PlayerDestinationButtonsFirstY + row * (b.Rect.H + _PlayerDestinationButtonsSpaceW); - _PlayerDestinationButtons.Add(b); - column++; - if (column >= _PlayerDestinationButtonsNumH) - { - row++; - column = 0; - } - b.Visible = true; - b.Enabled = false; - _AddButton(b); - } - } - - private void _AddButtonPlayerChoose() - { - _Buttons[_ButtonPlayerChoose].Visible = false; - _PlayerChooseButtons = new List(); - int row = 0; - int column = 0; - for (int i = 1; i <= _PlayerChooseButtonsNumH * _PlayerChooseButtonsNumW; i++) - { - CButton b = GetNewButton(_Buttons[_ButtonPlayerChoose]); - b.Rect.X = _PlayerChooseButtonsFirstX + column * (b.Rect.W + _PlayerChooseButtonsSpaceH); - b.Rect.Y = _PlayerChooseButtonsFirstY + row * (b.Rect.H + _PlayerChooseButtonsSpaceW); - var pcb = new CPlayerChooseButton {Button = b, ProfileID = -1}; - _PlayerChooseButtons.Add(pcb); - column++; - if (column >= _PlayerChooseButtonsNumH) - { - row++; - column = 0; - } - b.Visible = true; - b.Enabled = false; - _AddButton(b); - } - } - - private void _UpdateButtonPlayerChoose() - { - _UpdateVisibleProfiles(); - if ((_PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH) * (_PlayerChooseButtonsOffset + 1) - _PlayerChooseButtonsVisibleProfiles.Count >= - (_PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH) * _PlayerChooseButtonsOffset) - _UpdateButtonPlayerChoose(_PlayerChooseButtonsOffset - 1); - else - _UpdateButtonPlayerChoose(_PlayerChooseButtonsOffset); - _Buttons[_ButtonPlayerChooseScrollUp].Enabled = _PlayerChooseButtonsOffset > 0; - _Buttons[_ButtonPlayerChooseScrollDown].Enabled = _PlayerChooseButtonsVisibleProfiles.Count > - _PlayerChooseButtons.Count + _PlayerChooseButtonsOffset * _PlayerChooseButtonsNumH; - } - - private void _UpdateButtonPlayerChoose(int offset) - { - const int numButtonPlayerChoose = _PlayerChooseButtonsNumW * _PlayerChooseButtonsNumH; - if (offset < 0) - offset = 0; - - if (numButtonPlayerChoose * (offset + 1) - _PlayerChooseButtonsVisibleProfiles.Count <= numButtonPlayerChoose) - { - for (int i = 0; i < numButtonPlayerChoose; i++) - { - if ((i + offset * numButtonPlayerChoose) < _PlayerChooseButtonsVisibleProfiles.Count) - { - int id = _PlayerChooseButtonsVisibleProfiles[i + offset * numButtonPlayerChoose]; - _PlayerChooseButtons[i].ProfileID = id; - _PlayerChooseButtons[i].Button.Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerChooseButtons[i].Button.Texture = CBase.Profiles.GetAvatar(id); - _PlayerChooseButtons[i].Button.SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerChooseButtons[i].Button.Color = new SColorF(1, 1, 1, 0.6f); - _PlayerChooseButtons[i].Button.SelColor = new SColorF(1, 1, 1, 1); - _PlayerChooseButtons[i].Button.Enabled = true; - } - else - { - _PlayerChooseButtons[i].ProfileID = -1; - _PlayerChooseButtons[i].Button.Text.Text = String.Empty; - _PlayerChooseButtons[i].Button.Texture = _Buttons[_ButtonPlayerChoose].Texture; - _PlayerChooseButtons[i].Button.SelTexture = _Buttons[_ButtonPlayerChoose].SelTexture; - _PlayerChooseButtons[i].Button.Color = _Buttons[_ButtonPlayerChoose].Color; - _PlayerChooseButtons[i].Button.SelColor = _Buttons[_ButtonPlayerChoose].SelColor; - _PlayerChooseButtons[i].Button.Enabled = false; - } - } - } - } - - private void _UpdateVisibleProfiles() - { - _PlayerChooseButtonsVisibleProfiles.Clear(); - CProfile[] profiles = CBase.Profiles.GetProfiles(); - foreach (CProfile profile in profiles) - { - bool visible = false; - //Show profile only if active - if (profile.Active == EOffOn.TR_CONFIG_ON) - { - visible = _Data.ScreenNames.ProfileIDsTeam1.All(profileID => profileID != profile.ID) && - _Data.ScreenNames.ProfileIDsTeam2.All(profileID => profileID != profile.ID); - } - if (visible) - _PlayerChooseButtonsVisibleProfiles.Add(profile.ID); - } - } - - private void _UpdateButtonPlayerDestination() - { - for (int i = 0; i < _PlayerDestinationButtons.Count / 2; i++) - { - if (_NumPlayerTeam1 > i) - { - _PlayerDestinationButtons[i].Visible = true; - _PlayerDestinationButtons[i].Enabled = true; - } - else - { - _PlayerDestinationButtons[i].Visible = false; - _PlayerDestinationButtons[i].Enabled = false; - } - } - for (int i = 0; i < _PlayerDestinationButtons.Count / 2; i++) - { - if (_NumPlayerTeam2 > i) - { - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Visible = true; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Enabled = true; - } - else - { - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Visible = false; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Enabled = false; - } - } - for (int i = 0; i < _NumPlayerTeam1; i++) - { - if (i < _Data.ScreenNames.ProfileIDsTeam1.Count) - { - if (_Data.ScreenNames.ProfileIDsTeam1[i] != -1) - { - int id = _Data.ScreenNames.ProfileIDsTeam1[i]; - _PlayerDestinationButtons[i].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[i].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[i].Texture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerDestinationButtons[i].Enabled = true; - } - } - else - { - _PlayerDestinationButtons[i].Color = _Buttons[_ButtonPlayerDestination].Color; - _PlayerDestinationButtons[i].SelColor = _Buttons[_ButtonPlayerDestination].SelColor; - _PlayerDestinationButtons[i].Texture = _Buttons[_ButtonPlayerDestination].Texture; - _PlayerDestinationButtons[i].SelTexture = _Buttons[_ButtonPlayerDestination].SelTexture; - _PlayerDestinationButtons[i].Text.Text = String.Empty; - _PlayerDestinationButtons[i].Enabled = false; - } - } - for (int i = 0; i < _NumPlayerTeam2; i++) - { - if (i < _Data.ScreenNames.ProfileIDsTeam2.Count) - { - if (_Data.ScreenNames.ProfileIDsTeam2[i] != -1) - { - int id = _Data.ScreenNames.ProfileIDsTeam2[i]; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[i].Texture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].SelTexture = CBase.Profiles.GetAvatar(id); - _PlayerDestinationButtons[i].Text.Text = CBase.Profiles.GetPlayerName(id); - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Enabled = true; - } - } - else - { - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Color = _Buttons[_ButtonPlayerDestination].Color; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].SelColor = _Buttons[_ButtonPlayerDestination].SelColor; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Texture = _Buttons[_ButtonPlayerDestination].Texture; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].SelTexture = _Buttons[_ButtonPlayerDestination].SelTexture; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Text.Text = String.Empty; - _PlayerDestinationButtons[i + _PlayerDestinationButtonsNumH].Enabled = false; - } - } - } - - private void _UpdateButtonNext() - { - if (_Data.ScreenNames.ProfileIDsTeam1.Count == _NumPlayerTeam1 && _Data.ScreenNames.ProfileIDsTeam2.Count == _NumPlayerTeam2) - { - _Buttons[_ButtonNext].Visible = true; - _SetInteractionToButton(_Buttons[_ButtonNext]); - } - else - _Buttons[_ButtonNext].Visible = false; - } - - private bool _OnAdd() - { - foreach (CPlayerChooseButton chooseButton in _PlayerChooseButtons.Where(chooseButton => chooseButton.Button.Selected && chooseButton.ProfileID != -1)) - { - if (_Data.ScreenNames.ProfileIDsTeam1.Count < _NumPlayerTeam1) - { - _Data.ScreenNames.ProfileIDsTeam1.Add(chooseButton.ProfileID); - int added = _Data.ScreenNames.ProfileIDsTeam1.Count - 1; - _UpdateButtonNext(); - //Update texture and name - _PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[added].Texture = CBase.Profiles.GetAvatar(chooseButton.ProfileID); - _PlayerDestinationButtons[added].SelTexture = CBase.Profiles.GetAvatar(chooseButton.ProfileID); - _PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetPlayerName(chooseButton.ProfileID); - _PlayerDestinationButtons[added].Enabled = true; - //Update Tiles-List - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return true; - } - if (_Data.ScreenNames.ProfileIDsTeam2.Count < _NumPlayerTeam2) - { - _Data.ScreenNames.ProfileIDsTeam2.Add(chooseButton.ProfileID); - int added = (_Data.ScreenNames.ProfileIDsTeam2.Count - 1) + _PlayerDestinationButtonsNumH; - _UpdateButtonNext(); - //Update texture and name - _PlayerDestinationButtons[added].Color = new SColorF(1, 1, 1, 0.6f); - _PlayerDestinationButtons[added].SelColor = new SColorF(1, 1, 1, 1); - _PlayerDestinationButtons[added].Texture = CBase.Profiles.GetAvatar(chooseButton.ProfileID); - _PlayerDestinationButtons[added].SelTexture = CBase.Profiles.GetAvatar(chooseButton.ProfileID); - _PlayerDestinationButtons[added].Text.Text = CBase.Profiles.GetPlayerName(chooseButton.ProfileID); - _PlayerDestinationButtons[added].Enabled = true; - //Update Tiles-List - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return true; - } - } - return false; - } - - private bool _OnRemove() - { - for (int i = 0; i < _PlayerDestinationButtonsNumH; i++) - { - if (_PlayerDestinationButtons[i].Selected) - { - if ((i + 1) <= _Data.ScreenNames.ProfileIDsTeam1.Count) - { - _Data.ScreenNames.ProfileIDsTeam1.RemoveAt(i); - _UpdateButtonNext(); - _UpdateButtonPlayerDestination(); - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return true; - } - } - } - for (int i = _PlayerDestinationButtonsNumH; i < _PlayerDestinationButtonsNumH * 2; i++) - { - if (_PlayerDestinationButtons[i].Selected) - { - if (((i - _PlayerDestinationButtonsNumH) + 1) <= _Data.ScreenNames.ProfileIDsTeam2.Count) - { - _Data.ScreenNames.ProfileIDsTeam2.RemoveAt(i - _PlayerDestinationButtonsNumH); - _UpdateButtonNext(); - _UpdateButtonPlayerDestination(); - _UpdateButtonPlayerChoose(); - _CheckInteraction(); - return true; - } - } - } - return false; - } - - private void _Back() - { _Data.ScreenNames.FadeToConfig = true; _PartyMode.DataFromScreen(ThemeName, _Data); } - private void _Next() + public override void Next() { + List[] ids = GetTeamIDs(); + if (ids.Length == 2) + { + _Data.ScreenNames.ProfileIDsTeam1 = ids[0]; + _Data.ScreenNames.ProfileIDsTeam2 = ids[1]; + } _Data.ScreenNames.FadeToConfig = false; _PartyMode.DataFromScreen(ThemeName, _Data); } diff --git a/Vocaluxe/Base/CMain.cs b/Vocaluxe/Base/CMain.cs index ff9f0f5d..94539b78 100644 --- a/Vocaluxe/Base/CMain.cs +++ b/Vocaluxe/Base/CMain.cs @@ -595,6 +595,21 @@ namespace Vocaluxe.Base { return CProfiles.GetAvatarTextureFromProfile(profileID); } + + public bool IsProfileIDValid(int profileID) + { + return CProfiles.IsProfileIDValid(profileID); + } + + public bool IsGuest(int profileID) + { + return CProfiles.IsGuestProfile(profileID); + } + + public void AddProfileChangedCallback(ProfileChangedCallback notification) + { + CProfiles.AddProfileChangedCallback(notification); + } } class CBrecord : IRecording diff --git a/Vocaluxe/Base/CProfiles.cs b/Vocaluxe/Base/CProfiles.cs index 01a05653..f70ce2d4 100644 --- a/Vocaluxe/Base/CProfiles.cs +++ b/Vocaluxe/Base/CProfiles.cs @@ -24,16 +24,6 @@ using VocaluxeLib.Draw; namespace Vocaluxe.Base { - [Flags] - public enum EProfileChangedFlags - { - None = 1, - Avatar = 2, - Profile = 4 - } - - public delegate void ProfileChangedCallback(EProfileChangedFlags typeChanged); - static class CProfiles { #region enums and structs diff --git a/Vocaluxe/Screens/CScreenNames.cs b/Vocaluxe/Screens/CScreenNames.cs index 62a99c37..faf86007 100644 --- a/Vocaluxe/Screens/CScreenNames.cs +++ b/Vocaluxe/Screens/CScreenNames.cs @@ -23,6 +23,7 @@ using VocaluxeLib; using VocaluxeLib.Draw; using VocaluxeLib.Menu; using VocaluxeLib.Songs; +using VocaluxeLib.Profile; namespace Vocaluxe.Screens { @@ -602,6 +603,7 @@ namespace Vocaluxe.Screens for (int i = 0; i < CSettings.MaxNumPlayer; i++) { + _NameSelections[_NameSelection].UseProfile(CGame.Players[i].ProfileID); _Statics[_StaticPlayerAvatar[i]].Texture = CProfiles.IsProfileIDValid(CGame.Players[i].ProfileID) ? CProfiles.GetAvatarTextureFromProfile(CGame.Players[i].ProfileID) : _OriginalPlayerAvatarTextures[i]; @@ -675,6 +677,8 @@ namespace Vocaluxe.Screens private void _UpdateSelectedProfile(int playerNum, int profileId) { + _NameSelections[_NameSelection].RemoveUsedProfile(CGame.Players[playerNum].ProfileID); + _NameSelections[_NameSelection].UseProfile(profileId); //Update Game-infos with new player CGame.Players[playerNum].ProfileID = profileId; //Update config for default players. @@ -693,6 +697,7 @@ namespace Vocaluxe.Screens { for (int i = 0; i < CGame.NumPlayer; i++) { + _NameSelections[_NameSelection].RemoveUsedProfile(CGame.Players[i].ProfileID); CGame.Players[i].ProfileID = -1; //Update config for default players. CConfig.Players[i] = String.Empty; @@ -706,6 +711,7 @@ namespace Vocaluxe.Screens private void _ResetPlayerSelection(int playerNum) { + _NameSelections[_NameSelection].RemoveUsedProfile(CGame.Players[playerNum].ProfileID); CGame.Players[playerNum].ProfileID = -1; //Update config for default players. CConfig.Players[playerNum] = String.Empty; diff --git a/VocaluxeLib/IBasic.cs b/VocaluxeLib/IBasic.cs index ac8ed878..3c3725ad 100644 --- a/VocaluxeLib/IBasic.cs +++ b/VocaluxeLib/IBasic.cs @@ -209,6 +209,9 @@ namespace VocaluxeLib EGameDifficulty GetDifficulty(int profileID); string GetPlayerName(int profileID, int playerNum = 0); CTexture GetAvatar(int profileID); + bool IsProfileIDValid(int profileID); + bool IsGuest(int profileID); + void AddProfileChangedCallback(ProfileChangedCallback notification); } public interface ISongs diff --git a/VocaluxeLib/Menu/CMenuPartyNameSelection.cs b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs new file mode 100644 index 00000000..42497756 --- /dev/null +++ b/VocaluxeLib/Menu/CMenuPartyNameSelection.cs @@ -0,0 +1,612 @@ +#region license +// This file is part of Vocaluxe. +// +// Vocaluxe is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Vocaluxe is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Vocaluxe. If not, see . +#endregion + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; +using VocaluxeLib.PartyModes; +using VocaluxeLib.Draw; +using VocaluxeLib.Profile; + +namespace VocaluxeLib.Menu +{ + public abstract class CMenuPartyNameSelection : CMenuParty + { + private bool _Teams; + protected int _NumTeams = -1; + protected int _NumPlayer = -1; + protected int[] _NumPlayerTeams; + protected bool _AllowChangePlayerNum = true; + protected bool _AllowChangeTeamNum = true; + protected bool _ChangePlayerNumDynamic = true; + private int _CurrentTeam = 0; + + private bool _AvatarsChanged; + private bool _ProfilesChanged; + + private bool _SelectingKeyboardActive; + private bool _SelectingFast; + private int _SelectingSwitchNr = -1; + private int _SelectingFastPlayerNr; + private int _SelectedProfileID = -1; + + private CStatic _ChooseAvatarStatic; + private int _OldMouseX; + private int _OldMouseY; + + private const string _ButtonNext = "ButtonNext"; + private const string _ButtonBack = "ButtonBack"; + private const string _ButtonIncreaseTeams = "ButtonIncreaseTeams"; + private const string _ButtonDecreaseTeams = "ButtonDecreaseTeams"; + private const string _ButtonIncreasePlayer = "ButtonIncreasePlayer"; + private const string _ButtonDecreasePlayer = "ButtonDecreasePlayer"; + private const string _SelectSlideTeams = "SelectSlideTeams"; + private const string _SelectSlidePlayer = "SelectSlidePlayer"; + private const string _NameSelection = "NameSelection"; + + private List[] _TeamList; + + public override void Init() + { + base.Init(); + _Teams = _PartyMode.GetMinTeams() > 0; + + _ThemeButtons = new string[] { _ButtonBack, _ButtonNext, _ButtonIncreaseTeams, _ButtonDecreaseTeams, _ButtonIncreasePlayer, _ButtonDecreasePlayer }; + _ThemeSelectSlides = new string[] { _SelectSlideTeams, _SelectSlidePlayer }; + _ThemeNameSelections = new string[] { _NameSelection }; + + _ChooseAvatarStatic = GetNewStatic(); + _ChooseAvatarStatic.Visible = false; + _ChooseAvatarStatic.Aspect = EAspect.Crop; + + CBase.Profiles.AddProfileChangedCallback(_OnProfileChanged); + } + + public void SetPartyModeData(int numPlayer) + { + SetPartyModeData(1, numPlayer, new int[] { numPlayer }); + _CurrentTeam = 0; + } + + public void SetPartyModeData(int numTeams, int numPlayer, int[] numPlayerTeams) + { + _NumTeams = numTeams; + _NumPlayer = numPlayer; + _NumPlayerTeams = numPlayerTeams; + + if (_NumTeams > 0) + _TeamList = new List[_NumTeams]; + else + _TeamList = new List[1]; + + if (_NumTeams != _NumPlayerTeams.Length) + _NumPlayerTeams = new int[_NumTeams]; + + for (int i = 0; i < _TeamList.Length; i++) + _TeamList[i] = new List(); + + _UpdateSlides(); + _LoadProfiles(); + } + + public override bool HandleInput(SKeyEvent keyEvent) + { + //Check if selecting with keyboard is active + if (_SelectingKeyboardActive) + { + //Handle left/right/up/down + _NameSelections[_NameSelection].HandleInput(keyEvent); + int numberPressed = -1; + bool resetSelection = false; + switch (keyEvent.Key) + { + case Keys.Enter: + //Check, if a player is selected + if (_NameSelections[_NameSelection].Selection > -1) + { + _SelectedProfileID = _NameSelections[_NameSelection].Selection; + + if (!CBase.Profiles.IsProfileIDValid(_SelectedProfileID)) + return true; + + _AddPlayer(_CurrentTeam, _SelectedProfileID); + } + //Started selecting with 'P' + if (_SelectingFast) { + if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam]) + resetSelection = true; + else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam()) + resetSelection = true; + } + else if(!_SelectingFast) + resetSelection = true; + break; + + case Keys.Escape: + case Keys.Back: + resetSelection = true; + break; + } + if (numberPressed > 0 || resetSelection) + { + if (numberPressed == _SelectingFastPlayerNr || resetSelection) + { + //Reset all values + _SelectingFastPlayerNr = 0; + _SelectingKeyboardActive = false; + _NameSelections[_NameSelection].FastSelection(false, -1); + } + else if (numberPressed <= _NumPlayerTeams[_CurrentTeam]) + { + _SelectingFastPlayerNr = numberPressed; + _NameSelections[_NameSelection].FastSelection(true, numberPressed); + } + _SelectingFast = false; + } + } + else + { + base.HandleInput(keyEvent); + + switch (keyEvent.Key) + { + case Keys.Back: + case Keys.Escape: + Back(); + break; + + case Keys.Enter: + if (_Buttons[_ButtonBack].Selected) + Back(); + + if (_Buttons[_ButtonNext].Selected) + Next(); + + if (_Buttons[_ButtonIncreaseTeams].Selected) + IncreaseTeamNum(); + + if (_Buttons[_ButtonDecreaseTeams].Selected) + DecreaseTeamNum(); + + if (_Buttons[_ButtonIncreasePlayer].Selected) + IncreasePlayerNum(_CurrentTeam); + + if (_Buttons[_ButtonDecreasePlayer].Selected) + DecreasePlayerNum(_CurrentTeam); + + break; + + case Keys.Delete: + if (_SelectSlides[_SelectSlidePlayer].Selected && _SelectSlides[_SelectSlidePlayer].NumValues > 0) + { + int index = _SelectSlides[_SelectSlidePlayer].Selection; + _RemovePlayerByIndex(_CurrentTeam, index); + _UpdatePlayerSlide(); + } + break; + + case Keys.Left: + case Keys.Right: + if (_SelectSlides[_SelectSlideTeams].Selected) + _OnChangeTeamSlide(); + break; + + case Keys.P: + if (!_SelectingKeyboardActive) + { + _SelectingFastPlayerNr = (_CurrentTeam + 1); + _SelectingFast = true; + //_ResetPlayerSelections(); + } + break; + } + } + if (_SelectingFastPlayerNr > 0 && _SelectingFastPlayerNr <= _NumPlayerTeams[_CurrentTeam]) + { + _SelectingKeyboardActive = true; + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); + } + return true; + } + + public override bool HandleMouse(SMouseEvent mouseEvent) + { + bool stopSelectingFast = false; + + if (_SelectingFast) + _NameSelections[_NameSelection].HandleMouse(mouseEvent); + else + base.HandleMouse(mouseEvent); + + //Check if LeftButton is hold and Select-Mode inactive + if (mouseEvent.LBH && _SelectedProfileID < 0 && !_SelectingFast) + { + //Save mouse-coords + _OldMouseX = mouseEvent.X; + _OldMouseY = mouseEvent.Y; + //Check if mouse if over tile + if (_NameSelections[_NameSelection].IsOverTile(mouseEvent)) + { + //Get player-number of tile + _SelectedProfileID = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent); + if (_SelectedProfileID != -1) + { + //Update of Drag/Drop-Texture + CStatic selectedPlayer = _NameSelections[_NameSelection].TilePlayerAvatar(mouseEvent); + _ChooseAvatarStatic.Visible = true; + _ChooseAvatarStatic.Rect = selectedPlayer.Rect; + _ChooseAvatarStatic.Rect.Z = CBase.Settings.GetZNear(); + _ChooseAvatarStatic.Color = new SColorF(1, 1, 1, 1); + _ChooseAvatarStatic.Texture = selectedPlayer.Texture; + } + } + } + //Check if LeftButton is hold and Select-Mode active + if (mouseEvent.LBH && _SelectedProfileID >= 0 && !_SelectingFast) + { + //Update coords for Drag/Drop-Texture + _ChooseAvatarStatic.Rect.X += mouseEvent.X - _OldMouseX; + _ChooseAvatarStatic.Rect.Y += mouseEvent.Y - _OldMouseY; + _OldMouseX = mouseEvent.X; + _OldMouseY = mouseEvent.Y; + } + // LeftButton isn't hold anymore, but Select-Mode is still active -> "Drop" of Avatar + else if (_SelectedProfileID >= 0 && !_SelectingFast) + { + //Check if mouse is in drop-area + if (CHelper.IsInBounds(_SelectSlides[_SelectSlidePlayer].Rect, mouseEvent)) + { + if (!CBase.Profiles.IsProfileIDValid(_SelectedProfileID)) + return true; + + _AddPlayer(_CurrentTeam, _SelectedProfileID); + } + + //Reset variables + _SelectingSwitchNr = -1; + _SelectedProfileID = -1; + _ChooseAvatarStatic.Visible = false; + } + if (mouseEvent.LB && _SelectingFast) + { + if (_NameSelections[_NameSelection].IsOverTile(mouseEvent)) + { + //Get player-number of tile + _SelectedProfileID = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent); + if (_SelectedProfileID != -1) + { + if (!CBase.Profiles.IsProfileIDValid(_SelectedProfileID)) + return true; + + _AddPlayer(_CurrentTeam, _SelectedProfileID); + + if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam]) + stopSelectingFast = true; + else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam()) + stopSelectingFast = true; + } + else + stopSelectingFast = true; + } + } + + else if (mouseEvent.LB && _IsMouseOver(mouseEvent)) + { + if (_Buttons[_ButtonBack].Selected) + Back(); + + if (_Buttons[_ButtonNext].Selected) + Next(); + + if (_Buttons[_ButtonIncreaseTeams].Selected) + IncreaseTeamNum(); + + if (_Buttons[_ButtonDecreaseTeams].Selected) + DecreaseTeamNum(); + + if (_Buttons[_ButtonIncreasePlayer].Selected) + IncreasePlayerNum(_CurrentTeam); + + if (_Buttons[_ButtonDecreasePlayer].Selected) + DecreasePlayerNum(_CurrentTeam); + + if (_SelectSlides[_SelectSlideTeams].Selected) + _OnChangeTeamSlide(); + + //Update Tiles-List + _NameSelections[_NameSelection].UpdateList(); + } + + if (mouseEvent.LD && _NameSelections[_NameSelection].IsOverTile(mouseEvent) && !_SelectingFast) + { + _SelectedProfileID = _NameSelections[_NameSelection].TilePlayerNr(mouseEvent); + if (_SelectedProfileID > -1) + { + if (!CBase.Profiles.IsProfileIDValid(_SelectedProfileID)) + return true; + + _AddPlayer(_CurrentTeam, _SelectedProfileID); + } + } + + if (mouseEvent.RB && _SelectingFast) + stopSelectingFast = true; + else if (mouseEvent.RB) + { + bool exit = true; + if (_SelectSlides[_SelectSlidePlayer].Selected && _SelectSlides[_SelectSlidePlayer].NumValues > 0 ) + { + int currentSelection = _SelectSlides[_SelectSlidePlayer].Selection; + int id = _TeamList[_CurrentTeam][currentSelection]; + _RemovePlayer(_CurrentTeam, id); + _UpdatePlayerSlide(); + exit = false; + } + + if (exit) + Back(); + } + + if (mouseEvent.MB && _SelectingFast) + { + if (!_ChangePlayerNumDynamic && _TeamList[_CurrentTeam].Count == _NumPlayerTeams[_CurrentTeam]) + stopSelectingFast = true; + else if (_TeamList[_CurrentTeam].Count == _PartyMode.GetMaxPlayerPerTeam()) + stopSelectingFast = true; + } + else if (mouseEvent.MB) + { + _SelectingFast = true; + _SelectingFastPlayerNr = (_CurrentTeam + 1); + _SelectingKeyboardActive = true; + _NameSelections[_NameSelection].FastSelection(true, _SelectingFastPlayerNr); + } + + //Check mouse-wheel for scrolling + if (mouseEvent.Wheel != 0) + { + if (CHelper.IsInBounds(_NameSelections[_NameSelection].Rect, mouseEvent)) + { + int offset = _NameSelections[_NameSelection].Offset + mouseEvent.Wheel; + _NameSelections[_NameSelection].UpdateList(offset); + } + } + + if (stopSelectingFast) + { + _SelectingFast = false; + _SelectingFastPlayerNr = 0; + _SelectingKeyboardActive = false; + _NameSelections[_NameSelection].FastSelection(false, -1); + } + return true; + } + + public override void LoadTheme(string xmlPath) + { + base.LoadTheme(xmlPath); + _SelectSlides[_SelectSlidePlayer].WithTextures = true; + _SelectSlides[_SelectSlidePlayer].SelectionByHover = true; + _SelectSlides[_SelectSlideTeams].Visible = _Teams; + _Buttons[_ButtonIncreaseTeams].Visible = _AllowChangePlayerNum && _Teams; + _Buttons[_ButtonDecreaseTeams].Visible = _AllowChangePlayerNum && _Teams; + _Buttons[_ButtonIncreasePlayer].Visible = _AllowChangePlayerNum; + _Buttons[_ButtonDecreasePlayer].Visible = _AllowChangePlayerNum; + } + + public override bool UpdateGame() + { + if (_ProfilesChanged || _AvatarsChanged) + _LoadProfiles(); + + return true; + } + + public override void OnShow() + { + _NameSelections[_NameSelection].Init(); + + base.OnShow(); + } + + public override bool Draw() + { + base.Draw(); + + if (_ChooseAvatarStatic.Visible) + _ChooseAvatarStatic.Draw(); + + return true; + } + + public abstract void Back(); + public abstract void Next(); + + public List GetTeamIDs(int team) + { + if (team < _TeamList.Length) + return _TeamList[team]; + return null; + } + + public List[] GetTeamIDs() + { + return _TeamList; + } + + public void IncreaseTeamNum() + { + if (!_AllowChangeTeamNum) + return; + + if (_NumTeams + 1 <= _PartyMode.GetMaxTeams()) + { + _NumTeams++; + int[] numPlayerTeams = _NumPlayerTeams; + List[] teamList = _TeamList; + _NumPlayerTeams = new int[_NumTeams]; + _TeamList = new List[_NumTeams]; + for (int i = 0; i < _NumPlayerTeams.Length; i++) + { + if (i < numPlayerTeams.Length) + { + _NumPlayerTeams[i] = numPlayerTeams[i]; + _TeamList[i] = teamList[i]; + } + else + { + _NumPlayerTeams[i] = _NumPlayer; + _TeamList[i] = new List(); + } + } + } + } + + public void DecreaseTeamNum() + { + if (!_AllowChangeTeamNum) + return; + + if (_NumTeams - 1 >= _PartyMode.GetMinTeams()) + { + _NumTeams--; + } + } + + public void IncreasePlayerNum(int team) + { + if (!_AllowChangePlayerNum) + return; + if (_NumPlayerTeams.Length < team) + { + if (_NumPlayerTeams[team] + 1 <= _PartyMode.GetMaxPlayerPerTeam()) + _NumPlayerTeams[team]++; + _UpdatePlayerSlide(); + } + } + + public void DecreasePlayerNum(int team) + { + if (!_AllowChangePlayerNum) + return; + if (_NumPlayerTeams.Length < team) + { + if (_NumPlayerTeams[team] - 1 >= _PartyMode.GetMinPlayerPerTeam()) + _NumPlayerTeams[team]--; + if (_TeamList[team].Count > _NumPlayerTeams[team]) + _RemovePlayerByIndex(team, _NumPlayerTeams[team] - 1); + _UpdatePlayerSlide(); + } + } + + #region private methods + + private void _OnProfileChanged(EProfileChangedFlags flags) + { + if (EProfileChangedFlags.Avatar == (EProfileChangedFlags.Avatar & flags)) + _AvatarsChanged = true; + + if (EProfileChangedFlags.Profile == (EProfileChangedFlags.Profile & flags)) + _ProfilesChanged = true; + } + + private void _LoadProfiles() + { + _NameSelections[_NameSelection].UpdateList(); + + _UpdateSlides(); + _OnChangeTeamSlide(); + + _ProfilesChanged = false; + _AvatarsChanged = false; + } + + private void _UpdateSlides() + { + _UpdateTeamSlide(); + _UpdatePlayerSlide(); + } + + private void _OnChangeTeamSlide() + { + if (_CurrentTeam == _SelectSlides[_SelectSlideTeams].Selection) + return; + + _CurrentTeam = _SelectSlides[_SelectSlideTeams].Selection; + _UpdatePlayerSlide(); + } + + private void _UpdatePlayerSlide() + { + int selection = _SelectSlides[_SelectSlidePlayer].Selection; + _SelectSlides[_SelectSlidePlayer].Clear(); + for (int i = 0; i < _TeamList[_CurrentTeam].Count; i++) + { + string name = CBase.Profiles.GetPlayerName(_TeamList[_CurrentTeam][i]); + CTexture avatar = CBase.Profiles.GetAvatar(_TeamList[_CurrentTeam][i]); + _SelectSlides[_SelectSlidePlayer].AddValue(name, avatar); + } + for (int i = _TeamList[_CurrentTeam].Count; i < _NumPlayerTeams[_CurrentTeam]; i++) + { + _SelectSlides[_SelectSlidePlayer].AddValue("Test", _NameSelections[_NameSelection].TextureEmptyTile); + } + if (selection >= _TeamList[_CurrentTeam].Count) + selection = _TeamList[_CurrentTeam].Count - 1; + _SelectSlides[_SelectSlidePlayer].SetSelectionByValueIndex(selection); + } + + private void _UpdateTeamSlide() + { + _SelectSlides[_SelectSlideTeams].Clear(); + for (int i = 1; i <= _NumTeams; i++) + _SelectSlides[_SelectSlideTeams].AddValue("Team " + i); + + } + + private void _AddPlayer(int team, int profileID) + { + if (_NumPlayerTeams[team] == _TeamList[team].Count && !_ChangePlayerNumDynamic) + return; + else if (_NumPlayerTeams[team] == _PartyMode.GetMaxPlayerPerTeam()) + return; + + _NameSelections[_NameSelection].UseProfile(profileID); + _TeamList[team].Add(profileID); + + _UpdatePlayerSlide(); + } + + private void _RemovePlayerByIndex(int team, int index) + { + if (_TeamList[team].Count > index) + { + int id = _TeamList[team][index]; + _TeamList[team].RemoveAt(index); + _NameSelections[_NameSelection].RemoveUsedProfile(id); + } + } + + private void _RemovePlayer(int team, int profileID) + { + _TeamList[team].Remove(profileID); + _NameSelections[_NameSelection].RemoveUsedProfile(profileID); + } + + #endregion + } +} diff --git a/VocaluxeLib/Menu/CNameSelection.cs b/VocaluxeLib/Menu/CNameSelection.cs index 274a8307..61da01cd 100644 --- a/VocaluxeLib/Menu/CNameSelection.cs +++ b/VocaluxeLib/Menu/CNameSelection.cs @@ -71,6 +71,10 @@ namespace VocaluxeLib.Menu private CTexture _TextureEmptyTile; private CTexture _TextureTileSelected; + public CTexture TextureEmptyTile + { + get { return _TextureEmptyTile; } + } public SColorF ColorEmptyTile; @@ -90,6 +94,7 @@ namespace VocaluxeLib.Menu private int _Player = -1; private readonly List _VisibleProfiles; + private List _UsedProfiles; private CStatic _PlayerSelector; @@ -100,6 +105,7 @@ namespace VocaluxeLib.Menu _Tiles = new List(); _VisibleProfiles = new List(); + _UsedProfiles = new List(); } public void Init() @@ -478,6 +484,19 @@ namespace VocaluxeLib.Menu _PrepareTiles(); } + public void UseProfile(int id) + { + if(id > -1) + if (!_UsedProfiles.Contains(id) && CBase.Profiles.IsProfileIDValid(id) && !CBase.Profiles.IsGuest(id)) + _UsedProfiles.Add(id); + } + + public void RemoveUsedProfile(int id) + { + if(id > -1) + _UsedProfiles.Remove(id); + } + private void _PrepareTiles() { _Tiles.Clear(); @@ -504,14 +523,8 @@ namespace VocaluxeLib.Menu bool visible = profile.Active == EOffOn.TR_CONFIG_ON; if (visible) { - //Show profile only if active - for (int p = 0; p < CBase.Game.GetNumPlayer(); p++) - { - //Don't show profile if is selected, but if selected and guest - if (CBase.Game.GetPlayers()[p].ProfileID == profile.ID - && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL)) - visible = false; - } + if (_UsedProfiles.Contains(profile.ID) && !profile.UserRole.HasFlag(EUserRole.TR_USERROLE_NORMAL)) + visible = false; } if (visible) _VisibleProfiles.Add(profile.ID); diff --git a/VocaluxeLib/Menu/CSelectSlide.cs b/VocaluxeLib/Menu/CSelectSlide.cs index 19d5d924..5a4f1a78 100644 --- a/VocaluxeLib/Menu/CSelectSlide.cs +++ b/VocaluxeLib/Menu/CSelectSlide.cs @@ -104,6 +104,8 @@ namespace VocaluxeLib.Menu public bool Visible = true; public bool Highlighted; + public bool SelectionByHover; + private bool _ArrowLeftSelected; private bool _ArrowRightSelected; @@ -114,7 +116,7 @@ namespace VocaluxeLib.Menu private readonly List _ValueBounds = new List(); - public readonly bool WithTextures; + public bool WithTextures; private int _Selection = -1; public int Selection @@ -654,6 +656,27 @@ namespace VocaluxeLib.Menu { _ArrowLeftSelected = CHelper.IsInBounds(RectArrowLeft, x, y) && _Selection > 0; _ArrowRightSelected = CHelper.IsInBounds(RectArrowRight, x, y) && _Selection < _ValueNames.Count - 1; + + if (SelectionByHover) + { + 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) diff --git a/VocaluxeLib/PartyModes/CPartyMode.cs b/VocaluxeLib/PartyModes/CPartyMode.cs index 370d125a..5ef78a60 100644 --- a/VocaluxeLib/PartyModes/CPartyMode.cs +++ b/VocaluxeLib/PartyModes/CPartyMode.cs @@ -95,6 +95,16 @@ namespace VocaluxeLib.PartyModes return 0; } + public virtual int GetMinPlayerPerTeam() + { + return GetMinPlayer(); + } + + public virtual int GetMaxPlayerPerTeam() + { + return GetMaxPlayer(); + } + public virtual int GetMaxNumRounds() { return 1; diff --git a/VocaluxeLib/PartyModes/IPartyMode.cs b/VocaluxeLib/PartyModes/IPartyMode.cs index e720d096..d71e8135 100644 --- a/VocaluxeLib/PartyModes/IPartyMode.cs +++ b/VocaluxeLib/PartyModes/IPartyMode.cs @@ -101,6 +101,8 @@ namespace VocaluxeLib.PartyModes int GetMinPlayer(); int GetMaxTeams(); int GetMinTeams(); + int GetMinPlayerPerTeam(); + int GetMaxPlayerPerTeam(); int GetMaxNumRounds(); string GetFolder(); void SetFolder(string folder); diff --git a/VocaluxeLib/Profile/CProfile.cs b/VocaluxeLib/Profile/CProfile.cs index 21b10e03..4e27614c 100644 --- a/VocaluxeLib/Profile/CProfile.cs +++ b/VocaluxeLib/Profile/CProfile.cs @@ -22,6 +22,16 @@ using System.Xml; namespace VocaluxeLib.Profile { + [Flags] + public enum EProfileChangedFlags + { + None = 1, + Avatar = 2, + Profile = 4 + } + + public delegate void ProfileChangedCallback(EProfileChangedFlags typeChanged); + public class CProfile { public int ID; diff --git a/VocaluxeLib/VocaluxeLib.csproj b/VocaluxeLib/VocaluxeLib.csproj index ee8e196f..d44d9b74 100644 --- a/VocaluxeLib/VocaluxeLib.csproj +++ b/VocaluxeLib/VocaluxeLib.csproj @@ -142,6 +142,7 @@ +