StartScreen.qml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. import Qt 4.7
  2. import "scripts.js" as Game
  3. Rectangle {
  4. id: rectangle1
  5. width: 360
  6. height: 640
  7. Image {
  8. id: image1
  9. x: 0
  10. y: 0
  11. width: parent.width
  12. height: parent.height
  13. source: "images/start.jpg"
  14. }
  15. Item {
  16. id: navigation
  17. x: 32
  18. y: 306
  19. width: parent.width *0.9;
  20. height: 266
  21. anchors.horizontalCenter: parent.horizontalCenter
  22. Button {
  23. id: button1
  24. x: 5
  25. y: 2
  26. buttonText: "New Game"
  27. width: parent.width
  28. height: 50
  29. onButtonClicked : {
  30. Game.newGame()
  31. }
  32. }
  33. Button {
  34. id: button2
  35. buttonText : "Highscores"
  36. x: 5
  37. y: 62
  38. width: parent.width
  39. height: 50
  40. onButtonClicked: {
  41. Game.getScores();
  42. Game.setState("highscore")
  43. }
  44. }
  45. Button {
  46. id: button3
  47. buttonText: "Help"
  48. x: 5
  49. y: 182
  50. width: parent.width / 2 -25
  51. height: 50
  52. anchors.left: parent.left
  53. anchors.leftMargin: 5
  54. onButtonClicked: gameArea.state = "info"
  55. }
  56. Button {
  57. id: button4
  58. buttonText: "Exit"
  59. x: 233
  60. y: 181
  61. width: parent.width / 2 -25
  62. height: 50
  63. anchors.right: parent.right
  64. anchors.rightMargin: 0
  65. onButtonClicked: {
  66. appData.close();
  67. }
  68. }
  69. Button {
  70. id: button5
  71. x: 5
  72. y: 122
  73. height: 50
  74. opacity: 0.67
  75. buttonText: "More Games"
  76. width: parent.width
  77. onButtonClicked: {
  78. Qt.openUrlExternally("http://store.ovi.com/publisher/jiikoo")
  79. }
  80. }
  81. }
  82. }