text.form 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. form textTest
  2. {
  3. theme = res/common/default.theme
  4. style = basic
  5. autoHeight = true
  6. width = 240
  7. layout = LAYOUT_VERTICAL
  8. scroll = SCROLL_VERTICAL
  9. consumeInputEvents = true
  10. label topLabel
  11. {
  12. style = title
  13. autoWidth = true
  14. height = 40
  15. textAlignment = ALIGN_BOTTOM_LEFT
  16. consumeInputEvents = false
  17. text = Text
  18. }
  19. // Change font
  20. // Wouldn't this be a great place to use a drop-down? ;)
  21. button fontButton
  22. {
  23. style = buttonStyle
  24. autoWidth = true
  25. height = 50
  26. consumeInputEvents = false
  27. text = Font (arial18)
  28. }
  29. button wrapButton : fontButton
  30. {
  31. text = Word Wrap (On)
  32. }
  33. button clipRectButton : fontButton
  34. {
  35. text = Clipping (On)
  36. }
  37. button reverseButton : fontButton
  38. {
  39. text = Reverse Text (Off)
  40. }
  41. button switchClipRegionButton : fontButton
  42. {
  43. text = Clip Region (Viewport)
  44. }
  45. button simpleAdvancedButton : fontButton
  46. {
  47. text = Font API (Advanced)
  48. }
  49. label scaleLabel : topLabel
  50. {
  51. text = Scale (1.0)
  52. }
  53. container scaling
  54. {
  55. style = noBorder
  56. autoWidth = true
  57. height = 60
  58. consumeInputEvents = false
  59. button smallerButton
  60. {
  61. style = buttonStyle
  62. width = 50
  63. height = 50
  64. consumeInputEvents = false
  65. text = -
  66. }
  67. button biggerButton : smallerButton
  68. {
  69. x = 50
  70. text = +
  71. }
  72. }
  73. label alignmentLabel : topLabel
  74. {
  75. height = 60
  76. text = Align (Top-left)
  77. }
  78. // Grid layout would be best, but flow should work.
  79. container alignments
  80. {
  81. style = noBorder
  82. autoWidth = true
  83. height = 200
  84. layout = LAYOUT_FLOW
  85. consumeInputEvents = false
  86. button topLeftButton
  87. {
  88. style = buttonStyle
  89. size = 60, 60
  90. text = 7
  91. consumeInputEvents = false
  92. }
  93. button topCenterButton : topLeftButton
  94. {
  95. text = 8
  96. }
  97. button topRightButton : topLeftButton
  98. {
  99. text = 9
  100. }
  101. button centerLeftButton : topLeftButton
  102. {
  103. text = 4
  104. }
  105. button centerButton : topLeftButton
  106. {
  107. text = 5
  108. }
  109. button centerRightButton : topLeftButton
  110. {
  111. text = 6
  112. }
  113. button bottomLeftButton : topLeftButton
  114. {
  115. text = 1
  116. }
  117. button bottomCenterButton : topLeftButton
  118. {
  119. text = 2
  120. }
  121. button bottomRightButton : topLeftButton
  122. {
  123. text = 3
  124. }
  125. }
  126. }