Revision 4895fff6
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/dialog/RubikDialogNewRecord.java | ||
---|---|---|
34 | 34 |
|
35 | 35 |
import org.distorted.magic.R; |
36 | 36 |
import org.distorted.magic.RubikActivity; |
37 |
import org.distorted.scores.RubikScoresDownloader;
|
|
37 |
import org.distorted.object.RubikObjectList;
|
|
38 | 38 |
import org.distorted.uistate.RubikState; |
39 |
import org.distorted.uistate.RubikStatePlay; |
|
39 | 40 |
|
40 | 41 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
41 | 42 |
|
... | ... | |
72 | 73 |
@Override |
73 | 74 |
public void onClick(DialogInterface dialog, int which) |
74 | 75 |
{ |
75 |
RubikScoresDownloader downloader = RubikScoresDownloader.getInstance(); |
|
76 |
downloader.submit(); |
|
77 | 76 |
RubikActivity act = (RubikActivity)getActivity(); |
78 | 77 |
RubikState.switchState(act,RubikState.PLAY); |
78 |
|
|
79 |
RubikStatePlay play = (RubikStatePlay) RubikState.PLAY.getStateClass(); |
|
80 |
int object = play.getObject(); |
|
81 |
int size = play.getSize(); |
|
82 |
|
|
83 |
Bundle bundle = new Bundle(); |
|
84 |
bundle.putInt("tab", RubikObjectList.pack(object,size) ); |
|
85 |
bundle.putBoolean("submitting", true); |
|
86 |
|
|
87 |
RubikDialogScores scores = new RubikDialogScores(); |
|
88 |
scores.setArguments(bundle); |
|
89 |
scores.show(act.getSupportFragmentManager(), null); |
|
79 | 90 |
} |
80 | 91 |
}); |
81 | 92 |
builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() |
Also available in: Unified diff
Beginnings of submitting one's high scores.