-
Notifications
You must be signed in to change notification settings - Fork 687
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
178 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
catroid/src/main/java/org/catrobat/catroid/content/actions/StopRunningStitchAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Catroid: An on-device visual programming system for Android devices | ||
* Copyright (C) 2010-2018 The Catrobat Team | ||
* (<http://developer.catrobat.org/credits>) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* An additional term exception under section 7 of the GNU Affero | ||
* General Public License, version 3, is available at | ||
* http://developer.catrobat.org/license_additional_term | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.catrobat.catroid.content.actions; | ||
|
||
import com.badlogic.gdx.scenes.scene2d.actions.TemporalAction; | ||
|
||
import org.catrobat.catroid.content.Sprite; | ||
|
||
public class StopRunningStitchAction extends TemporalAction { | ||
|
||
private Sprite sprite; | ||
|
||
@Override | ||
protected void update(float delta) { | ||
sprite.runningStitch.deactivate(); | ||
} | ||
|
||
public void setSprite(Sprite sprite) { | ||
this.sprite = sprite; | ||
} | ||
} |
43 changes: 43 additions & 0 deletions
43
catroid/src/main/java/org/catrobat/catroid/content/bricks/StopRunningStitchBrick.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Catroid: An on-device visual programming system for Android devices | ||
* Copyright (C) 2010-2018 The Catrobat Team | ||
* (<http://developer.catrobat.org/credits>) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as | ||
* published by the Free Software Foundation, either version 3 of the | ||
* License, or (at your option) any later version. | ||
* | ||
* An additional term exception under section 7 of the GNU Affero | ||
* General Public License, version 3, is available at | ||
* http://developer.catrobat.org/license_additional_term | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
package org.catrobat.catroid.content.bricks; | ||
|
||
import org.catrobat.catroid.R; | ||
import org.catrobat.catroid.content.ActionFactory; | ||
import org.catrobat.catroid.content.Sprite; | ||
import org.catrobat.catroid.content.actions.ScriptSequenceAction; | ||
|
||
public class StopRunningStitchBrick extends BrickBaseType { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@Override | ||
public int getViewResource() { | ||
return R.layout.brick_stop_running_stitch; | ||
} | ||
|
||
@Override | ||
public void addActionToSequence(Sprite sprite, ScriptSequenceAction sequence) { | ||
sequence.addAction(ActionFactory.createStopRunningStitchAction(sprite)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ Catroid: An on-device visual programming system for Android devices | ||
~ Copyright (C) 2010-2018 The Catrobat Team | ||
~ (<http://developer.catrobat.org/credits>) | ||
~ | ||
~ This program is free software: you can redistribute it and/or modify | ||
~ it under the terms of the GNU Affero General Public License as | ||
~ published by the Free Software Foundation, either version 3 of the | ||
~ License, or (at your option) any later version. | ||
~ | ||
~ An additional term exception under section 7 of the GNU Affero | ||
~ General Public License, version 3, is available at | ||
~ http://developer.catrobat.org/license_additional_term | ||
~ | ||
~ This program is distributed in the hope that it will be useful, | ||
~ but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
~ GNU Affero General Public License for more details. | ||
~ | ||
~ You should have received a copy of the GNU Affero General Public License | ||
~ along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
--> | ||
|
||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:orientation="horizontal"> | ||
|
||
<CheckBox | ||
android:id="@+id/brick_checkbox" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:gravity="center_vertical" | ||
android:visibility="gone" /> | ||
|
||
<org.catrobat.catroid.ui.BrickLayout | ||
android:id="@+id/brick_stitch_layout" | ||
style="@style/BrickContainer.Embroidery.Small" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
app:horizontalSpacing="@dimen/brick_flow_layout_horizontal_spacing" | ||
app:verticalSpacing="@dimen/brick_flow_layout_vertical_spacing"> | ||
|
||
<include layout="@layout/icon_brick_category_embroidery" /> | ||
|
||
<TextView | ||
android:id="@+id/brick_stitch_textview" | ||
style="@style/BrickText.SingleLine" | ||
android:text="@string/brick_stop_stitch" /> | ||
</org.catrobat.catroid.ui.BrickLayout> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters