| 1 |
import QtQuick 2.4 |
| 2 |
import QtQuick.Layouts 1.3 |
| 3 |
import QtQuick.Controls 2.0 |
| 4 |
|
| 5 |
import sfxr 1.0 |
| 6 |
|
| 7 |
ColumnLayout { |
| 8 |
id: root |
| 9 |
property Generator generator |
| 10 |
property Sound sound |
| 11 |
|
| 12 |
TitleLabel { |
| 13 |
id: label |
| 14 |
text: qsTr("Generators") |
| 15 |
} |
| 16 |
|
| 17 |
Button { |
| 18 |
text: qsTr("Pickup/Coin") |
| 19 |
Layout.fillWidth: true |
| 20 |
onClicked: { |
| 21 |
generator.generatePickup(); |
| 22 |
} |
| 23 |
} |
| 24 |
|
| 25 |
Button { |
| 26 |
text: qsTr("Laser/Shoot") |
| 27 |
Layout.fillWidth: true |
| 28 |
onClicked: { |
| 29 |
generator.generateLaser(); |
| 30 |
} |
| 31 |
} |
| 32 |
|
| 33 |
Button { |
| 34 |
text: qsTr("Explosion") |
| 35 |
Layout.fillWidth: true |
| 36 |
onClicked: { |
| 37 |
generator.generateExplosion(); |
| 38 |
} |
| 39 |
} |
| 40 |
|
| 41 |
Button { |
| 42 |
text: qsTr("Power Up") |
| 43 |
Layout.fillWidth: true |
| 44 |
onClicked: { |
| 45 |
generator.generatePowerup(); |
| 46 |
} |
| 47 |
} |
| 48 |
|
| 49 |
Button { |
| 50 |
text: qsTr("Hit/Hurt") |
| 51 |
Layout.fillWidth: true |
| 52 |
onClicked: { |
| 53 |
generator.generateHitHurt(); |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
Button { |
| 58 |
text: qsTr("Jump") |
| 59 |
Layout.fillWidth: true |
| 60 |
onClicked: { |
| 61 |
generator.generateJump(); |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
Button { |
| 66 |
text: qsTr("Blip/Select") |
| 67 |
Layout.fillWidth: true |
| 68 |
onClicked: { |
| 69 |
generator.generateBlipSelect(); |
| 70 |
} |
| 71 |
} |
| 72 |
|
| 73 |
VerticalSpacer {} |
| 74 |
|
| 75 |
Button { |
| 76 |
text: qsTr("Randomize") |
| 77 |
Layout.fillWidth: true |
| 78 |
onClicked: { |
| 79 |
generator.randomize(sound.waveForm); |
| 80 |
} |
| 81 |
ToolTip.text: qsTr("Generate random sound, based on the current wave form") |
| 82 |
} |
| 83 |
|
| 84 |
Button { |
| 85 |
text: qsTr("Mutate") |
| 86 |
Layout.fillWidth: true |
| 87 |
onClicked: { |
| 88 |
generator.mutate(sound); |
| 89 |
} |
| 90 |
ToolTip.text: qsTr("Randomly alter the settings of the current sound") |
| 91 |
} |
| 92 |
} |