Shapes can now be recieved through fulfilling tasks
This commit is contained in:
@ -370,13 +370,13 @@
|
||||
<tileData x="13.151686" width="32.30337"/>
|
||||
</ceilingTiles>
|
||||
<obstacles class="java.util.ArrayList">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7331653" rightEdge="3.1601653" height="0.357" y="-0.006666664">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="1.7464986" rightEdge="3.1734986" height="0.357" y="0.013333336">
|
||||
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.06666667">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="3.2206645" rightEdge="4.672664" height="0.395" y="-0.02">
|
||||
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.7519975" rightEdge="5.847997" height="0.408" y="-0.13333336">
|
||||
<obstacleData floating="true" moving="false" deadly="false" leftEdge="4.718664" rightEdge="5.814664" height="0.408" y="-0.04666668">
|
||||
<moveComponent width="0.0" height="0.0" x="0.0" y="0.0" speed="0.0"/>
|
||||
</obstacleData>
|
||||
<obstacleData floating="false" moving="false" deadly="false" leftEdge="7.4900084" rightEdge="7.9900084" height="0.777" y="-0.21150002">
|
||||
|
@ -0,0 +1,31 @@
|
||||
package de.frajul.endlessroll.entities.shapes;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.levels.LevelManager;
|
||||
|
||||
/**
|
||||
* Created by Julian on 30.10.2017.
|
||||
*/
|
||||
|
||||
public class CollectEnergyTask extends Task {
|
||||
|
||||
public CollectEnergyTask(int condition) {
|
||||
super(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditionFulfilled(LevelManager levelManager) {
|
||||
return levelManager.getTotalCollectedEnergyCount() >= condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(Context context, LevelManager levelManager) {
|
||||
if (conditionFulfilled) {
|
||||
return context.getString(R.string.task_collect_energy_format_d, condition);
|
||||
}
|
||||
return context.getString(R.string.task_collect_energy_progress_format_ddd, condition,
|
||||
levelManager.getTotalCollectedEnergyCount(), condition);
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package de.frajul.endlessroll.entities.shapes;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.levels.LevelManager;
|
||||
|
||||
/**
|
||||
* Created by Julian on 30.10.2017.
|
||||
*/
|
||||
|
||||
public class CollectStarTask extends Task {
|
||||
|
||||
public CollectStarTask(int condition) {
|
||||
super(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditionFulfilled(LevelManager levelManager) {
|
||||
return levelManager.getTotalCollectedStarCount() >= condition;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(Context context, LevelManager levelManager) {
|
||||
if (conditionFulfilled) {
|
||||
return context.getString(R.string.task_collect_stars_format_d, condition);
|
||||
}
|
||||
return context.getString(R.string.task_collect_stars_progress_format_ddd, condition,
|
||||
levelManager.getTotalCollectedStarCount(), condition);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package de.frajul.endlessroll.entities.shapes;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.levels.LevelManager;
|
||||
|
||||
/**
|
||||
* Created by Julian on 30.10.2017.
|
||||
*/
|
||||
|
||||
public class CompleteWorldTask extends Task {
|
||||
|
||||
public CompleteWorldTask(int condition) {
|
||||
super(condition);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditionFulfilled(LevelManager levelManager) {
|
||||
return levelManager.getPackWithId(condition).isAllLevelsFinished();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(Context context, LevelManager levelManager) {
|
||||
return context.getString(R.string.task_complete_world_format_d, condition);
|
||||
}
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package de.frajul.endlessroll.entities.shapes;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.levels.LevelManager;
|
||||
|
||||
/**
|
||||
* Created by Julian on 30.10.2017.
|
||||
*/
|
||||
|
||||
public class EmptyTask extends Task{
|
||||
|
||||
public EmptyTask() {
|
||||
super(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean checkConditionFulfilled(LevelManager levelManager) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString(Context context, LevelManager levelManager) {
|
||||
return context.getString(R.string.task_empty);
|
||||
}
|
||||
}
|
@ -12,24 +12,37 @@ import de.frajul.endlessroll.entities.textures.TexturePack;
|
||||
*/
|
||||
|
||||
public enum PlayerShape {
|
||||
BALL(R.string.playershape_name_ball, R.drawable.playershapes_ball),
|
||||
CLOCK(R.string.playershape_name_clock, R.drawable.playershapes_clock),
|
||||
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral, R.drawable.playershapes_hypno_spiral),
|
||||
PACMAN(R.string.playershape_name_pacman, R.drawable.playershapes_pacman),
|
||||
SMILEY(R.string.playershape_name_smiley, R.drawable.playershapes_smiley),
|
||||
WHEEL(R.string.playershape_name_wheel, R.drawable.playershapes_wheel),
|
||||
SUN(R.string.playershape_name_sun, R.drawable.playershapes_sun);
|
||||
BALL(R.string.playershape_name_ball, R.string.playershape_description_ball,
|
||||
R.drawable.playershapes_ball, new EmptyTask()),
|
||||
CLOCK(R.string.playershape_name_clock, R.string.playershape_description_clock,
|
||||
R.drawable.playershapes_clock, new CollectStarTask(15)),
|
||||
HYPNO_SPIRAL(R.string.playershape_name_hypno_spiral,
|
||||
R.string.playershape_description_hypno_spiral, R.drawable.playershapes_hypno_spiral,
|
||||
new CollectEnergyTask(3)),
|
||||
PACMAN(R.string.playershape_name_pacman, R.string.playershape_description_pacman,
|
||||
R.drawable.playershapes_pacman, new CompleteWorldTask(1)),
|
||||
SMILEY(R.string.playershape_name_smiley, R.string.playershape_description_smiley,
|
||||
R.drawable.playershapes_smiley, new CollectStarTask(30)),
|
||||
WHEEL(R.string.playershape_name_wheel, R.string.playershape_description_wheel,
|
||||
R.drawable.playershapes_wheel, new CollectStarTask(48)),
|
||||
SUN(R.string.playershape_name_sun, R.string.playershape_description_sun,
|
||||
R.drawable.playershapes_sun, new CollectEnergyTask(16));
|
||||
|
||||
@StringRes
|
||||
private int nameId;
|
||||
@StringRes
|
||||
private int descriptionId;
|
||||
@DrawableRes
|
||||
private int drawableId;
|
||||
private Task unlockTask;
|
||||
|
||||
private Texture texture;
|
||||
|
||||
PlayerShape(@StringRes int nameId, @DrawableRes int drawableId) {
|
||||
PlayerShape(@StringRes int nameId, @StringRes int descriptionId, @DrawableRes int drawableId, Task unlockTask) {
|
||||
this.nameId = nameId;
|
||||
this.descriptionId = descriptionId;
|
||||
this.drawableId = drawableId;
|
||||
this.unlockTask = unlockTask;
|
||||
}
|
||||
|
||||
public static void loadAllTextures(TexturePack texturePack) {
|
||||
@ -43,11 +56,20 @@ public enum PlayerShape {
|
||||
texture = texturePack.loadTexture(drawableId);
|
||||
}
|
||||
|
||||
public Task getUnlockTask() {
|
||||
return unlockTask;
|
||||
}
|
||||
|
||||
@StringRes
|
||||
public int getNameId() {
|
||||
return nameId;
|
||||
}
|
||||
|
||||
@StringRes
|
||||
public int getDescriptionId() {
|
||||
return descriptionId;
|
||||
}
|
||||
|
||||
@DrawableRes
|
||||
public int getDrawableId() {
|
||||
return drawableId;
|
||||
|
@ -0,0 +1,31 @@
|
||||
package de.frajul.endlessroll.entities.shapes;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import de.frajul.endlessroll.levels.LevelManager;
|
||||
|
||||
/**
|
||||
* Created by Julian on 29.10.2017.
|
||||
*/
|
||||
|
||||
public abstract class Task {
|
||||
|
||||
protected int condition;
|
||||
protected boolean conditionFulfilled;
|
||||
|
||||
public Task(int condition) {
|
||||
this.condition = condition;
|
||||
}
|
||||
|
||||
public void update(LevelManager levelManager){
|
||||
conditionFulfilled = checkConditionFulfilled(levelManager);
|
||||
}
|
||||
|
||||
protected abstract boolean checkConditionFulfilled(LevelManager levelManager);
|
||||
|
||||
public abstract String toString(Context context, LevelManager levelManager);
|
||||
|
||||
public boolean isConditionFulfilled() {
|
||||
return conditionFulfilled;
|
||||
}
|
||||
}
|
@ -2,13 +2,13 @@ package de.frajul.endlessroll.main.screens;
|
||||
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
import android.widget.TableRow;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.entities.shapes.PlayerShape;
|
||||
import de.frajul.endlessroll.entities.shapes.PlayerShapeButtonOnClickListener;
|
||||
import de.frajul.endlessroll.main.GameActivity;
|
||||
import de.frajul.endlessroll.views.PlayerShapeButton;
|
||||
import de.frajul.endlessroll.views.ShapeInspector;
|
||||
import de.frajul.endlessroll.views.TopBar;
|
||||
|
||||
/**
|
||||
@ -18,6 +18,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
|
||||
private PlayerShapeButton activeButton;
|
||||
|
||||
private ShapeInspector shapeInspector;
|
||||
|
||||
private TopBar topBar;
|
||||
private LinearLayout topRow;
|
||||
private LinearLayout bottomRow;
|
||||
@ -27,6 +29,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
topBar = super.createTopBar(R.id.shape_shop_topbar);
|
||||
topRow = (LinearLayout) layout.findViewById(R.id.shape_shop_topRow);
|
||||
bottomRow = (LinearLayout) layout.findViewById(R.id.shape_shop_bottomRow);
|
||||
shapeInspector = new ShapeInspector(gameActivity,
|
||||
layout.findViewById(R.id.shape_shop_shape_inspector));
|
||||
}
|
||||
|
||||
private void createViews() {
|
||||
@ -35,9 +39,12 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
int i = 0;
|
||||
int totalShapes = PlayerShape.values().length;
|
||||
for (PlayerShape playerShape : PlayerShape.values()) {
|
||||
playerShape.getUnlockTask().update(gameActivity.getLevelManager());
|
||||
boolean lastInRow = i == totalShapes / 2 || i == totalShapes - 1;
|
||||
boolean locked = !playerShape.getUnlockTask()
|
||||
.isConditionFulfilled();
|
||||
PlayerShapeButton button = new PlayerShapeButton(gameActivity, playerShape, this,
|
||||
!lastInRow);
|
||||
locked, !lastInRow);
|
||||
if (i < totalShapes / 2 + 1)
|
||||
topRow.addView(button.getView());
|
||||
else
|
||||
@ -50,6 +57,8 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
shapeInspector.update(activeButton.getPlayerShape(), activeButton.isLocked());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -66,9 +75,12 @@ public class PlayerShapeShopScreen extends Screen<RelativeLayout> implements Pla
|
||||
|
||||
@Override
|
||||
public void onClick(PlayerShapeButton button) {
|
||||
activeButton.stopRotating();
|
||||
activeButton = button;
|
||||
activeButton.startRotating();
|
||||
gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape());
|
||||
shapeInspector.update(button.getPlayerShape(), button.isLocked());
|
||||
if (!button.isLocked()) {
|
||||
activeButton.stopRotating();
|
||||
activeButton = button;
|
||||
activeButton.startRotating();
|
||||
gameActivity.getUser().setCurrentPlayerShape(button.getPlayerShape());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package de.frajul.endlessroll.views;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
@ -29,25 +28,29 @@ public class PlayerShapeButton implements View.OnClickListener {
|
||||
private Button button;
|
||||
private Animation rotation;
|
||||
|
||||
public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean marginToRight) {
|
||||
private boolean locked;
|
||||
|
||||
public PlayerShapeButton(GameActivity gameActivity, PlayerShape playerShape, PlayerShapeButtonOnClickListener clickListener, boolean locked, boolean marginToRight) {
|
||||
this.clickListener = clickListener;
|
||||
this.playerShape = playerShape;
|
||||
this.locked = locked;
|
||||
view = LayoutInflater.from(gameActivity).inflate(R.layout.shape_button, null);
|
||||
view.setLayoutParams(createLayoutParams(marginToRight));
|
||||
textView = (TextView) view.findViewById(R.id.shape_button_textview);
|
||||
textView.setTypeface(gameActivity.getTypeface());
|
||||
textView.setText(playerShape.getNameId());
|
||||
textView.setText(locked ? R.string.playershape_name_locked : playerShape.getNameId());
|
||||
button = (Button) view.findViewById(R.id.shape_button_button);
|
||||
button.setBackgroundDrawable(gameActivity.getResources().getDrawable(playerShape.getDrawableId()));
|
||||
button.setBackgroundDrawable(
|
||||
gameActivity.getResources().getDrawable(locked ? R.drawable.playershapes_locked : playerShape.getDrawableId()));
|
||||
button.setOnClickListener(this);
|
||||
rotation = AnimationUtils.loadAnimation(gameActivity, R.anim.shape_button_rotation);
|
||||
}
|
||||
|
||||
private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight){
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
if(marginToRight)
|
||||
params.setMargins(0, 0, 60, 0);
|
||||
private LinearLayout.LayoutParams createLayoutParams(boolean marginToRight) {
|
||||
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
if (marginToRight)
|
||||
params.setMargins(0, 0, 60, 0);
|
||||
return params;
|
||||
}
|
||||
|
||||
@ -68,6 +71,10 @@ public class PlayerShapeButton implements View.OnClickListener {
|
||||
return view;
|
||||
}
|
||||
|
||||
public boolean isLocked() {
|
||||
return locked;
|
||||
}
|
||||
|
||||
public PlayerShape getPlayerShape() {
|
||||
return playerShape;
|
||||
}
|
||||
|
@ -0,0 +1,54 @@
|
||||
package de.frajul.endlessroll.views;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.entities.shapes.EmptyTask;
|
||||
import de.frajul.endlessroll.entities.shapes.PlayerShape;
|
||||
import de.frajul.endlessroll.entities.shapes.Task;
|
||||
import de.frajul.endlessroll.main.GameActivity;
|
||||
|
||||
/**
|
||||
* Created by Julian on 03.06.2017.
|
||||
*/
|
||||
|
||||
public class ShapeInspector {
|
||||
|
||||
private GameActivity gameActivity;
|
||||
|
||||
private TextView title;
|
||||
private ImageView imageView;
|
||||
private TextView description;
|
||||
private ShapeInspectorCheckbox checkbox;
|
||||
|
||||
private PlayerShape shape;
|
||||
private boolean locked;
|
||||
|
||||
public ShapeInspector(GameActivity gameActivity, View layout) {
|
||||
this.gameActivity = gameActivity;
|
||||
Typeface typeface = gameActivity.getTypeface();
|
||||
title = (TextView) layout.findViewById(R.id.shape_inspector_title);
|
||||
title.setTypeface(typeface);
|
||||
imageView = (ImageView) layout.findViewById(R.id.shape_inspector_imageview);
|
||||
description = (TextView) layout.findViewById(R.id.shape_inspector_description);
|
||||
description.setTypeface(typeface);
|
||||
checkbox = new ShapeInspectorCheckbox(gameActivity, typeface,
|
||||
layout.findViewById(R.id.shape_inspector_check_box));
|
||||
}
|
||||
|
||||
public void update(PlayerShape shape, boolean locked) {
|
||||
this.shape = shape;
|
||||
this.locked = locked;
|
||||
|
||||
title.setText(locked ? R.string.playershape_name_locked : shape.getNameId());
|
||||
imageView.setImageDrawable(gameActivity.getResources()
|
||||
.getDrawable(locked ? R.drawable.playershapes_locked : shape.getDrawableId()));
|
||||
description.setText(
|
||||
locked ? R.string.playershape_description_locked : shape.getDescriptionId());
|
||||
|
||||
checkbox.updateForTask(shape.getUnlockTask());
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
package de.frajul.endlessroll.views;
|
||||
|
||||
import android.graphics.Typeface;
|
||||
import android.view.View;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
import de.frajul.endlessroll.R;
|
||||
import de.frajul.endlessroll.entities.shapes.EmptyTask;
|
||||
import de.frajul.endlessroll.entities.shapes.Task;
|
||||
import de.frajul.endlessroll.main.GameActivity;
|
||||
|
||||
/**
|
||||
* Created by Julian on 30.10.2017.
|
||||
*/
|
||||
|
||||
public class ShapeInspectorCheckbox {
|
||||
|
||||
private GameActivity gameActivity;
|
||||
private View layout;
|
||||
private ImageView image;
|
||||
private TextView textView;
|
||||
|
||||
public ShapeInspectorCheckbox(GameActivity gameActivity, Typeface typeface, View layout) {
|
||||
this.gameActivity = gameActivity;
|
||||
this.layout = layout;
|
||||
image = (ImageView) layout.findViewById(R.id.shape_inspector_check_box_image);
|
||||
textView = (TextView) layout.findViewById(R.id.shape_inspector_check_box_text);
|
||||
textView.setTypeface(typeface);
|
||||
}
|
||||
|
||||
public void updateForTask(Task task) {
|
||||
boolean taskNotEmpty = !(task instanceof EmptyTask);
|
||||
setVisible(taskNotEmpty);
|
||||
if (taskNotEmpty) {
|
||||
textView.setText(task.toString(gameActivity, gameActivity.getLevelManager()));
|
||||
setChecked(task.isConditionFulfilled());
|
||||
}
|
||||
}
|
||||
|
||||
private void setChecked(boolean checked) {
|
||||
int drawableId = checked ? R.drawable.guis_checkbox_checked : R.drawable.guis_checkbox_unchecked;
|
||||
image.setBackgroundDrawable(gameActivity.getResources().getDrawable(drawableId));
|
||||
}
|
||||
|
||||
private void setVisible(boolean visible) {
|
||||
layout.setVisibility(visible ? View.VISIBLE : View.INVISIBLE);
|
||||
}
|
||||
|
||||
}
|
BIN
app/src/main/res/drawable/guis_checkbox_checked.png
Normal file
BIN
app/src/main/res/drawable/guis_checkbox_checked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.9 KiB |
BIN
app/src/main/res/drawable/guis_checkbox_unchecked.png
Normal file
BIN
app/src/main/res/drawable/guis_checkbox_unchecked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
app/src/main/res/drawable/guis_lock_locked.png
Normal file
BIN
app/src/main/res/drawable/guis_lock_locked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
BIN
app/src/main/res/drawable/playershapes_locked.png
Normal file
BIN
app/src/main/res/drawable/playershapes_locked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
19
app/src/main/res/drawable/xml_shape_inspector_checkbox.xml
Normal file
19
app/src/main/res/drawable/xml_shape_inspector_checkbox.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true"
|
||||
android:drawable="@drawable/playershapes_wheel">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="24dp"
|
||||
android:height="24dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_checked="false"
|
||||
android:drawable="@drawable/playershapes_smiley">
|
||||
<shape android:shape="rectangle">
|
||||
<size
|
||||
android:width="24dp"
|
||||
android:height="24dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
@ -12,11 +12,18 @@
|
||||
android:text="@string/placeholder_button"
|
||||
android:textSize="28sp"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/shape_button_button"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:background="@drawable/playershapes_ball"/>
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal">
|
||||
|
||||
<Button
|
||||
android:id="@+id/shape_button_button"
|
||||
android:layout_width="65dp"
|
||||
android:layout_height="65dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:background="@drawable/playershapes_ball"/>
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
</LinearLayout>
|
@ -7,7 +7,7 @@
|
||||
android:padding="10dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tool_inspector_title"
|
||||
android:id="@+id/shape_inspector_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
@ -15,32 +15,32 @@
|
||||
android:textAlignment="center"
|
||||
android:textSize="28sp"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/tool_inspector_imageview"
|
||||
android:id="@+id/shape_inspector_imageview"
|
||||
android:layout_width="45dp"
|
||||
android:layout_height="45dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:src="@drawable/playershapes_smiley"
|
||||
android:layout_marginBottom="20dp"/>
|
||||
android:layout_centerInParent="true"
|
||||
android:src="@drawable/playershapes_smiley"/>
|
||||
</RelativeLayout>
|
||||
|
||||
<CheckBox
|
||||
<include
|
||||
android:id="@+id/shape_inspector_check_box"
|
||||
layout="@layout/shape_inspector_check_box"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:checked="true"
|
||||
android:text="First task"/>
|
||||
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Second task"/>
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tool_inspector_description"
|
||||
android:id="@+id/shape_inspector_description"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
|
22
app/src/main/res/layout/shape_inspector_check_box.xml
Normal file
22
app/src/main/res/layout/shape_inspector_check_box.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/shape_inspector_check_box_image"
|
||||
android:layout_width="25dp"
|
||||
android:layout_height="25dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginRight="5dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/shape_inspector_check_box_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="@string/placeholder_textview"/>
|
||||
|
||||
</LinearLayout>
|
@ -49,6 +49,22 @@
|
||||
<string name="playershape_name_smiley">Smiley</string>
|
||||
<string name="playershape_name_wheel">Wheel</string>
|
||||
<string name="playershape_name_sun">Sun</string>
|
||||
<string name="playershape_name_locked">\?\?\?</string>
|
||||
<string name="playershape_description_ball">Keep calm and roll on</string>
|
||||
<string name="playershape_description_clock">Tick tack!</string>
|
||||
<string name="playershape_description_hypno_spiral">Hypnotizes you for more fun</string>
|
||||
<string name="playershape_description_pacman">PACMAN!</string>
|
||||
<string name="playershape_description_smiley">Don\'t worry, roll happy!</string>
|
||||
<string name="playershape_description_wheel">A nice car without the... car</string>
|
||||
<string name="playershape_description_sun">Shine bright like the sun</string>
|
||||
<string name="playershape_description_locked">A new shape for more fun</string>
|
||||
|
||||
<string name="task_empty">Empty task</string>
|
||||
<string name="task_collect_stars_progress_format_ddd">Collect %d stars (%d/%d)</string>
|
||||
<string name="task_collect_energy_progress_format_ddd">Collect %d energy (%d/%d)</string>
|
||||
<string name="task_collect_stars_format_d">Collect %d stars</string>
|
||||
<string name="task_collect_energy_format_d">Collect %d energy</string>
|
||||
<string name="task_complete_world_format_d">Finish the %d. world</string>
|
||||
|
||||
<string name="tool_description_locked_format_d">You will unlock this mysterious tool at level %d</string>
|
||||
<string name="tool_description_ramp">Roll up the ramp to gain height</string>
|
||||
|
Reference in New Issue
Block a user