qmlfrontend/Page1.qml
author unc0rr
Sun, 07 Jan 2018 01:21:42 +0100
branchqmlfrontend
changeset 12888 adb1fccc706a
parent 12881 b544bbbd0696
permissions -rw-r--r--
- ResizeWindow function to pass engine new window size - Remove TabBar to leave more space at the bottom of the screen - ifdef GL_ES in shaders
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     1
import QtQuick 2.7
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12859
diff changeset
     2
import Hedgewars.Engine 1.0
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     3
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
     4
Page1Form {
12881
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12868
diff changeset
     5
  tickButton.onClicked: {
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12868
diff changeset
     6
    item1.tick(100);
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12868
diff changeset
     7
}
12868
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
     8
  gameButton.onClicked: {
fe16fa088b69 Make playing a game possible
unc0rr
parents: 12866
diff changeset
     9
    HWEngine.runQuickGame()
12881
b544bbbd0696 Break engine completely and make it render in frontend window (no actual rendering yet, just white screen)
unc0rr
parents: 12868
diff changeset
    10
  }
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    11
  button1.onClicked: {
12863
0c6fb706f747 More refactoring in attempt to move away from frontlib
unc0rr
parents: 12859
diff changeset
    12
    HWEngine.getPreview()
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    13
  }
12866
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    14
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    15
  Connections {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    16
      target: HWEngine
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    17
      onPreviewImageChanged: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    18
          previewImage.source = "image://preview/image"
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    19
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    20
      onPreviewIsRendering: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    21
          previewImage.source = "qrc:/res/iconTime.png"
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    22
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    23
      onPreviewHogCountChanged: {
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    24
      }
488782d9aba9 Recreate uFLRunQueue in Qt, render previews
unc0rr
parents: 12863
diff changeset
    25
  }
12859
28cb18c5e712 Add new qmlfrontend project template
unc0rr
parents:
diff changeset
    26
}