force invite alert to stay up as long as a host has players missing.

This commit is contained in:
Eric House 2015-01-24 14:18:30 -08:00
parent 445d44e773
commit dd6aa95068
5 changed files with 26 additions and 11 deletions

View file

@ -1282,6 +1282,7 @@ public final class R {
/**
*/
public static final int invite_sms_desc_fmt=0x7f05021d;
public static final int invite_stays=0x7f0502d7;
/** <string name="sms_or_email">Send invitation using SMS (texting) or
via email?</string>
<string name="nfc_or_email">Send invitation using NFC (Android

View file

@ -539,8 +539,8 @@
greater than one this text is appended to the above. -->
<string name="invite_multiple">\u0020(You are expecting multiple
remote players. You don\'t have to invite them all at once, but
the game will not start until everybody has been invited and all
invitations have been accepted.)</string>
this alert will not be dismissed until everybody has been invited
and all invitations have been accepted.)</string>
<!-- Short for "points", this is shown at the right end of the
tray in place of the first tile placed along with the points
@ -2290,4 +2290,7 @@
do the same thing.\n\n(If you hide the buttons and want them back
you can enable them in the Appearance section of App settings.)
</string>
<string name="invite_stays">(This dialog will stay up until all
invited players have connected.)</string>
</resources>

View file

@ -454,8 +454,8 @@
greater than one this text is appended to the above. -->
<string name="invite_multiple">\u0020uOy( era gnitcepxe elpitlum
etomer sreyalp. Uoy nod\'t evah ot etivni meht lla ta ,ecno tub
eht emag lliw ton trats litnu ydobyreve sah neeb detivni dna lla
snoitativni evah neeb detpecca.)</string>
siht trela lliw ton eb dessimsid litnu ydobyreve sah neeb detivni
dna lla snoitativni evah neeb detpecca.)</string>
<!-- Short for "points", this is shown at the right end of the
tray in place of the first tile placed along with the points
the current move would earn if committed. -->
@ -1946,4 +1946,6 @@
od eht emas gniht.\n\nfI( uoy edih eht snottub dna tnaw meht kcab
uoy nac elbane meht ni eht Ecnaraeppa noitces fo Ppa sgnittes.)
</string>
<string name="invite_stays">sIht( golaid lliw yats pu litnu lla
detivni sreyalp evah detcennoc.)</string>
</resources>

View file

@ -454,8 +454,8 @@
greater than one this text is appended to the above. -->
<string name="invite_multiple">\u0020(YOU ARE EXPECTING MULTIPLE
REMOTE PLAYERS. YOU DON\'T HAVE TO INVITE THEM ALL AT ONCE, BUT
THE GAME WILL NOT START UNTIL EVERYBODY HAS BEEN INVITED AND ALL
INVITATIONS HAVE BEEN ACCEPTED.)</string>
THIS ALERT WILL NOT BE DISMISSED UNTIL EVERYBODY HAS BEEN INVITED
AND ALL INVITATIONS HAVE BEEN ACCEPTED.)</string>
<!-- Short for "points", this is shown at the right end of the
tray in place of the first tile placed along with the points
the current move would earn if committed. -->
@ -1946,4 +1946,6 @@
DO THE SAME THING.\n\n(IF YOU HIDE THE BUTTONS AND WANT THEM BACK
YOU CAN ENABLE THEM IN THE APPEARANCE SECTION OF APP SETTINGS.)
</string>
<string name="invite_stays">(THIS DIALOG WILL STAY UP UNTIL ALL
INVITED PLAYERS HAVE CONNECTED.)</string>
</resources>

View file

@ -465,10 +465,16 @@ public class BoardDelegate extends DelegateBase
showInviteChoicesThen( Action.LAUNCH_INVITE_ACTION );
}
};
OnClickListener lstnr2 = new OnClickListener() {
public void onClick( DialogInterface dialog,
int item ) {
finish();
}
};
dialog = ab.setTitle( R.string.query_title )
.setMessage( "" )
.setPositiveButton( R.string.button_yes, lstnr )
.setNegativeButton( R.string.button_no, null )
.setPositiveButton( R.string.newgame_invite, lstnr )
.setNegativeButton( R.string.button_close_game, lstnr2 )
.create();
break;
@ -502,9 +508,8 @@ public class BoardDelegate extends DelegateBase
ps = getString( R.string.invite_if_nfc );
}
}
if ( null != ps ) {
message += "\n\n" + ps;
}
message += "\n\n" +
(null == ps ? getString( R.string.invite_stays ) : ps);
ad.setMessage( message );
break;
@ -652,6 +657,8 @@ public class BoardDelegate extends DelegateBase
// in case of change...
setBackgroundColor();
setKeepScreenOn();
} else if ( 0 < m_nMissing ) {
showDialog( DlgID.DLG_INVITE );
}
}
}