summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdemos/declarative/samegame/content/samegame.js9
-rw-r--r--demos/declarative/twitter/content/AuthView.qml2
-rw-r--r--demos/declarative/twitter/content/HomeTitleBar.qml17
-rw-r--r--demos/declarative/twitter/twitter.qml10
4 files changed, 26 insertions, 12 deletions
diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js
index 9914edb..0a3a4db 100755
--- a/demos/declarative/samegame/content/samegame.js
+++ b/demos/declarative/samegame/content/samegame.js
@@ -34,6 +34,10 @@ function initBoard()
maxY = Math.floor(gameCanvas.height/tileSize);
maxIndex = maxY*maxX;
+ //Close dialogs
+ scoreName.forceClose();
+ dialog.forceClose();
+
//Initialize Board
board = new Array(maxIndex);
gameCanvas.score = 0;
@@ -144,10 +148,11 @@ function victoryCheck()
gameCanvas.score += 500;
//Checks for game over
if(deservesBonus || !(floodMoveCheck(0,maxY-1, -1))){
- dialog.show("Game Over. Your score is " + gameCanvas.score);
timer = new Date() - timer;
if(scoresURL != "")
- scoreName.show("Please enter your name: ");
+ scoreName.show("You've won! Please enter your name: ");
+ else
+ dialog.show("Game Over. Your score is " + gameCanvas.score);
}
}
diff --git a/demos/declarative/twitter/content/AuthView.qml b/demos/declarative/twitter/content/AuthView.qml
index 6bd98b9..9ca4d88 100644
--- a/demos/declarative/twitter/content/AuthView.qml
+++ b/demos/declarative/twitter/content/AuthView.qml
@@ -85,7 +85,7 @@ Item {
height: 32
id: guest
text: "Guest"
- onClicked: RssModel.authName='inv'
+ onClicked: {RssModel.authName='-'; Screen.setMode(true);}
}
}
}
diff --git a/demos/declarative/twitter/content/HomeTitleBar.qml b/demos/declarative/twitter/content/HomeTitleBar.qml
index 878a83e..5cb8bea 100644
--- a/demos/declarative/twitter/content/HomeTitleBar.qml
+++ b/demos/declarative/twitter/content/HomeTitleBar.qml
@@ -3,7 +3,7 @@ import "../../flickr/mobile"
import "../../flickr/common"
Item {
- id: TitleBar
+ id: titleBar
signal update()
onYChanged: state="" //When switching titlebars
@@ -23,12 +23,13 @@ Item {
postman.open("POST", "http://twitter.com/statuses/update.xml", true, RssModel.authName, RssModel.authPass);
postman.onreadystatechange = function() {
if (postman.readyState == postman.DONE) {
- TitleBar.update();
+ titleBar.update();
}
}
postman.send(postData);
- TitleBar.state = ""
+ Editor.text = ""
+ titleBar.state = ""
}
}
@@ -57,15 +58,15 @@ Item {
}
Button {
- id: TagButton; x: TitleBar.width - 90; width: 85; height: 32; text: "New Post..."
+ id: TagButton; x: titleBar.width - 90; width: 85; height: 32; text: "New Post..."
anchors.verticalCenter: parent.verticalCenter;
- onClicked: if (TitleBar.state == "Posting") accept(); else TitleBar.state = "Posting"
+ onClicked: if (titleBar.state == "Posting") accept(); else titleBar.state = "Posting"
}
Text {
id: charsLeftText; anchors.horizontalCenter: TagButton.horizontalCenter;
anchors.top: TagButton.bottom; anchors.topMargin: 2
- text: {140 - Editor.text.length;} visible: TitleBar.state == "Posting"
+ text: {140 - Editor.text.length;} visible: titleBar.state == "Posting"
font.pointSize: 10; font.bold: true; color: "white"; style: "Raised"; styleColor: "black"
}
Item {
@@ -101,7 +102,7 @@ Item {
Item {
id: ReturnKey
Keys.onReturnPressed: accept()
- Keys.onEscapePressed: TitleBar.state = ""
+ Keys.onEscapePressed: titleBar.state = ""
}
}
}
@@ -109,7 +110,7 @@ Item {
State {
name: "Posting"
PropertyChanges { target: Container; x: -TagButton.x + 5 }
- PropertyChanges { target: TitleBar; height: 80 }
+ PropertyChanges { target: titleBar; height: 80 }
PropertyChanges { target: TagButton; text: "OK" }
PropertyChanges { target: TagButton; width: 28 }
PropertyChanges { target: TagButton; height: 24 }
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index 566832b..14075bf 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -31,7 +31,13 @@ Item {
Image { source: "mobile/images/stripes.png"; fillMode: "Tile"; anchors.fill: parent; opacity: 0.3 }
Twitter.RssModel { id: RssModel }
- Common.Loading { anchors.centerIn: parent; visible: RssModel.status && state!='unauthed'}
+ Common.Loading { anchors.centerIn: parent; visible: RssModel.status==XmlListModel.Loading && state!='unauthed'}
+ Text {
+ width: 180
+ text: "Could not access twitter using this screen name and password pair.";
+ color: "white"; color: "#cccccc"; style: "Raised"; styleColor: "black"; wrap: true
+ visible: RssModel.status==XmlListModel.Error; anchors.centerIn: parent
+ }
Item {
id: Views
@@ -61,11 +67,13 @@ Item {
width: parent.width; opacity: 0.9
button1Label: "Update"
button2Label: "View others"
+ onButton1Clicked: RssModel.reload();
onButton2Clicked:
{
if(Screen.userView == true){
Screen.setMode(false);
}else{
+ RssModel.tags='';
Screen.setMode(true);
}
}