qmlfrontend/Page1.qml
author raptor <buckyballreaction@gmail.com>
Tue, 13 Aug 2019 13:20:28 -0600
branch0.9.25
changeset 15353 9a545985360b
parent 14319 00b56ec8b7df
child 14392 90bd2c331703
permissions -rw-r--r--
Remove usage of macdeployqt in favor of CMake BundleUtilities. BundleUtilities properly finds all dependencies and adds them to the .app automatically. It also fixes rpath and install_name issues for any of the binaries or dependencies
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
14164
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 {
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
     5
  tickButton.onClicked: {
14315
21be7838a127 Add advance_simulation() function to engine lib, some WIP on frontend
unc0rr
parents: 14175
diff changeset
     6
    gameView.tick(100)
14164
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: {
14319
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14315
diff changeset
     9
    var engineInstance = HWEngine.runQuickGame()
00b56ec8b7df Pass opengl context to engine
unC0Rr
parents: 14315
diff changeset
    10
    gameView.engineInstance = engineInstance
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    11
  }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    12
  button1.onClicked: {
14164
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    13
    HWEngine.getPreview()
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
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    16
  Connections {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    17
    target: HWEngine
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    18
    onPreviewImageChanged: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    19
      previewImage.source = "image://preview/image"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    20
    }
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    21
    onPreviewIsRendering: {
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    22
      previewImage.source = "qrc:/res/iconTime.png"
745c73e0e644 Start working on frontend to rust engine rewrite
unC0Rr
parents: 12854
diff changeset
    23
    }
12854
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    24
  }
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    25
}