@@ -139,11 +139,20 @@ else if(mRound.getID() % 2 == 1)
139
139
else mBockCountInfo .setVisibility (View .GONE );
140
140
141
141
for (int i =0 ;i <mGame .getPlayerCount ();i ++){
142
+ mPoints = mGame .getPlayer (i ).getPointHistory (mRound .getID ());
142
143
mPlayerPoints = (TextView )v .findViewById (DokoData .mTvTablePlayerName [i ]);
143
- mPoints = mGame . getPlayer ( i ). getPointHistory ( mRound . getID ());
144
+
144
145
mPlayerPoints .setText (Functions .getFloatAsString (mPoints ));
145
146
if (mPoints < 0 ) mPlayerPoints .setTextColor (parent .getResources ().getColor (R .color .red ));
146
147
else mPlayerPoints .setTextColor (parent .getResources ().getColor (R .color .green_dark ));
148
+
149
+ // if points don't change player was suspended
150
+ if (mGame .isMarkSuspendedPlayersEnable () &&
151
+ mRound .getID () > 0 &&
152
+ mPoints == mGame .getPlayer (i ).getPointHistory (mRound .getID () - 1 )) {
153
+ mPlayerPoints .setTextColor (parent .getResources ().getColor (R .color .blue_dark ));
154
+ }
155
+
147
156
148
157
}
149
158
v .setOnLongClickListener (mRoundNrLongListerner );
@@ -215,17 +224,19 @@ else if(mGame.getPlayerCount() != 4 && v.getId() != R.id.fragment_game_round_vie
215
224
else mBockCnt .setText (null );
216
225
//Set player (name,points,state,colors)
217
226
mTmp = (int ) ((double )mGame .getPlayerCount ()/2 + 0.5d );
227
+ //Log.d("tag","pc:"+mGame.getPlayerCount());
218
228
219
- for (int i =0 ; i < (mGame .getMAXPlayerCount ()/mPlayerPerRow ) && i < mTmp ; i ++){
229
+ for (int i =0 ; i <(mGame .getMAXPlayerCount ()/mPlayerPerRow ); i ++){
220
230
switch (i ){
221
231
case 0 : mPlayerRow = (LinearLayout )v .findViewById (R .id .fragment_game_round_2_player_row0 ); break ;
222
232
case 1 : mPlayerRow = (LinearLayout )v .findViewById (R .id .fragment_game_round_2_player_row1 ); break ;
223
233
case 2 : mPlayerRow = (LinearLayout )v .findViewById (R .id .fragment_game_round_2_player_row2 ); break ;
224
234
case 3 : mPlayerRow = (LinearLayout )v .findViewById (R .id .fragment_game_round_2_player_row3 ); break ;
225
235
}
226
236
227
- if (mPlayerRow == null ) return v ;
228
237
238
+ if (mPlayerRow == null ) return v ;
239
+ if (i >=mTmp ) mPlayerRow .setVisibility (View .GONE );
229
240
//Left
230
241
mPlayerLeftName = (TextView )mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_left_name );
231
242
mPlayerLeftPoints = (TextView )mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_left_points );
@@ -240,9 +251,21 @@ else if(mGame.getPlayerCount() != 4 && v.getId() != R.id.fragment_game_round_vie
240
251
if (mRound .getID ()>0 ) mPointsDiff = mPoints - mGame .getPlayer (i *mPlayerPerRow ).getPointHistory (mRound .getID ()-1 );
241
252
else mPointsDiff = mPoints ;
242
253
243
- if (mPointsDiff == 0 || mRound .getPoints () == 0 ) mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .navigation_cancel ));
244
- else if (mPointsDiff > 0 )mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_green ));
245
- else mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_red ));
254
+
255
+ if (mPointsDiff == 0 || mRound .getPoints () == 0 ) {
256
+ if (mGame .isMarkSuspendedPlayersEnable ()) {
257
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_left_player ).setBackgroundDrawable (v .getResources ().getDrawable (R .drawable .select_gray ));
258
+ }
259
+ mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .navigation_cancel ));
260
+ }
261
+ else if (mPointsDiff > 0 ) {
262
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_left_player ).setBackgroundDrawable (null );
263
+ mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_green ));
264
+ }
265
+ else {
266
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_left_player ).setBackgroundDrawable (null );
267
+ mPlayerLeftRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_red ));
268
+ }
246
269
247
270
//Right
248
271
mPlayerRightName = (TextView )mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_right_name );
@@ -268,9 +291,20 @@ else if(mGame.getPlayerCount() != 4 && v.getId() != R.id.fragment_game_round_vie
268
291
if (mRound .getID ()>0 ) mPointsDiff = mPoints - mGame .getPlayer (i *mPlayerPerRow +1 ).getPointHistory (mRound .getID ()-1 );
269
292
else mPointsDiff = mPoints ;
270
293
271
- if (mPointsDiff == 0 || mRound .getPoints () == 0 ) mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .navigation_cancel ));
272
- else if (mPointsDiff > 0 )mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_green ));
273
- else mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_red ));
294
+ if (mPointsDiff == 0 || mRound .getPoints () == 0 ) {
295
+ if (mGame .isMarkSuspendedPlayersEnable ()) {
296
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_right_player ).setBackgroundDrawable (v .getResources ().getDrawable (R .drawable .select_gray ));
297
+ }
298
+ mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .navigation_cancel ));
299
+ }
300
+ else if (mPointsDiff > 0 ) {
301
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_right_player ).setBackgroundDrawable (null );;
302
+ mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_green ));
303
+ }
304
+ else {
305
+ mPlayerRow .findViewById (R .id .fragment_game_round_2_player_row_player_row_right_player ).setBackgroundDrawable (null );
306
+ mPlayerRightRoundState .setImageDrawable (parent .getResources ().getDrawable (R .drawable .ic_arrow_up_red ));
307
+ }
274
308
}
275
309
276
310
}
0 commit comments