Small ui rework qmlfrontend
authorunc0rr
Sun, 22 Nov 2015 19:29:13 +0300
branchqmlfrontend
changeset 11431 ab6a6d9ebfc0
parent 11430 2947f06e8533
child 11432 1895a9504a35
Small ui rework
qmlFrontend/qml/qmlFrontend/GameConfig.qml
qmlFrontend/qml/qmlFrontend/HWComboBox.qml
qmlFrontend/qml/qmlFrontend/LocalGame.qml
qmlFrontend/qml/qmlFrontend/Multiplayer.qml
qmlFrontend/qml/qmlFrontend/Room.qml
qmlFrontend/qml/qmlFrontend/main.qml
qmlFrontend/qmlFrontend.qrc
--- a/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/GameConfig.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -3,10 +3,11 @@
 
 
 Rectangle {
+    Column {
+        spacing: 8
+
     HWButton {
         id: btnPreview
-        x: 50
-        y: 16
         width: 256
         height: 128
 
@@ -27,20 +28,8 @@
         }
     }
 
-    HWButton {
-        id: btnRunGame
-        x: 600
-        y: 440
-        width: 32
-        height: 32
-
-        onClicked: HWEngine.runLocalGame()
-    }
-
     HWComboBox {
         id: cbTheme
-        x: 50
-        y: 160
         width: 256
         height: 64
 
@@ -71,10 +60,8 @@
 
     HWComboBox {
         id: cbScript
-        x: 50
-        y: 256
         width: 256
-        height: 64
+        height: 32
 
         model: scriptsModel
         delegate: Rectangle {
@@ -103,10 +90,8 @@
 
     HWComboBox {
         id: cbScheme
-        x: 50
-        y: 336
         width: 256
-        height: 64
+        height: 32
 
         model: schemesModel
         delegate: Rectangle {
@@ -136,10 +121,8 @@
 
     HWComboBox {
         id: cbAmmo
-        x: 50
-        y: 416
         width: 256
-        height: 64
+        height: 32
 
         model: ammosModel
         delegate: Rectangle {
@@ -165,6 +148,7 @@
             }
         }
     }
+    }
 
     ListView {
         id: playingTeamsList
--- a/qmlFrontend/qml/qmlFrontend/HWComboBox.qml	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/HWComboBox.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -50,6 +50,7 @@
         Text {
             id: cbText
             height: parent.height
+            color: "#f3e520"
         }
     }
 
--- a/qmlFrontend/qml/qmlFrontend/LocalGame.qml	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/LocalGame.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -19,6 +19,16 @@
         width: 150
         height: 150
 
-        onClicked: pages.currentPage = "GameConfig"
+        onClicked: pages.currentPage = "Multiplayer"
+    }
+
+    HWButton {
+        id: btnBack
+        width: 40
+        height: 40
+        anchors.bottom: parent.bottom
+        anchors.left: parent.left
+
+        onClicked: pages.currentPage = "First"
     }
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/qmlFrontend/qml/qmlFrontend/Multiplayer.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -0,0 +1,32 @@
+import QtQuick 2.0
+import Hedgewars.Engine 1.0
+
+Item {
+    GameConfig {
+        anchors.left: parent.left
+        anchors.top: parent.top
+        anchors.right: parent.right
+        anchors.bottom: btnRunGame.top
+    }
+
+    HWButton {
+        id: btnBack
+        width: 40
+        height: 40
+        anchors.bottom: parent.bottom
+        anchors.left: parent.left
+
+        onClicked: pages.currentPage = "LocalGame"
+    }
+
+    HWButton {
+        id: btnRunGame
+        width: 40
+        height: 40
+        anchors.bottom: parent.bottom
+        anchors.right: parent.right
+
+        onClicked: HWEngine.runLocalGame()
+    }
+}
+
--- a/qmlFrontend/qml/qmlFrontend/Room.qml	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/Room.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -12,6 +12,14 @@
         onClicked: HWEngine.partRoom("")
     }
 
+    GameConfig {
+        id: gameConfig
+        anchors.left: parent.left
+        anchors.top: parent.top
+        anchors.right: parent.right
+        anchors.bottom: roomChat.top
+    }
+
     Chat {
         id: roomChat;
         x: 0;
--- a/qmlFrontend/qml/qmlFrontend/main.qml	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qml/qmlFrontend/main.qml	Sun Nov 22 19:29:13 2015 +0300
@@ -9,7 +9,7 @@
     property variant pagesList : [
         "First"
         , "LocalGame"
-        , "GameConfig"
+        , "Multiplayer"
         , "Connect"
         , "Lobby"
         , "Room"
--- a/qmlFrontend/qmlFrontend.qrc	Sun Nov 22 18:06:32 2015 +0300
+++ b/qmlFrontend/qmlFrontend.qrc	Sun Nov 22 19:29:13 2015 +0300
@@ -10,5 +10,6 @@
         <file>qml/qmlFrontend/Chat.qml</file>
         <file>qml/qmlFrontend/Room.qml</file>
         <file>qml/qmlFrontend/Lobby.qml</file>
+        <file>qml/qmlFrontend/Multiplayer.qml</file>
     </qresource>
 </RCC>