From 95b8bb3dc57e3861e9f4c83a5f999ee0bd3106f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Harrault?= <benoit@harrault.fr> Date: Mon, 5 Feb 2024 15:01:56 +0100 Subject: [PATCH] Use painters to draw game parameters selectors --- android/gradle.properties | 4 +- assets/icons/boardSize_10.png | Bin 661 -> 0 bytes assets/icons/boardSize_14.png | Bin 774 -> 0 bytes assets/icons/boardSize_20.png | Bin 962 -> 0 bytes assets/icons/boardSize_6.png | Bin 480 -> 0 bytes assets/icons/colorsCount_5.png | Bin 1516 -> 0 bytes assets/icons/colorsCount_6.png | Bin 2010 -> 0 bytes assets/icons/colorsCount_7.png | Bin 1543 -> 0 bytes assets/icons/colorsCount_8.png | Bin 2193 -> 0 bytes .../metadata/android/en-US/changelogs/19.txt | 1 + .../metadata/android/fr-FR/changelogs/19.txt | 1 + icons/boardSize_10.svg | 3 - icons/boardSize_14.svg | 3 - icons/boardSize_20.svg | 3 - icons/boardSize_6.svg | 3 - icons/build_game_icons.sh | 25 -- icons/colorsCount_5.svg | 2 - icons/colorsCount_6.svg | 2 - icons/colorsCount_7.svg | 2 - icons/colorsCount_8.svg | 2 - lib/config/default_game_settings.dart | 30 ++- lib/ui/painters/parameter_painter.dart | 223 ++++++++++++++++++ lib/ui/widgets/parameters.dart | 77 +++--- lib/utils/color_theme.dart | 4 +- pubspec.yaml | 2 +- 25 files changed, 283 insertions(+), 104 deletions(-) delete mode 100644 assets/icons/boardSize_10.png delete mode 100644 assets/icons/boardSize_14.png delete mode 100644 assets/icons/boardSize_20.png delete mode 100644 assets/icons/boardSize_6.png delete mode 100644 assets/icons/colorsCount_5.png delete mode 100644 assets/icons/colorsCount_6.png delete mode 100644 assets/icons/colorsCount_7.png delete mode 100644 assets/icons/colorsCount_8.png create mode 100644 fastlane/metadata/android/en-US/changelogs/19.txt create mode 100644 fastlane/metadata/android/fr-FR/changelogs/19.txt delete mode 100644 icons/boardSize_10.svg delete mode 100644 icons/boardSize_14.svg delete mode 100644 icons/boardSize_20.svg delete mode 100644 icons/boardSize_6.svg delete mode 100644 icons/colorsCount_5.svg delete mode 100644 icons/colorsCount_6.svg delete mode 100644 icons/colorsCount_7.svg delete mode 100644 icons/colorsCount_8.svg create mode 100644 lib/ui/painters/parameter_painter.dart diff --git a/android/gradle.properties b/android/gradle.properties index 30298b3..6c1d873 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,5 +1,5 @@ org.gradle.jvmargs=-Xmx1536M android.useAndroidX=true android.enableJetifier=true -app.versionName=0.0.18 -app.versionCode=18 +app.versionName=0.0.19 +app.versionCode=19 diff --git a/assets/icons/boardSize_10.png b/assets/icons/boardSize_10.png deleted file mode 100644 index 4b4f7754fb46de7cf2ddfc265da900bf77cc0d3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 661 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0VXB0!k&?2PAU z7#J8NOI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kz!zASQ_9H;>y6lz{toT z#KWSYp`oRvrK_uJU|?WrX=!C;Wo>P3Yinz7Z|~sX5bdfH9UUFxrV|qr6B`?w<f)sS zoSc%9l9iQ}<FA|Jua_I3m!F?sP*6}5tXCYY-<6=>m0-}FsNbDv(3@n?muxU0#c)cR z;hZ^hR<B;YY15{iJ9qBcv*&Q5$&n*RjvYI8{P^(;7cN}BeEIh6+YcT*c=F`Q+qZ8& ze*E}pj>Z4~|7W~e{gi=$vCz}SF{I+w+uJAom>fk|0}gNsrn?@EbYUrUdh*}ixAxtx z6h|j1@AI+urk^?;S-NWSs*p|oTc;JSn%{7%`q)ZF2BN^9$^#F+JumsTuV@zExugp- zi*f?29#mzn+sVkl5W%s)TIZSGueD3$*ByOe_i{HktBqe*W#>PYm+I1n72dxTk*shy z+3@+sZE4ZZ0)Oi+^<PW=Fz3tO7y91pIp@Cn?crr$2rzn}@$KEVZp)5+GrzpODj}ox z*YC^meW197oARISLf77}X@*~4giqSHQ>OXY6lUG&RSXObH;V+Te?Lx|x9@+v>farL z&DWQ_cdvhH4cExPz+fP)@LOFY&XAEIh5N)m%XjZNkY#bR9o!nSbRUOk-+a#eAu!;3 S`i3cTAjO`pelF{r5}E+3Nbo}d diff --git a/assets/icons/boardSize_14.png b/assets/icons/boardSize_14.png deleted file mode 100644 index 18b3420564654a9adf32e5a91d0d41f82fd4e2ce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 774 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0VXB0!k&?2PAU z7#J8NOI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kz!zA*c;#z;>y6lz{tSB z&&H~up`od%simc*t*x!2qhnxTU~Ft`YHDh(qh)SxZmp|rZEbC1V`HbMZLg=};Nalo z<mBw^?CR?3;o;$BsOx2@=Vz?vXRPn%=ND+KA84W<5)u+>Vi0PoA7y3`7Z(?AZkUje zkd%~^oSdARnwplDR#H+@QBhG<RaISG-QZx>+uJ*7(xfR<rc9kWb;gVtvu4ejJ$v?? zIdisc+qP%Vo`VMu9y@mIY^c-Ir%ykA{P^k9r~m)|>&2?gU|?W8<>}%WQgQ3;9nWCl zK#_)vJS?n20y9&2x)ivYj86RcUoZCM?7IAf>l5AQ?*6mu-fF9ruS)jDm8=f^v&EX# z|F`6Yow^lP40yqNiGok1f8Ow|x_Ls}F0|J0yZ*+6_pNXJq?mbj3(r(!U~pL6u>1F~ zId1>w{`y;T)&BWEU9p&@b>@Nx4ky>1Tm0YmuOWl?PWfX^^(*a>Eiz%b(f9Yf{_D;1 zwf0|6uUvKh$vz?Ox+QkMRJTbppYeU>W5dqCa6ur!_M83g73aUdXkQtBWdDVncdIu( zNPm@n@wzQLvT65Z69j(OdkCu^&(n{8v2VkI->;e)ooyK$7Mp+k<W>9Y;_sFHaZdiv z{~7A(EZKMGgYO$lWbGgJGh}c4e=xAtP5t1~EB$WkTZ`uRa?f5V?-F0Uf}Mdu!ajQA z|F6EaeT)Bl{aqIR_2-@Pq=WOXtY4g8$%kxC54*_!OriMgj0_rL0e{kO-Mfb@i^&#Y h&nV}bSGM{`B~yZ2+wU_c&Xs}`dAj<!taD0e0stH>9UcGx diff --git a/assets/icons/boardSize_20.png b/assets/icons/boardSize_20.png deleted file mode 100644 index d3401d9dd4df7a871eb7ac88592707f63480d0dc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 962 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0VXB0!k&?2PAU z7#J8NOI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kz!zA<O}c#ab*AjMs`+S z4G_@O)X>({(ACn^)zZ|{($dn_)YsND(AG56*4Eb1GStyB*3r??)iTl5)z#P6H!v_T z)Uh=*G&C|YGB!3gF)=YSGcz|gx3I9Vw6wIcva+_ewzajjx3_n2aBy;Ra&d8Sb#--f zb8~lh_wexW@$vEV^Yi!j4+sbd3=9kp508wDjEahij*gCriHVDgi+5ZfA0MBTl$4yD zoRX4~mX?;4m6e~LUr<m`US3{NQBhM<Q&(5l($do2-rn2W+t=4OVZwxo6DLlYGG*Gd zX|rd~o-=38ym|B1tXZ>R!-kzZckbD<=g5&G$BrGlaN)w`%a`xmx%1$`gC|d(ynXxj z<HwKx|NpltwK>kfz+~#_;uunK>+PN6K_ZC~tQQ)Y`}n+s1Y8B$71EA2%qTw4ar1k< zp!nuLDW)O3y5IHkudZFUdFHzP*}J0G9!t;IaZoaAYt-TG(sLd%FmWg}U?u)}A9(Yz z{yB$5)GtGWDE7q(Yre={xcAs-b1m~S9+O~3mI4Ka$=Ryv2a8^wZ{BHT!5HRMFE(do z^T}G4oIjd7najNY%i64Hp7$pF<^5*!(hY(R42&!SaH8M@qwI{^dX~I;)BjmTtZ2?G zSp6k?K{R{ug_qI>MmL=QdN44uTu@Jt*|l3W{Gi`U`-a)28#wHy{?n`oVULwKUyJH& zi#-jT5q~3#cx!b2if;&Ie|}*5rTr}DUnPjD{bG9(An(Ay%f2P?U*buj8#;e&FRX2r zEZF}g{J>GG8SQ27n2{YO;K0z!x+QT_v=OJ6*L~|Ozv~ALH^lt9XTLn{+YYDy?x$>~ zaws&kF)vH_TYggQN6fGFd!L7wZs4h#@=v!Skp1;eek5NCI54!!81Q*pt7<<ed^x|F zyR?97kJewY9f9oLZ;oqgSYBZla5&5;8&MO!iErMNec!c9R`ON(FN~jFCw*sav+K9V zrFZU}K#L<bu8cqK&Fs?|m?SI~e4PK@{st#%U?4^5f`ttWAF`#dxccJ{E9;?cSL~-K Qz5(SZPgg&ebxsLQ0E{1ItN;K2 diff --git a/assets/icons/boardSize_6.png b/assets/icons/boardSize_6.png deleted file mode 100644 index 2c72840d2dfe2dfb36791973a159869a325de758..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 480 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0VXB0!k&?2PAU z7#J8NOI#yLg7ec#$`gxH8OqDc^)mCai<1)zQuXqS(r3T3kz!zA@Cfh;ab;j&U}R+A z=402;(9qP>)Y8(@*4Eb1(J?hOH8(eRa&mHYbxkOBPOfxGsd7n8O--wHEuZ3BHN&rO zOT_d8F|%gPnmv2=|Ns9*mhx&bFfdAbx;TbZ+<JR!H(!&3h-)C5=uvSEyMO=vLv_?m zj<xLERaTi1!KygfC$v@nYNNNmLoH_vF9T`dgL=b5o51>-YyP&fU5s<Y<V%?t7&N#p z+}$*7eeLA;u@f6!+peyBd%I>o6SBcI>;)3{)3=_hnqT|5*7RL_62tHFd|#^>8sZuE z*gq<pZu-u5-}ctpBmY2w3)lFW=}^3BK{P9af{wzUt*3vY7ztN}o58{8QTiZAbRT<` WRNXSKx%+!SN<CfuT-G@yGywo@K!HpE diff --git a/assets/icons/colorsCount_5.png b/assets/icons/colorsCount_5.png deleted file mode 100644 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{p}k{ou{&^WTr}esiYwnbFB-dHS>30_Gb> z&rEyA6v29V4Jgg8Z|E}%;!}*-GEq-aX3IobH-_);bb@9+^*uS;L)CohahJ)rUYRji zY>wN%G-T!VW2rI<Qv}0Tx1V2XqI)ZoqvHF_OTPLG9tbUD(oc96<n@`6fh6!?Kidu? z?fd|%)whL(t_ynkY<RsnJ%FpfP*S%>*V=d0hMikG%r>pqx^sfrCZDNGkFPb|?rHi> zc)_Vp?z->f3f}#Y4645Uo4w%a`FRo>OZhLnuU+`%--2M#1CR5k*g@QKfMJ8-N&ohl z3~^s=AZ}}@m)MZ__0$TD+lNv&dRm{m|D0oj)GmePt)>TNXP$Gt$B;i+dj_*f@TA%1 z4wsc=&oJIn;xBI4)@z**!25mvl!>dD-Q177KWQBnG->{HDSPb$4;HWR3w4;9x+J&z zpUbUh`{b-|gl~uqZI~aGW7nX0hT+g=7dDm>Bj%3j2RAL~ly+Ehx*@BqA=+rc6xj!@ zJQ`{26<W;eHZk8wZI~;o;BNJ=(NC3;ccr@3-#4$ecr_Ge)lC%5yybGY;=12YS&`K` z4wn!0?W((9d_slUPm|}umc-d_KYcqUY8SllK-p5pd&kz<7d?O8SrIWyEbY_Wo@E?Y z8ST~nHYz5&@fiLoKAWz?@b9*M1@p4%3g)J0mh1y7tPV;U{9E^cM`FV=->2QXuR7Yw z{BPkps=t1B_w?vL^8c39^nWt9*wdDs`S}dn^i58|S-km%n%iEi&wh8Opy>Lo6&))V zDjwE#R9v_%^riT`-<2z~PU}_A&Ek%)mi@i-_^+qzQ(kS3UBw_*yY!3Ubxuem5KsPz zb@<Efl|O}XO8WCjx1NWwD9Ge4v1-w3*vHDiz))f<osl{#(s{-CTK4Okc122MY<USX N+tbz0Wt~$(699v-Cj|fi diff --git a/assets/icons/colorsCount_6.png b/assets/icons/colorsCount_6.png deleted file mode 100644 index 2a63916ed00f0570bedd1647e34706d041fbec44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2010 zcmeA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gk`DSL3zV^C=hIvx!kDQyFz`1(v*(~8w zrnofUvOhP&v>smH_`QT_(VOlo5_0wtH?PhMwK`tPq%pt#+~T$M=N|}HKJ*OY;`n%a z?ZoIUvsbKpG>vE9&fo~`hAyFba{ce-Sfr-fu4KLNK}7DQ`=q1;_a@JJ^MB2TGzQk$ zRR=4M*#+?~coo<C&Az~1ll{W_aJ78<;y~Gz>;gY0&*gC5X6=?WccW-@ZCuiKNo8#z zHm!MIwm<GXc>L!5=W!dKsZS4FwLDhn?aDhZv~?<e{hXxxds0t;(Z{QwgZo#j_3ZYW zP$<0W%+J%RkygjE!W<I*th&w;X=;~X_qkmq{(K)3X}O7kLFvF6cGj7p{1LyVs^ps) zD_Fb@3tYx}`uQ2Lrw=1GGo9e-P7-uYsW$tg?d0umoA(i9{(lwi^NUX!2|StbS^UR? V4Izr}6dr-ZJzf1=);T3K0RV)w5hnlu diff --git a/assets/icons/colorsCount_7.png b/assets/icons/colorsCount_7.png deleted file mode 100644 index fdc1669a1d89ed225cc4624319ff01558ab987b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1543 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0WCPk}I_+{y{! z3=9mCC9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NHH)l*#`K8xH2#>FfuSO zF)}hUGO{o+vNAETF)^_-GjT98bFwgVu`qM9vhcF9@UgK9u(Jwtu!(ZAi*d3`a&bs= zbIS8_De!VB@^LHkajRshsPgluty`xqz@sj}tKl!F86>Y+SECgouT`t1EySl?tF7JK zq$9+q)7qkY=8W#yvwFh(dTz4%!u<Lo{02E$Mxp|yVuGe~OwGgu&BcW*{{Od<5Vn;R zagr8wmJxOJs(15lbe9$PkQ4W^j`Wt7@R67BHIw(V2=sGz2vC#?FqIE<wh2*|4po*8 z%{~xr;t;9q6s0N~Rd6a=#V$roE><}zR$VSmB|6T)Bwo!pUR^#}LnlR3A;m~J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S!(|5`rK(qumJ;b%Jg6vlUvQPrLo z89($tZMeFGCm<p7tEwyOgU14VH(XCKy#Db=@ariC)4di8W=vre`~36x@2QMl(SPQZ zOfO-)GqL8ML=fAJ<jl{iN53@eVwBm?IfXH7+viD1We1uK_%sw^8UBmd{Xe0W+OS#I z&WZOD>kpeL=l3^EVKj@lRqOeXAz1gXAnUo$Z%=Ld#y2DTZBW2<y?t5nw%?Yy_)j)D zU$87aM{vr-cP8gzriV-t&-!_LvPpL563I5@wVxI)IAzja_;~x0_dn&JkwPr>;$lOg zv8pROqw91QQC3FP`zp5loFCr%2u)2YPt6sb`gGItr`=X>__zLel`ZmA?b9j0s?Ix` tCfgaEd{w9pD$4(*Zq+=S<+$SVUsiUm)Y%_p|0ja%_H^}gS?83{1OU_kG$a53 diff --git a/assets/icons/colorsCount_8.png b/assets/icons/colorsCount_8.png deleted file mode 100644 index b660ef3e29aefc5c940a327aaf7a22d76a73bb23..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2193 zcmeAS@N?(olHy`uVBq!ia0y~yU^oE69Lx+145>_WOc@v$I14-?iy0WCPk}I_+{y{! z3=9mCC9V-A!TD(=<%vb94CUqJdYO6I#mR{Use1WE>9gP2NHH)ly$kROab*AjMlfJv zVq|7!Vr6DxV_{}zVdh|E=455zVgn&=HWnUsRvva%UJf>XPBsBfHbE|SVQzL2ZVpi% z5EA3z5a;C-=i`*(=aS~<k`dsR72uW=<dzrYQ4j(lMPXiL5ndHhJ~c6Z4KaRAaRDs} z0c{BZ9SK2QNkKg+L47G918E^cX(1zNVIvt~6Il^cIT3R?Q44udO9fFY1u<&{7i|SU zRmDJcC2>0?aeJj84W+CKrJ5FH2?u2fN9Cq2<(3{52`7~-6;(-RRY?~$Nmn%~H??)^ z)TP|jr9CvHJvF4gG-bRs^_?{xQnh4#wRGLItdq5BwX|jZv}OIZYqfRc0(9g8b>)I| z<%4z4oY6gdR$n39Kq10FF~U$W(oiwVP$S$>FWE>b#z-T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650UGCUE{(TQp?q^+nmj8do z?03(eD79yw{Fg6rbN`X2KR)UE)kQvMCm}mCFfcSYOBKBAox_vO_~viV#J#!=wf4oI z)(TxH`7IH4EOf{6d&f_OlplRny2j?hl3PDk{j9k7mEnCWV{H1qrOWQ@l&)oDU|`^r j;W^oJ=|+;klLepoL$dll#x{Ov1v$gh)z4*}Q$iB}yHHS= diff --git a/fastlane/metadata/android/en-US/changelogs/19.txt b/fastlane/metadata/android/en-US/changelogs/19.txt new file mode 100644 index 0000000..ad92c19 --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/19.txt @@ -0,0 +1 @@ +Use painters to draw game parameters selector items. diff --git a/fastlane/metadata/android/fr-FR/changelogs/19.txt b/fastlane/metadata/android/fr-FR/changelogs/19.txt new file mode 100644 index 0000000..a4c146b --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/19.txt @@ -0,0 +1 @@ +Utilisation de painters pour dessiner les items de sélection des paramètres de jeu. diff --git a/icons/boardSize_10.svg b/icons/boardSize_10.svg deleted file mode 100644 index bcc2fba..0000000 --- a/icons/boardSize_10.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#f29c38" stroke="#000" stroke-width="2"/> - <g transform="translate(11.967 8.1117)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="18.962" y="22.818" width="12.714" height="12.714"/><rect x="31.676" y="22.818" width="12.714" height="12.714"/><rect x="44.389" y="22.818" width="12.714" height="12.714"/><rect x="18.962" y="35.531" width="12.714" height="12.714"/><rect x="31.676" y="35.531" width="12.714" height="12.714"/><rect x="44.389" y="35.531" width="12.714" height="12.714"/><rect x="18.962" y="48.245" width="12.714" height="12.714"/><rect x="31.676" y="48.245" width="12.714" height="12.714"/><rect x="44.389" y="48.245" width="12.714" height="12.714"/></g></svg> diff --git a/icons/boardSize_14.svg b/icons/boardSize_14.svg deleted file mode 100644 index 174a530..0000000 --- a/icons/boardSize_14.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#cd5542" stroke="#000" stroke-width="2"/> - <g transform="translate(6.2763 8.2075)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="18.296" y="16.365" width="12.714" height="12.714"/><rect x="31.01" y="16.365" width="12.714" height="12.714"/><rect x="43.724" y="16.365" width="12.714" height="12.714"/><rect x="56.437" y="16.365" width="12.714" height="12.714"/><rect x="18.296" y="29.079" width="12.714" height="12.714"/><rect x="31.01" y="29.079" width="12.714" height="12.714"/><rect x="43.724" y="29.079" width="12.714" height="12.714"/><rect x="56.437" y="29.079" width="12.714" height="12.714"/><rect x="18.296" y="41.792" width="12.714" height="12.714"/><rect x="31.01" y="41.792" width="12.714" height="12.714"/><rect x="43.724" y="41.792" width="12.714" height="12.714"/><rect x="56.437" y="41.792" width="12.714" height="12.714"/><rect x="18.296" y="54.506" width="12.714" height="12.714"/><rect x="31.01" y="54.506" width="12.714" height="12.714"/><rect x="43.724" y="54.506" width="12.714" height="12.714"/><rect x="56.437" y="54.506" width="12.714" height="12.714"/></g></svg> diff --git a/icons/boardSize_20.svg b/icons/boardSize_20.svg deleted file mode 100644 index fe07dfb..0000000 --- a/icons/boardSize_20.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#5f41af" stroke="#000" stroke-width="2"/> - <g transform="translate(4.4197 1.4084)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="13.796" y="16.807" width="12.714" height="12.714"/><rect x="26.51" y="16.807" width="12.714" height="12.714"/><rect x="39.223" y="16.807" width="12.714" height="12.714"/><rect x="51.937" y="16.807" width="12.714" height="12.714"/><rect x="64.651" y="16.807" width="12.714" height="12.714"/><rect x="13.796" y="29.521" width="12.714" height="12.714"/><rect x="26.51" y="29.521" width="12.714" height="12.714"/><rect x="39.223" y="29.521" width="12.714" height="12.714"/><rect x="51.937" y="29.521" width="12.714" height="12.714"/><rect x="64.651" y="29.521" width="12.714" height="12.714"/><rect x="13.796" y="42.235" width="12.714" height="12.714"/><rect x="26.51" y="42.235" width="12.714" height="12.714"/><rect x="39.223" y="42.235" width="12.714" height="12.714"/><rect x="51.937" y="42.235" width="12.714" height="12.714"/><rect x="64.651" y="42.235" width="12.714" height="12.714"/><rect x="13.796" y="54.948" width="12.714" height="12.714"/><rect x="26.51" y="54.948" width="12.714" height="12.714"/><rect x="39.223" y="54.948" width="12.714" height="12.714"/><rect x="51.937" y="54.948" width="12.714" height="12.714"/><rect x="64.651" y="54.948" width="12.714" height="12.714"/><rect x="13.796" y="67.662" width="12.714" height="12.714"/><rect x="26.51" y="67.662" width="12.714" height="12.714"/><rect x="39.223" y="67.662" width="12.714" height="12.714"/><rect x="51.937" y="67.662" width="12.714" height="12.714"/><rect x="64.651" y="67.662" width="12.714" height="12.714"/></g></svg> diff --git a/icons/boardSize_6.svg b/icons/boardSize_6.svg deleted file mode 100644 index 1ccb6e9..0000000 --- a/icons/boardSize_6.svg +++ /dev/null @@ -1,3 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 100 100" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" ry="0" fill="#97c05c" stroke="#000" stroke-width="2"/> - <g transform="translate(8.8715 12.603)" fill="#fff" stroke="#282828" stroke-linecap="round" stroke-width="3"><rect x="28.415" y="24.683" width="12.714" height="12.714"/><rect x="41.128" y="24.683" width="12.714" height="12.714"/><rect x="28.415" y="37.397" width="12.714" height="12.714"/><rect x="41.128" y="37.397" width="12.714" height="12.714"/></g></svg> diff --git a/icons/build_game_icons.sh b/icons/build_game_icons.sh index f86f10b..57b8c13 100755 --- a/icons/build_game_icons.sh +++ b/icons/build_game_icons.sh @@ -25,12 +25,6 @@ AVAILABLE_GAME_IMAGES=" placeholder " -# Settings images -AVAILABLES_GAME_SETTINGS=" - boardSize:6,10,14,20 - colorsCount:5,6,7,8 -" - ####################################################### # optimize svg @@ -73,19 +67,6 @@ function build_icon() { optipng ${OPTIPNG_OPTIONS} ${TARGET} } -function build_settings_icons() { - INPUT_STRING="$1" - - SETTING_NAME="$(echo "${INPUT_STRING}" | cut -d":" -f1)" - SETTING_VALUES="$(echo "${INPUT_STRING}" | cut -d":" -f2 | tr "," " ")" - - for SETTING_VALUE in ${SETTING_VALUES} - do - SETTING_CODE="${SETTING_NAME}_${SETTING_VALUE}" - build_icon ${CURRENT_DIR}/${SETTING_CODE}.svg ${ASSETS_DIR}/icons/${SETTING_CODE}.png - done -} - ####################################################### # Create output folders @@ -101,9 +82,3 @@ for GAME_IMAGE in ${AVAILABLE_GAME_IMAGES} do build_icon ${CURRENT_DIR}/${GAME_IMAGE}.svg ${ASSETS_DIR}/icons/${GAME_IMAGE}.png done - -# build settings images -for GAME_SETTING in ${AVAILABLES_GAME_SETTINGS} -do - build_settings_icons "${GAME_SETTING}" -done diff --git a/icons/colorsCount_5.svg b/icons/colorsCount_5.svg deleted file mode 100644 index 2f218e9..0000000 --- a/icons/colorsCount_5.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#97c05c" stroke="#000" stroke-width="2"/><g transform="translate(-1.0061 .33115)" aria-label="5"><path d="m63.315 55.063q0 2.2656-0.85938 4.2188-0.83984 1.9336-2.4609 3.3203-1.7969 1.4844-4.1406 2.207-2.3242 0.70312-5.3125 0.70312-3.4961-0.01953-5.918-0.56641-2.4023-0.52734-3.9258-1.1914v-6.4258h0.82031q1.7773 1.0547 3.8281 1.7578t4.082 0.70312q1.2305 0 2.6562-0.27344 1.4453-0.29297 2.2852-1.0352 0.66406-0.60547 0.99609-1.2305 0.35156-0.625 0.35156-1.9336 0-1.0156-0.46875-1.7383-0.44922-0.74219-1.1719-1.1914-1.0547-0.64453-2.5391-0.83984-1.4844-0.21484-2.6953-0.21484-1.7578 0-3.3789 0.3125-1.6016 0.29297-2.8125 0.58594h-0.85938v-16.406h20.684v5.5664h-13.633v4.7461q0.60547-0.03906 1.5234-0.05859 0.9375-0.03906 1.6406-0.03906 2.4023 0 4.2773 0.46875 1.8945 0.44922 3.2617 1.2695 1.7773 1.0742 2.7734 2.8516 0.99609 1.7578 0.99609 4.4336z"/></g><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg> diff --git a/icons/colorsCount_6.svg b/icons/colorsCount_6.svg deleted file mode 100644 index 6df1641..0000000 --- a/icons/colorsCount_6.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#f29c38" stroke="#000" stroke-width="2"/><g transform="translate(3.8694 .21001)" aria-label="6"><path d="m59.025 55.399q0 2.2461-0.82031 4.2188t-2.3047 3.3203q-1.582 1.4453-3.6719 2.207-2.0703 0.76172-4.8633 0.76172-2.6172 0-4.7852-0.70312-2.1484-0.72266-3.6914-2.1875-1.7773-1.6797-2.7148-4.3359t-0.9375-6.3477q0-3.8281 0.87891-6.7969t2.8711-5.2539q1.9141-2.1875 4.9609-3.3984 3.0664-1.2109 7.2852-1.2109 1.4258 0 3.125 0.19531t2.207 0.29297v5.7227h-0.74219q-0.52734-0.25391-1.7969-0.56641-1.25-0.33203-2.8516-0.33203-3.75 0-5.8398 1.8359t-2.5195 5.1172q1.5039-0.89844 3.1641-1.4453 1.6797-0.56641 3.6133-0.56641 1.6992 0 3.1445 0.39062 1.4648 0.39062 2.7148 1.25 1.6211 1.1328 2.5977 3.0469 0.97656 1.9141 0.97656 4.7852zm-8.8867 4.3945q0.60547-0.66406 0.95703-1.5625 0.37109-0.91797 0.37109-2.4805 0-1.4258-0.41016-2.3242-0.41016-0.91797-1.1328-1.4648-0.70312-0.54688-1.6602-0.74219-0.95703-0.21484-1.9727-0.21484-0.85938 0-1.7969 0.19531-0.9375 0.19531-1.7188 0.48828 0 0.19531-0.01953 0.64453t-0.01953 1.1328q0 2.4023 0.46875 3.9648 0.48828 1.543 1.2891 2.3633 0.54688 0.60547 1.2891 0.89844 0.74219 0.27344 1.6016 0.27344 0.64453 0 1.4258-0.29297t1.3281-0.87891z"/></g><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg> diff --git a/icons/colorsCount_7.svg b/icons/colorsCount_7.svg deleted file mode 100644 index 7870bc7..0000000 --- a/icons/colorsCount_7.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#cd5542" stroke="#000" stroke-width="2"/><g transform="translate(3.9378 .2393)" aria-label="7"><path d="m58.459 42.001-13.164 23.301h-8.3594l13.672-23.516h-14.941v-5.5664h22.793z"/></g><rect x="5.6671" y="67.01" width="29.323" height="29.323" fill="#38ffff" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg> diff --git a/icons/colorsCount_8.svg b/icons/colorsCount_8.svg deleted file mode 100644 index 37f3949..0000000 --- a/icons/colorsCount_8.svg +++ /dev/null @@ -1,2 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg enable-background="new 0 0 100 100" version="1.1" viewBox="0 0 102 102" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="100" height="100" ry="0" fill="#6041b0" stroke="#000" stroke-width="2"/><g transform="translate(4.1624 .2393)" aria-label="8"><path d="m59.123 57.177q0 3.8672-3.3008 6.3281-3.2812 2.4609-9.0234 2.4609-3.2227 0-5.5273-0.66406-2.3047-0.66406-3.8086-1.8359-1.4844-1.1523-2.207-2.6953-0.70312-1.543-0.70312-3.3203 0-2.1875 1.2695-3.8672 1.2891-1.6992 4.4336-2.9688v-0.11719q-2.5391-1.1719-3.7305-2.9492t-1.1914-4.1211q0-3.457 3.2031-5.6641 3.2031-2.207 8.3398-2.207 5.3906 0 8.4375 2.0117 3.0664 1.9922 3.0664 5.332 0 2.0703-1.2891 3.6914t-3.9453 2.7539v0.11719q3.0469 1.1523 4.5117 3.1055t1.4648 4.6094zm-8.0664-13.438q0-1.4844-1.1523-2.3633-1.1328-0.87891-3.0273-0.87891-0.70312 0-1.4453 0.17578-0.72266 0.17578-1.3281 0.50781-0.56641 0.33203-0.9375 0.87891-0.37109 0.52734-0.37109 1.2109 0 1.1523 0.64453 1.7969 0.66406 0.64453 2.1484 1.2891 0.54688 0.23438 1.4844 0.58594 0.95703 0.33203 2.3047 0.76172 0.89844-1.0547 1.2891-1.8945 0.39062-0.83984 0.39062-2.0703zm0.60547 13.77q0-1.4062-0.70312-2.1289t-2.8906-1.6602q-0.64453-0.29297-1.875-0.72266-1.2305-0.42969-2.0703-0.74219-0.83984 0.76172-1.5234 1.8555-0.66406 1.0742-0.66406 2.4219 0 2.0312 1.4453 3.2422 1.4648 1.1914 3.8086 1.1914 0.625 0 1.4648-0.17578 0.83984-0.19531 1.4453-0.58594 0.70312-0.44922 1.1328-1.0547 0.42969-0.60547 0.42969-1.6406z"/></g><rect x="5.6671" y="36.339" width="29.323" height="29.323" fill="#f2739d" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="67.01" width="29.323" height="29.323" fill="#38ffff" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="67.01" width="29.323" height="29.323" fill="#a13cb1" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="67.01" width="29.323" height="29.323" fill="#ff6f43" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="36.339" width="29.323" height="29.323" fill="#ffce2c" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="67.01" y="5.6672" width="29.323" height="29.323" fill="#359c35" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="36.339" y="5.6672" width="29.323" height="29.323" fill="#708cfd" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/><rect x="5.6671" y="5.6672" width="29.323" height="29.323" fill="#e63a3f" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".5" stroke-width=".76239"/></svg> diff --git a/lib/config/default_game_settings.dart b/lib/config/default_game_settings.dart index 7c9e2c8..f57c958 100644 --- a/lib/config/default_game_settings.dart +++ b/lib/config/default_game_settings.dart @@ -4,20 +4,30 @@ class DefaultGameSettings { 'colorsCount', ]; - static const int defaultBoardSizeValue = 10; + static const int boardSizeValueSmall = 6; + static const int boardSizeValueMedium = 10; + static const int boardSizeValueLarge = 14; + static const int boardSizeValueExtraLarge = 20; + + static const int defaultBoardSizeValue = boardSizeValueMedium; static const List<int> allowedBoardSizeValues = [ - 6, - 10, - 14, - 20, + boardSizeValueSmall, + boardSizeValueMedium, + boardSizeValueLarge, + boardSizeValueExtraLarge, ]; - static const int defaultColorsCountValue = 6; + static const int colorsCountValueLow = 5; + static const int colorsCountValueMedium = 6; + static const int colorsCountValueHigh = 7; + static const int colorsCountValueVeryHigh = 8; + + static const int defaultColorsCountValue = colorsCountValueMedium; static const List<int> allowedColorsCountValues = [ - 5, - 6, - 7, - 8, + colorsCountValueLow, + colorsCountValueMedium, + colorsCountValueHigh, + colorsCountValueVeryHigh, ]; static List<int> getAvailableValues(String parameterCode) { diff --git a/lib/ui/painters/parameter_painter.dart b/lib/ui/painters/parameter_painter.dart new file mode 100644 index 0000000..35ff29a --- /dev/null +++ b/lib/ui/painters/parameter_painter.dart @@ -0,0 +1,223 @@ +import 'dart:math'; + +import 'package:flutter/material.dart'; + +import 'package:jeweled/config/default_game_settings.dart'; +import 'package:jeweled/utils/color_extensions.dart'; +import 'package:jeweled/utils/color_theme.dart'; + +class ParameterPainter extends CustomPainter { + const ParameterPainter({ + required this.code, + required this.value, + required this.isSelected, + }); + + final String code; + final int value; + final bool isSelected; + + @override + void paint(Canvas canvas, Size size) { + // force square + final double canvasSize = min(size.width, size.height); + + const Color borderColorEnabled = Colors.blue; + const Color borderColorDisabled = Colors.white; + + // "enabled/disabled" border + final paint = Paint(); + paint.style = PaintingStyle.stroke; + paint.color = this.isSelected ? borderColorEnabled : borderColorDisabled; + paint.strokeJoin = StrokeJoin.round; + paint.strokeWidth = 20 / 100 * canvasSize; + canvas.drawRect(Rect.fromPoints(Offset(0, 0), Offset(canvasSize, canvasSize)), paint); + + // content + switch (code) { + case 'colorsCount': + paintColorsCountParameterItem(value, canvas, canvasSize); + break; + case 'boardSize': + paintBoardSizeParameterItem(value, canvas, canvasSize); + break; + default: + print('Unknown parameter: ' + code + '/' + value.toString()); + paintUnknownParameterItem(value, canvas, canvasSize); + } + } + + @override + bool shouldRepaint(CustomPainter oldDelegate) { + return false; + } + + // "unknown" parameter -> simple bock with text + void paintUnknownParameterItem(final int value, final Canvas canvas, final double size) { + final textSpan = TextSpan( + text: '?' + '\n' + value.toString(), + style: const TextStyle( + color: Colors.black, + fontSize: 18, + fontWeight: FontWeight.bold, + ), + ); + final textPainter = TextPainter( + text: textSpan, + textDirection: TextDirection.ltr, + ); + textPainter.layout(); + textPainter.paint( + canvas, + Offset( + (size - textPainter.width) * 0.5, + (size - textPainter.height) * 0.5, + ), + ); + } + + void paintBoardSizeParameterItem(final int value, final Canvas canvas, final double size) { + Color backgroundColor = Colors.grey; + int gridWidth = 1; + + switch (value) { + case DefaultGameSettings.boardSizeValueSmall: + backgroundColor = Colors.green; + gridWidth = 2; + break; + case DefaultGameSettings.boardSizeValueMedium: + backgroundColor = Colors.orange; + gridWidth = 3; + break; + case DefaultGameSettings.boardSizeValueLarge: + backgroundColor = Colors.red; + gridWidth = 4; + break; + case DefaultGameSettings.boardSizeValueExtraLarge: + backgroundColor = Colors.purple; + gridWidth = 5; + break; + default: + print('Wrong value for boardSize parameter value: ' + value.toString()); + } + + final paint = Paint(); + paint.strokeJoin = StrokeJoin.round; + paint.strokeWidth = 3 / 100 * size; + + // Colored background + paint.color = backgroundColor; + paint.style = PaintingStyle.fill; + canvas.drawRect(Rect.fromPoints(Offset(0, 0), Offset(size, size)), paint); + + // Mini grid + final borderColor = Colors.grey.shade800; + + final double cellSize = size / 7; + final double origin = (size - gridWidth * cellSize) / 2; + + for (int row = 0; row < gridWidth; row++) { + for (int col = 0; col < gridWidth; col++) { + final Offset topLeft = Offset(origin + col * cellSize, origin + row * cellSize); + final Offset bottomRight = topLeft + Offset(cellSize, cellSize); + + final squareColor = Color(ColorTheme.getColorCode(col + row * gridWidth)); + + paint.color = squareColor; + paint.style = PaintingStyle.fill; + canvas.drawRect(Rect.fromPoints(topLeft, bottomRight), paint); + + paint.color = borderColor; + paint.style = PaintingStyle.stroke; + canvas.drawRect(Rect.fromPoints(topLeft, bottomRight), paint); + } + } + } + + void paintColorsCountParameterItem(final int value, final Canvas canvas, final double size) { + Color backgroundColor = Colors.grey; + + switch (value) { + case DefaultGameSettings.colorsCountValueLow: + backgroundColor = Colors.green; + break; + case DefaultGameSettings.colorsCountValueMedium: + backgroundColor = Colors.orange; + break; + case DefaultGameSettings.colorsCountValueHigh: + backgroundColor = Colors.red; + break; + case DefaultGameSettings.colorsCountValueVeryHigh: + backgroundColor = Colors.purple; + break; + default: + print('Wrong value for colorsCount parameter value: ' + value.toString()); + } + + final paint = Paint(); + paint.strokeJoin = StrokeJoin.round; + paint.strokeWidth = 3 / 100 * size; + + // Colored background + paint.color = backgroundColor; + paint.style = PaintingStyle.fill; + canvas.drawRect(Rect.fromPoints(Offset(0, 0), Offset(size, size)), paint); + + // Colors preview + const List<Offset> positions = [ + Offset(0, 0), + Offset(1, 0), + Offset(2, 0), + Offset(2, 1), + Offset(2, 2), + Offset(1, 2), + Offset(0, 2), + Offset(0, 1), + ]; + + final double padding = 4 / 100 * size; + final double margin = 3 / 100 * size; + final double width = ((size - 2 * padding) / 3) - 2 * margin; + + for (int colorIndex = 0; colorIndex < value; colorIndex++) { + final Offset position = positions[colorIndex]; + + final Offset topLeft = Offset(padding + margin + position.dx * (width + 2 * margin), + padding + margin + position.dy * (width + 2 * margin)); + + final Offset bottomRight = topLeft + Offset(width, width); + + final squareColor = Color(ColorTheme.getColorCode(colorIndex)); + paint.color = squareColor; + paint.style = PaintingStyle.fill; + canvas.drawRect(Rect.fromPoints(topLeft, bottomRight), paint); + + final borderColor = squareColor.darken(20); + paint.color = borderColor; + paint.style = PaintingStyle.stroke; + canvas.drawRect(Rect.fromPoints(topLeft, bottomRight), paint); + } + + // centered text value + final textSpan = TextSpan( + text: value.toString(), + style: TextStyle( + color: Colors.black, + fontSize: size / 4, + fontWeight: FontWeight.bold, + ), + ); + final textPainter = TextPainter( + text: textSpan, + textDirection: TextDirection.ltr, + ); + textPainter.layout(); + textPainter.paint( + canvas, + Offset( + (size - textPainter.width) * 0.5, + (size - textPainter.height) * 0.5, + ), + ); + } +} diff --git a/lib/ui/widgets/parameters.dart b/lib/ui/widgets/parameters.dart index 6ee9a47..15d1ccc 100644 --- a/lib/ui/widgets/parameters.dart +++ b/lib/ui/widgets/parameters.dart @@ -5,55 +5,53 @@ import 'package:jeweled/config/default_game_settings.dart'; import 'package:jeweled/cubit/game_cubit.dart'; import 'package:jeweled/cubit/settings_cubit.dart'; import 'package:jeweled/models/game_settings.dart'; +import 'package:jeweled/ui/painters/parameter_painter.dart'; class Parameters extends StatelessWidget { const Parameters({super.key}); - static const double separatorHeight = 2.0; - static const double blockMargin = 3.0; - static const double blockPadding = 2.0; - static const Color buttonBackgroundColor = Colors.white; - static const Color buttonBorderColorActive = Colors.blue; - static const Color buttonBorderColorInactive = Colors.white; - static const double buttonBorderWidth = 10.0; - static const double buttonBorderRadius = 8.0; - static const double buttonPadding = 0.0; - static const double buttonMargin = 0.0; - @override Widget build(BuildContext context) { + final double displayWidth = MediaQuery.of(context).size.width; + + final double separatorHeight = 8.0; + return BlocBuilder<SettingsCubit, SettingsState>( builder: (BuildContext context, SettingsState settingsState) { final GameCubit gameCubit = BlocProvider.of<GameCubit>(context); final SettingsCubit settingsCubit = BlocProvider.of<SettingsCubit>(context); - final List<Widget> lines = []; + final List<Widget> lines = [ + SizedBox(height: separatorHeight), + ]; DefaultGameSettings.availableParameters.forEach((code) { - final List<dynamic> availableValues = DefaultGameSettings.getAvailableValues(code); + final List<int> availableValues = DefaultGameSettings.getAvailableValues(code); if (availableValues.length > 1) { - final List<Widget> parameterButtons = []; + final int currentValue = settingsCubit.getParameterValue(code); - final dynamic currentValue = settingsCubit.getParameterValue(code); + final double itemWidth = displayWidth / availableValues.length - 25; + + final List<Widget> parameterButtons = []; availableValues.forEach((value) { final bool isActive = (value == currentValue); - final String imageAsset = code + '_' + value.toString(); final Widget parameterButton = TextButton( child: Container( - margin: EdgeInsets.all(buttonMargin), - padding: EdgeInsets.all(buttonPadding), - decoration: BoxDecoration( - color: buttonBackgroundColor, - borderRadius: BorderRadius.circular(buttonBorderRadius), - border: Border.all( - color: isActive ? buttonBorderColorActive : buttonBorderColorInactive, - width: buttonBorderWidth, + margin: EdgeInsets.all(0), + padding: EdgeInsets.all(0), + child: CustomPaint( + size: Size(itemWidth, itemWidth), + willChange: false, + painter: ParameterPainter( + code: code, + value: value, + isSelected: isActive, ), + isComplex: true, ), - child: buildImageWidget(imageAsset), ), onPressed: () => settingsCubit.setParameterValue(code, value), ); @@ -61,30 +59,20 @@ class Parameters extends StatelessWidget { parameterButtons.add(parameterButton); }); - lines.add(Table( - defaultColumnWidth: IntrinsicColumnWidth(), - children: [ - TableRow( - children: parameterButtons, - ), - ], + lines.add(Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: parameterButtons, )); lines.add(SizedBox(height: separatorHeight)); } }); - return Container( - child: Column( - children: [ - SizedBox(height: separatorHeight), - Column( - children: lines, - ), - SizedBox(height: separatorHeight), - buildStartNewGameButton(gameCubit, settingsState.settings), - ], - ), + lines.add(SizedBox(height: separatorHeight)); + lines.add(buildStartNewGameButton(gameCubit, settingsState.settings)); + + return Column( + children: lines, ); }, ); @@ -115,6 +103,9 @@ class Parameters extends StatelessWidget { } static Container buildStartNewGameButton(GameCubit gameCubit, GameSettings settings) { + const double blockMargin = 3.0; + const double blockPadding = 2.0; + return Container( margin: EdgeInsets.all(blockMargin), padding: EdgeInsets.all(blockPadding), diff --git a/lib/utils/color_theme.dart b/lib/utils/color_theme.dart index c6172db..9152f0d 100644 --- a/lib/utils/color_theme.dart +++ b/lib/utils/color_theme.dart @@ -40,9 +40,7 @@ class ColorTheme { if (value != null && itemColors.containsKey(skin) && null != itemColors[skin]) { List<int> skinColors = itemColors[skin] ?? []; - if (skinColors.length > value) { - return (skinColors[value % getColorsCount()]) | 0xFF000000; - } + return (skinColors[value % getColorsCount()]) | 0xFF000000; } return defaultItemColor | 0xFF000000; } diff --git a/pubspec.yaml b/pubspec.yaml index 52d05e3..c32d629 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Jeweled Game publish_to: 'none' -version: 0.0.18+18 +version: 0.0.19+19 environment: sdk: '^3.0.0' -- GitLab