qmlfrontend/Page1.qml
author Wuzzy <Wuzzy2@mail.ru>
Mon, 26 Nov 2018 01:13:10 +0100
changeset 14296 0855344f54a7
parent 14294 21be7838a127
child 14298 00b56ec8b7df
permissions -rw-r--r--
Highlander: Fix hogs receiving air strikes in maps with border
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     1
import QtQuick 2.7
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     2
import Hedgewars.Engine 1.0
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     3
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     4
Page1Form {
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     5
  tickButton.onClicked: {
14294
21be7838a127 Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents: 14154
diff changeset
     6
    gameView.tick(100)
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     7
  }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     8
  gameButton.onClicked: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     9
    HWEngine.runQuickGame()
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    10
  }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    11
  button1.onClicked: {
14143
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    12
    HWEngine.getPreview()
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    13
  }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    14
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    15
  Connections {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    16
    target: HWEngine
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    17
    onPreviewImageChanged: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    18
      previewImage.source = "image://preview/image"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    19
    }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    20
    onPreviewIsRendering: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    21
      previewImage.source = "qrc:/res/iconTime.png"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    22
    }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    23
  }
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    24
}