Revision 63dd19c4
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
35 | 35 |
import android.widget.LinearLayout; |
36 | 36 |
import android.widget.PopupWindow; |
37 | 37 |
|
38 |
import org.distorted.network.RubikNetwork; |
|
39 |
import org.distorted.network.RubikUpdates; |
|
38 | 40 |
import org.distorted.objectlib.main.ObjectControl; |
39 | 41 |
|
40 | 42 |
import org.distorted.main.R; |
... | ... | |
53 | 55 |
|
54 | 56 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
55 | 57 |
|
56 |
public class RubikScreenPlay extends RubikScreenBase |
|
58 |
public class RubikScreenPlay extends RubikScreenBase implements RubikNetwork.Updatee
|
|
57 | 59 |
{ |
58 | 60 |
public static final int NUM_COLUMNS = 5; |
59 | 61 |
public static final int LEVELS_SHOWN = 10; |
... | ... | |
229 | 231 |
mObjectSize = (int)(cubeWidth + 2*margin + 0.5f); |
230 | 232 |
mMaxRowCount = (int)((height-1.8f*mUpperBarHeight)/mObjectSize); |
231 | 233 |
|
234 |
RubikNetwork network = RubikNetwork.getInstance(); |
|
235 |
network.signUpForUpdates(this); |
|
236 |
|
|
232 | 237 |
LinearLayout view = (LinearLayout)inflate( act, R.layout.popup_object, null); |
233 | 238 |
GridLayout objectGrid = view.findViewById(R.id.objectGrid); |
234 | 239 |
|
... | ... | |
676 | 681 |
{ |
677 | 682 |
return mShouldReactToEndOfScrambling; |
678 | 683 |
} |
684 |
|
|
685 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
686 |
|
|
687 |
public void receiveUpdate(RubikUpdates updates) |
|
688 |
{ |
|
689 |
updates.showDebug(); |
|
690 |
} |
|
691 |
|
|
692 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
693 |
|
|
694 |
public void errorUpdate() |
|
695 |
{ |
|
696 |
android.util.Log.e("D", "Error receiving update"); |
|
697 |
} |
|
679 | 698 |
} |
Also available in: Unified diff
Progress downloading updates.