text.form 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  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. text = Font (arial)
  27. }
  28. button wrapButton : fontButton
  29. {
  30. text = Word Wrap (On)
  31. }
  32. button clipRectButton : fontButton
  33. {
  34. text = Clipping (On)
  35. }
  36. button reverseButton : fontButton
  37. {
  38. text = Reverse Text (Off)
  39. }
  40. button switchClipRegionButton : fontButton
  41. {
  42. text = Clip Region (Viewport)
  43. }
  44. button simpleAdvancedButton : fontButton
  45. {
  46. text = Font API (Advanced)
  47. }
  48. label sizeLabel : topLabel
  49. {
  50. text = Size (18)
  51. }
  52. container size
  53. {
  54. style = noBorder
  55. autoWidth = true
  56. height = 60
  57. consumeInputEvents = false
  58. button smallerButton
  59. {
  60. style = buttonStyle
  61. width = 50
  62. height = 50
  63. text = -
  64. }
  65. button biggerButton : smallerButton
  66. {
  67. x = 50
  68. text = +
  69. }
  70. }
  71. label alignmentLabel : topLabel
  72. {
  73. height = 60
  74. text = Align (Top-left)
  75. }
  76. // Grid layout would be best, but flow should work.
  77. container alignments
  78. {
  79. style = noBorder
  80. autoWidth = true
  81. height = 200
  82. layout = LAYOUT_FLOW
  83. consumeInputEvents = false
  84. button topLeftButton
  85. {
  86. style = buttonStyle
  87. size = 60, 60
  88. text = 7
  89. }
  90. button topCenterButton : topLeftButton
  91. {
  92. text = 8
  93. }
  94. button topRightButton : topLeftButton
  95. {
  96. text = 9
  97. }
  98. button centerLeftButton : topLeftButton
  99. {
  100. text = 4
  101. }
  102. button centerButton : topLeftButton
  103. {
  104. text = 5
  105. }
  106. button centerRightButton : topLeftButton
  107. {
  108. text = 6
  109. }
  110. button bottomLeftButton : topLeftButton
  111. {
  112. text = 1
  113. }
  114. button bottomCenterButton : topLeftButton
  115. {
  116. text = 2
  117. }
  118. button bottomRightButton : topLeftButton
  119. {
  120. text = 3
  121. }
  122. }
  123. }