Revision 6b034729
Added by Leszek Koltunski almost 2 years ago
src/main/java/org/distorted/purchase/PurchaseScreenPane.java | ||
---|---|---|
74 | 74 |
|
75 | 75 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
76 | 76 |
|
77 |
private void showError(PurchaseActivity act)
|
|
77 |
private void showStatus(PurchaseActivity act)
|
|
78 | 78 |
{ |
79 | 79 |
RubikDialogStarsStatus d = new RubikDialogStarsStatus(); |
80 | 80 |
d.show(act.getSupportFragmentManager(), null); |
... | ... | |
110 | 110 |
} |
111 | 111 |
else |
112 | 112 |
{ |
113 |
showError(act);
|
|
113 |
showStatus(act);
|
|
114 | 114 |
} |
115 | 115 |
} |
116 | 116 |
} |
... | ... | |
126 | 126 |
} |
127 | 127 |
else |
128 | 128 |
{ |
129 |
showError(act);
|
|
129 |
showStatus(act);
|
|
130 | 130 |
} |
131 | 131 |
} |
132 | 132 |
|
src/main/java/org/distorted/screens/RubikScreenPlay.java | ||
---|---|---|
30 | 30 |
import android.widget.RelativeLayout; |
31 | 31 |
import android.widget.TextView; |
32 | 32 |
|
33 |
import org.distorted.dialogs.RubikDialogStarsStatus; |
|
33 | 34 |
import org.distorted.dialogs.RubikDialogUpdates; |
34 | 35 |
import org.distorted.external.RubikNetwork; |
35 | 36 |
import org.distorted.external.RubikScores; |
... | ... | |
48 | 49 |
import org.distorted.objects.RubikObject; |
49 | 50 |
import org.distorted.objects.RubikObjectList; |
50 | 51 |
|
52 |
import static android.view.View.GONE; |
|
51 | 53 |
import static android.view.View.inflate; |
54 |
import static org.distorted.main.RubikActivity.USE_IAP; |
|
52 | 55 |
|
53 | 56 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
54 | 57 |
|
... | ... | |
56 | 59 |
{ |
57 | 60 |
public static final int NUM_COLUMNS = 5; |
58 | 61 |
public static final int LEVELS_SHOWN = 8; |
59 |
private static final int NUM_BUTTONS = 6; |
|
60 | 62 |
private static final int[] mLocation = new int[2]; |
61 | 63 |
|
62 | 64 |
private TransparentImageButton mObjButton, mMenuButton, mSolveButton, mScrambleButton; |
... | ... | |
341 | 343 |
mMenuPopup.setContentView(layout); |
342 | 344 |
mMenuPopup.setFocusable(true); |
343 | 345 |
int padding = (int)(width*RubikActivity.MEDIUM_MARGIN); |
344 |
|
|
346 |
int numButtons = USE_IAP ? 7 : 6; |
|
345 | 347 |
mMenuLayoutWidth = (int)(width*0.65f); |
346 |
mMenuLayoutHeight= padding + NUM_BUTTONS*(mMenuButtonHeight+padding) + 4*mMenuButtonHeight+6*padding;
|
|
348 |
mMenuLayoutHeight= padding + numButtons*(mMenuButtonHeight+padding) + 4*mMenuButtonHeight+6*padding;
|
|
347 | 349 |
|
348 | 350 |
layout.setPadding(padding,0,padding,0); |
349 | 351 |
|
352 |
if( USE_IAP ) |
|
353 |
{ |
|
354 |
Button stars = layout.findViewById(R.id.menuStars); |
|
355 |
stars.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize); |
|
356 |
stars.setOnClickListener( new View.OnClickListener() |
|
357 |
{ |
|
358 |
@Override |
|
359 |
public void onClick(View v) |
|
360 |
{ |
|
361 |
mMenuPopup.dismiss(); |
|
362 |
RubikDialogStarsStatus d = new RubikDialogStarsStatus(); |
|
363 |
d.show(act.getSupportFragmentManager(), null); |
|
364 |
} |
|
365 |
}); |
|
366 |
} |
|
367 |
else |
|
368 |
{ |
|
369 |
Button stars = layout.findViewById(R.id.menuStars); |
|
370 |
stars.setVisibility(GONE); |
|
371 |
} |
|
372 |
|
|
350 | 373 |
Button highScores = layout.findViewById(R.id.menuHighScores); |
351 | 374 |
highScores.setTextSize(TypedValue.COMPLEX_UNIT_PX, mMenuTextSize); |
352 | 375 |
highScores.setOnClickListener( new View.OnClickListener() |
src/main/res/layout/popup_menu.xml | ||
---|---|---|
6 | 6 |
android:gravity="center" |
7 | 7 |
android:orientation="vertical"> |
8 | 8 |
|
9 |
<Button |
|
10 |
android:id="@+id/menuStars" |
|
11 |
android:text="@string/stars" |
|
12 |
android:layout_width="match_parent" |
|
13 |
android:layout_height="0dp" |
|
14 |
android:layout_weight="1.0" |
|
15 |
android:paddingRight="10dp" |
|
16 |
android:paddingLeft="10dp" |
|
17 |
android:singleLine="true" |
|
18 |
android:backgroundTint="@color/dark_grey" |
|
19 |
android:gravity="center"/> |
|
20 |
|
|
9 | 21 |
<Button |
10 | 22 |
android:id="@+id/menuHighScores" |
11 | 23 |
android:text="@string/scores" |
src/main/res/values-de/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">Tiefe</string> |
45 | 45 |
<string name="animation">Animation</string> |
46 | 46 |
|
47 |
<string name="stars">Sterne</string> |
|
47 | 48 |
<string name="scores">Highscores</string> |
48 | 49 |
<string name="patterns">Hübsche Muster</string> |
49 | 50 |
<string name="control">Den Würfel steuern</string> |
src/main/res/values-es/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">Profundidad</string> |
45 | 45 |
<string name="animation">Animación</string> |
46 | 46 |
|
47 |
<string name="stars">Estrellas</string> |
|
47 | 48 |
<string name="scores">Leaderboard</string> |
48 | 49 |
<string name="patterns">Patrones</string> |
49 | 50 |
<string name="control">Controla el cubo</string> |
src/main/res/values-fr/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">Profondeur</string> |
45 | 45 |
<string name="animation">Animation</string> |
46 | 46 |
|
47 |
<string name="stars">Étoiles</string> |
|
47 | 48 |
<string name="scores">Meilleurs scores</string> |
48 | 49 |
<string name="patterns">Jolis motifs</string> |
49 | 50 |
<string name="control">Contrôle du cube</string> |
src/main/res/values-ja/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">深さ</string> |
45 | 45 |
<string name="animation">効果</string> |
46 | 46 |
|
47 |
<string name="stars">星</string> |
|
47 | 48 |
<string name="scores">ハイスコア</string> |
48 | 49 |
<string name="patterns">プリティパターン</string> |
49 | 50 |
<string name="control">キューブの制御</string> |
src/main/res/values-ko/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">깊이</string> |
45 | 45 |
<string name="animation">효과</string> |
46 | 46 |
|
47 |
<string name="stars">별</string> |
|
47 | 48 |
<string name="scores">고득점</string> |
48 | 49 |
<string name="patterns">예쁜 패턴</string> |
49 | 50 |
<string name="control">큐브 제어</string> |
src/main/res/values-pl/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">Głębokość</string> |
45 | 45 |
<string name="animation">Animacja</string> |
46 | 46 |
|
47 |
<string name="stars">Gwiazdki</string> |
|
47 | 48 |
<string name="scores">Lista najlepszych</string> |
48 | 49 |
<string name="patterns">Piękne Wzory</string> |
49 | 50 |
<string name="control">Obroty Kostki</string> |
src/main/res/values-ru/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">Глубина</string> |
45 | 45 |
<string name="animation">Эффект</string> |
46 | 46 |
|
47 |
<string name="stars">Звезды</string> |
|
47 | 48 |
<string name="scores">Высокие баллы</string> |
48 | 49 |
<string name="patterns">Красивые узоры</string> |
49 | 50 |
<string name="control">Управление кубом</string> |
src/main/res/values-zh-rCN/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">深度</string> |
45 | 45 |
<string name="animation">动画</string> |
46 | 46 |
|
47 |
<string name="stars">星星</string> |
|
47 | 48 |
<string name="scores">高分</string> |
48 | 49 |
<string name="patterns">模式</string> |
49 | 50 |
<string name="control">控制立方体</string> |
src/main/res/values-zh-rTW/strings.xml | ||
---|---|---|
44 | 44 |
<string name="depth">深度</string> |
45 | 45 |
<string name="animation">動畫</string> |
46 | 46 |
|
47 |
<string name="stars">星星</string> |
|
47 | 48 |
<string name="scores">高分</string> |
48 | 49 |
<string name="patterns">模式</string> |
49 | 50 |
<string name="control">控制立方體</string> |
src/main/res/values/strings.xml | ||
---|---|---|
46 | 46 |
<string name="depth">Depth</string> |
47 | 47 |
<string name="animation">Animation</string> |
48 | 48 |
|
49 |
<string name="stars">Stars</string> |
|
49 | 50 |
<string name="scores">High Scores</string> |
50 | 51 |
<string name="patterns">Pretty Patterns</string> |
51 | 52 |
<string name="control">Control the Cube</string> |
Also available in: Unified diff
Add Stars to the main menu.