Subversion Repository Public Repository

Nextrek

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/src/nextrek/minstrek/core/ButtonModel.java

Diff revisions: vs.
Revision Author Commited Message
11 Diff Diff DRuega picture DRuega Mon 03 Jun, 2013 19:58:21 +0000

Allineamento repository con ultime modifiche

4 FMMortaroli picture FMMortaroli Fri 19 Apr, 2013 16:54:38 +0000