SpriteSequence3DSection.qml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. // Copyright (C) 2021 The Qt Company Ltd.
  2. // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
  3. import QtQuick 2.15
  4. import QtQuick.Layouts 1.15
  5. import HelperWidgets 2.0
  6. import StudioTheme 1.0 as StudioTheme
  7. Section {
  8. caption: qsTr("Particle Sprite Sequence")
  9. width: parent.width
  10. SectionLayout {
  11. PropertyLabel {
  12. text: qsTr("Frame Count")
  13. tooltip: qsTr("Sets the amount of image frames in sprite.")
  14. }
  15. SecondColumnLayout {
  16. SpinBox {
  17. minimumValue: 0
  18. maximumValue: 999999
  19. decimals: 0
  20. backendValue: backendValues.frameCount
  21. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  22. + StudioTheme.Values.actionIndicatorWidth
  23. }
  24. ExpandingSpacer {}
  25. }
  26. PropertyLabel {
  27. text: qsTr("Frame Index")
  28. tooltip: qsTr("Sets the initial index of the frame.")
  29. }
  30. SecondColumnLayout {
  31. SpinBox {
  32. minimumValue: 0
  33. maximumValue: 999999
  34. decimals: 0
  35. backendValue: backendValues.frameIndex
  36. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  37. + StudioTheme.Values.actionIndicatorWidth
  38. }
  39. ExpandingSpacer {}
  40. }
  41. PropertyLabel {
  42. text: qsTr("Interpolate")
  43. tooltip: qsTr("Sets if the sprites are interpolated (blended) between frames to make the animation appear smoother.")
  44. }
  45. SecondColumnLayout {
  46. CheckBox {
  47. id: interpolateCheckBox
  48. text: backendValues.interpolate.valueToString
  49. backendValue: backendValues.interpolate
  50. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  51. + StudioTheme.Values.actionIndicatorWidth
  52. }
  53. ExpandingSpacer {}
  54. }
  55. PropertyLabel {
  56. text: qsTr("Duration")
  57. tooltip: qsTr("Sets the duration in milliseconds how long it takes for the sprite sequence to animate.")
  58. }
  59. SecondColumnLayout {
  60. SpinBox {
  61. minimumValue: -1
  62. maximumValue: 999999
  63. decimals: 0
  64. backendValue: backendValues.duration
  65. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  66. + StudioTheme.Values.actionIndicatorWidth
  67. }
  68. ExpandingSpacer {}
  69. }
  70. PropertyLabel {
  71. text: qsTr("Duration Variation")
  72. tooltip: qsTr("Sets the duration variation in milliseconds.")
  73. }
  74. SecondColumnLayout {
  75. SpinBox {
  76. minimumValue: -999999
  77. maximumValue: 999999
  78. decimals: 0
  79. backendValue: backendValues.durationVariation
  80. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  81. + StudioTheme.Values.actionIndicatorWidth
  82. }
  83. ExpandingSpacer {}
  84. }
  85. PropertyLabel {
  86. text: qsTr("Random Start")
  87. tooltip: qsTr("Sets if the animation should start from a random frame between 0 and frameCount - 1.")
  88. }
  89. SecondColumnLayout {
  90. CheckBox {
  91. id: randomStartCheckBox
  92. text: backendValues.randomStart.valueToString
  93. backendValue: backendValues.randomStart
  94. implicitWidth: StudioTheme.Values.twoControlColumnWidth
  95. + StudioTheme.Values.actionIndicatorWidth
  96. }
  97. ExpandingSpacer {}
  98. }
  99. PropertyLabel {
  100. text: qsTr("Animation Direction")
  101. tooltip: qsTr("Sets the animation direction of the sequence.")
  102. }
  103. SecondColumnLayout {
  104. ComboBox {
  105. scope: "SpriteSequence3D"
  106. model: ["Normal", "Reverse", "Alternate", "AlternateReverse", "SingleFrame"]
  107. backendValue: backendValues.animationDirection
  108. implicitWidth: StudioTheme.Values.singleControlColumnWidth
  109. + StudioTheme.Values.actionIndicatorWidth
  110. }
  111. ExpandingSpacer {}
  112. }
  113. }
  114. }