Skip to content

Commit

Permalink
Merge pull request #3131 from thmq/brickFixes
Browse files Browse the repository at this point in the history
HOTFIX-0.9.48 to master
  • Loading branch information
wslany authored Mar 6, 2019
2 parents d3137c7 + b65af24 commit 134aa9f
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 6 deletions.
4 changes: 2 additions & 2 deletions catroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ android {
targetSdkVersion 26
applicationId appId
testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner'
versionCode 54
versionCode 55
println "VersionCode is $versionCode"
versionName "0.9.46"
versionName "0.9.48"
println "VersionName is $versionName"
buildConfigField "String", "GIT_COMMIT_INFO", "\"${getGitCommitInfo()}\""
buildConfigField "String", "MAIN_URL_HTTPS", (project.hasProperty('useWebTest') ? '"https://web-test.catrob.at"' : '"https://share.catrob.at"')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@

public class SetBackgroundAndWaitBrick extends SetBackgroundBrick {

private static final long serialVersionUID = 1L;

public SetBackgroundAndWaitBrick() {
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public class SetBackgroundBrick extends BrickBaseType implements BrickSpinner.On
NewItemInterface<LookData> {

private static final long serialVersionUID = 1L;

private transient BrickSpinner<LookData> spinner;

protected LookData look;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import org.catrobat.catroid.R;
import org.catrobat.catroid.content.Sprite;
import org.catrobat.catroid.content.actions.ScriptSequenceAction;
import org.catrobat.catroid.formulaeditor.Formula;

import java.util.Collections;
import java.util.List;
Expand All @@ -34,13 +35,24 @@

public class SetBackgroundByIndexAndWaitBrick extends SetBackgroundByIndexBrick {

@Override
public int getViewResource() {
return R.layout.brick_set_background_by_index_and_wait;
private static final long serialVersionUID = 1L;

public SetBackgroundByIndexAndWaitBrick() {
addAllowedBrickField(BrickField.LOOK_INDEX, R.id.brick_set_background_by_index_edit_text);
}

public SetBackgroundByIndexAndWaitBrick(int index) {
super(index);
this(new Formula(index));
}

public SetBackgroundByIndexAndWaitBrick(Formula formula) {
this();
setFormulaWithBrickField(BrickField.LOOK_INDEX, formula);
}

@Override
public int getViewResource() {
return R.layout.brick_set_background_by_index_and_wait;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static org.catrobat.catroid.content.EventWrapper.NO_WAIT;

public class SetLookByIndexBrick extends FormulaBrick {

private static final long serialVersionUID = 1L;

@EventWrapper.WaitMode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,13 @@
import java.util.List;

public class ShowTextColorSizeAlignmentBrick extends UserVariableBrick {

private static final long serialVersionUID = 1L;

public static final int ALIGNMENT_STYLE_LEFT = 0;
public static final int ALIGNMENT_STYLE_CENTERED = 1;
public static final int ALIGNMENT_STYLE_RIGHT = 2;

public int alignmentSelection = ALIGNMENT_STYLE_CENTERED;

class AlignmentStyle implements Nameable {
Expand All @@ -68,6 +71,7 @@ public void setName(String name) {
protected BrickField getDefaultBrickField() {
return BrickField.X_POSITION;
}

public ShowTextColorSizeAlignmentBrick() {
addAllowedBrickField(BrickField.X_POSITION, R.id.brick_show_variable_color_size_edit_text_x);
addAllowedBrickField(BrickField.Y_POSITION, R.id.brick_show_variable_color_size_edit_text_y);
Expand Down

0 comments on commit 134aa9f

Please sign in to comment.