Nextrek
@ 792
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
package nextrek.minstrek.core; import org.json.JSONObject; public class ButtonModel { // String buttonImage; String targetId; String buttonText; String buttonPreCond; String buttonPostCond; private ButtonModel(String tid, String text) { targetId = tid; buttonText = text; } public ButtonModel(JSONObject jsonData) { this.targetId = jsonData.optString("targetId"); this.buttonText = jsonData.optString("buttonText"); this.buttonPreCond = jsonData.optString("buttonPreCond"); this.buttonPostCond = jsonData.optString("buttonPostCond"); } public String getButtonPreCond() { return this.buttonPreCond; } public String getButtonPostCond() { return this.buttonPostCond; } public String targetId() { return this.targetId; } public String getText() { return this.buttonText; } public static ButtonModel createGameOverButton() { return new ButtonModel("init", "Game Over"); } } |
Commits for Nextrek/Android/Minstrek/MinstrekLib/app/src/main/java/nextrek/minstrek/core/ButtonModel.java
Revision | Author | Commited | Message |
---|---|---|---|
792 | MStefanelli | Fri 02 Oct, 2015 12:03:54 +0000 | New gradle version with ad |