turnOptionsTab.json 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343
  1. {
  2. "library" : [
  3. "config/widgets/turnOptionsDropdownLibrary.json",
  4. "config/widgets/commonPrimitives.json",
  5. ],
  6. "customTypes" : {
  7. "verticalLayout66" : {
  8. "type" : "layout",
  9. "vertical" : true,
  10. "dynamic" : false,
  11. "distance" : 66
  12. },
  13. "labelTitle" : {
  14. "type": "label",
  15. "font": "small",
  16. "alignment": "left",
  17. "color": "yellow"
  18. },
  19. "labelDescription" : {
  20. "type": "multiLineLabel",
  21. "font": "tiny",
  22. "alignment": "center",
  23. "color": "white",
  24. "rect": {"x": 0, "y": 0, "w": 300, "h": 35},
  25. "adoptHeight": true
  26. },
  27. "timeInput" : {
  28. "type": "textInput",
  29. "alignment": "center",
  30. "text": "00:00",
  31. "rect": {"x": 0, "y": 0, "w": 86, "h": 23},
  32. "offset": {"x": 0, "y": 0}
  33. },
  34. "timeInputBackground" : {
  35. "type": "boxWithBackground",
  36. "rect": {"x": 0, "y": 0, "w": 86, "h": 23}
  37. }
  38. },
  39. "items":
  40. [
  41. {
  42. "name": "background",
  43. "type": "picture",
  44. "image": "RANMAPBK",
  45. "position": {"x": 0, "y": 6}
  46. },
  47. {
  48. "name": "labelTitle",
  49. "type": "label",
  50. "font": "big",
  51. "alignment": "center",
  52. "color": "yellow",
  53. "text": "vcmi.optionsTab.turnOptions.hover",
  54. "position": {"x": 222, "y": 36}
  55. },
  56. {
  57. "name": "labelSubTitle",
  58. "type": "multiLineLabel",
  59. "font": "small",
  60. "alignment": "center",
  61. "color": "white",
  62. "text": "vcmi.optionsTab.turnOptions.help",
  63. "rect": {"x": 60, "y": 48, "w": 320, "h": 0},
  64. "adoptHeight": true
  65. },
  66. {
  67. "type" : "dropDownTimers",
  68. "name": "timerPresetSelector",
  69. "position": {"x": 160, "y": 78},
  70. "dropDownPosition": {"x": 0, "y": 20}
  71. },
  72. {
  73. "type" : "dropDownSimturns",
  74. "name": "simturnsPresetSelector",
  75. "position": {"x": 160, "y": 98},
  76. "dropDownPosition": {"x": 0, "y": 20}
  77. },
  78. {
  79. "type": "texture",
  80. "image": "DiBoxBck",
  81. "color" : "blue",
  82. "rect": {"x" : 64, "y" : 394, "w": 316, "h": 124}
  83. },
  84. {
  85. "type": "boxWithNoBackground",
  86. "rect": {"x" : 64, "y" : 394, "w": 316, "h": 124}
  87. },
  88. {
  89. "type": "horizontalLine",
  90. "rect": {"x" : 65, "y" : 416, "w": 314, "h": 2}
  91. },
  92. {
  93. "type": "horizontalLine",
  94. "rect": {"x" : 65, "y" : 466, "w": 314, "h": 2}
  95. },
  96. {
  97. "type" : "verticalLayout66",
  98. "customType" : "labelTitle",
  99. "position": {"x": 70, "y": 133},
  100. "items":
  101. [
  102. {
  103. "text": "vcmi.optionsTab.chessFieldBase.hover"
  104. },
  105. {
  106. "text": "vcmi.optionsTab.chessFieldTurn.hover"
  107. },
  108. {
  109. "text": "vcmi.optionsTab.chessFieldBattle.hover"
  110. },
  111. {
  112. "text": "vcmi.optionsTab.chessFieldUnit.hover"
  113. },
  114. {
  115. "text": "vcmi.optionsTab.simturnsTitle"
  116. }
  117. ]
  118. },
  119. {
  120. "type" : "verticalLayout66",
  121. "customType" : "labelDescription",
  122. "position": {"x": 70, "y": 155},
  123. "items":
  124. [
  125. {
  126. "text": "vcmi.optionsTab.chessFieldBase.help"
  127. },
  128. {
  129. "name": "chessFieldTurnLabel"
  130. },
  131. {
  132. "text": "vcmi.optionsTab.chessFieldBattle.help"
  133. },
  134. {
  135. "name": "chessFieldUnitLabel"
  136. }
  137. ]
  138. },
  139. {
  140. "name": "buttonTurnTimerAccumulate",
  141. "position": {"x": 160, "y": 195},
  142. "type": "toggleButton",
  143. "image": "lobby/checkbox",
  144. "callback" : "setTurnTimerAccumulate"
  145. },
  146. {
  147. "name": "buttonUnitTimerAccumulate",
  148. "position": {"x": 160, "y": 327},
  149. "type": "toggleButton",
  150. "image": "lobby/checkbox",
  151. "callback" : "setUnitTimerAccumulate"
  152. },
  153. {
  154. "type" : "labelTitle",
  155. "position": {"x": 195, "y": 199},
  156. "text" : "vcmi.optionsTab.accumulate"
  157. },
  158. {
  159. "type" : "labelTitle",
  160. "position": {"x": 195, "y": 331},
  161. "text" : "vcmi.optionsTab.accumulate"
  162. },
  163. {
  164. "type" : "verticalLayout66",
  165. "customType" : "timeInputBackground",
  166. "position": {"x": 294, "y": 129},
  167. "items":
  168. [
  169. {},
  170. {},
  171. {},
  172. {}
  173. ]
  174. },
  175. {
  176. "type" : "verticalLayout66",
  177. "customType" : "timeInput",
  178. "position": {"x": 294, "y": 129},
  179. "items":
  180. [
  181. {
  182. "name": "chessFieldBase",
  183. "callback": "parseAndSetTimer_base",
  184. "help": "vcmi.optionsTab.chessFieldBase.help"
  185. },
  186. {
  187. "name": "chessFieldTurn",
  188. "callback": "parseAndSetTimer_turn",
  189. "help": "vcmi.optionsTab.chessFieldTurnAccumulate.help"
  190. },
  191. {
  192. "name": "chessFieldBattle",
  193. "callback": "parseAndSetTimer_battle",
  194. "help": "vcmi.optionsTab.chessFieldBattle.help"
  195. },
  196. {
  197. "name": "chessFieldUnit",
  198. "callback": "parseAndSetTimer_unit",
  199. "help": "vcmi.optionsTab.chessFieldUnitAccumulate.help"
  200. }
  201. ]
  202. },
  203. {
  204. "type": "label",
  205. "font": "small",
  206. "alignment": "left",
  207. "color": "white",
  208. "text": "vcmi.optionsTab.simturnsMin.hover",
  209. "position": {"x": 70, "y": 420}
  210. },
  211. {
  212. "type": "label",
  213. "font": "small",
  214. "alignment": "left",
  215. "color": "white",
  216. "text": "vcmi.optionsTab.simturnsMax.hover",
  217. "position": {"x": 70, "y": 470}
  218. },
  219. {
  220. "name": "simturnsDurationMin",
  221. "type": "slider",
  222. "orientation": "horizontal",
  223. "position": {"x": 178, "y": 420},
  224. "size": 200,
  225. "callback": "setSimturnDurationMin",
  226. "items": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 21, 28, 35, 42, 49, 56, 84, 112, 140, 168 ],
  227. "selected": 0,
  228. "style": "blue",
  229. "scrollBounds": {"x": 0, "y": 0, "w": 194, "h": 32},
  230. "panningStep": 20
  231. },
  232. {
  233. "name": "simturnsDurationMax",
  234. "type": "slider",
  235. "orientation": "horizontal",
  236. "position": {"x": 178, "y": 470},
  237. "size": 200,
  238. "callback": "setSimturnDurationMax",
  239. "items": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 21, 28, 35, 42, 49, 56, 84, 112, 140, 168, 1000000 ],
  240. "selected": 0,
  241. "style": "blue",
  242. "scrollBounds": {"x": 0, "y": 0, "w": 194, "h": 32},
  243. "panningStep": 20
  244. },
  245. {
  246. "name": "labelSimturnsDurationValueMin",
  247. "type": "label",
  248. "font": "small",
  249. "alignment": "center",
  250. "color": "white",
  251. "text": "",
  252. "position": {"x": 278, "y": 428}
  253. },
  254. {
  255. "name": "labelSimturnsDurationValueMax",
  256. "type": "label",
  257. "font": "small",
  258. "alignment": "center",
  259. "color": "white",
  260. "text": "",
  261. "position": {"x": 278, "y": 478}
  262. },
  263. {
  264. "text": "vcmi.optionsTab.simturnsMin.help",
  265. "type": "multiLineLabel",
  266. "font": "tiny",
  267. "alignment": "center",
  268. "color": "white",
  269. "rect": {"x": 70, "y": 430, "w": 300, "h": 40}
  270. },
  271. {
  272. "text": "vcmi.optionsTab.simturnsMax.help",
  273. "type": "multiLineLabel",
  274. "font": "tiny",
  275. "alignment": "center",
  276. "color": "white",
  277. "rect": {"x": 70, "y": 480, "w": 300, "h": 40}
  278. },
  279. {
  280. "name": "buttonSimturnsAI",
  281. "position": {"x": 70, "y": 535},
  282. "help" : "vcmi.optionsTab.simturnsAI",
  283. "type": "toggleButton",
  284. "image": "lobby/checkbox",
  285. "callback" : "setSimturnAI"
  286. },
  287. {
  288. "name": "labelSimturnsAI",
  289. "type": "label",
  290. "font": "small",
  291. "alignment": "left",
  292. "color": "yellow",
  293. "text": "vcmi.optionsTab.simturnsAI.hover",
  294. "position": {"x": 110, "y": 538}
  295. }
  296. ],
  297. "variables":
  298. {
  299. "timerPresets" :
  300. [
  301. [ 0, 0, 0, 0, false, false],
  302. [ 0, 60, 0, 0, false, false],
  303. [ 0, 120, 0, 0, false, false],
  304. [ 0, 300, 0, 0, false, false],
  305. [ 0, 600, 0, 0, false, false],
  306. [ 0, 1200, 0, 0, false, false],
  307. [ 0, 1800, 0, 0, false, false],
  308. [ 1200, 600, 120, 0, true, false],
  309. [ 960, 480, 90, 0, true, false],
  310. [ 480, 240, 60, 0, true, false],
  311. [ 240, 120, 30, 0, true, false],
  312. [ 120, 60, 15, 0, true, false],
  313. [ 60, 60, 0, 0, true, false]
  314. ],
  315. "simturnsPresets" :
  316. [
  317. [ 0, 0, false],
  318. [ 999, 0, false],
  319. [ 7, 0, false],
  320. [ 14, 0, false],
  321. [ 28, 0, false],
  322. [ 7, 7, false],
  323. [ 14, 14, false],
  324. [ 28, 28, false]
  325. ]
  326. }
  327. }