Advertisement
Guest User

Untitled

a guest
Oct 4th, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.59 KB | None | 0 0
  1. import uiScriptLocale
  2. import localeInfo
  3. import app
  4.  
  5. ROOT = "d:/ymir work/ui/game/"
  6.  
  7. if app.ENABLE_CHEQUE_SYSTEM :
  8. BOARD_WIDTH = 290
  9. BOARD_HEIGHT = 189
  10. window = {
  11. "name" : "ExchangeDialog",
  12.  
  13. "x" : 0,
  14. "y" : 0,
  15.  
  16. "style" : ("movable", "float",),
  17.  
  18. "width" : BOARD_WIDTH,
  19. "height" : BOARD_HEIGHT,
  20.  
  21. "children" :
  22. (
  23. {
  24. "name" : "board",
  25. "type" : "board",
  26. "style" : ("attach",),
  27.  
  28. "x" : 0,
  29. "y" : 0,
  30.  
  31. "width" : BOARD_WIDTH,
  32. "height" : BOARD_HEIGHT,
  33.  
  34. "children" :
  35. (
  36. ## Title
  37. {
  38. "name" : "TitleBar",
  39. "type" : "titlebar",
  40. "style" : ("attach",),
  41.  
  42. "x" : 8,
  43. "y" : 8,
  44.  
  45. "width" : 276,
  46. "color" : "gray",
  47.  
  48. "children" :
  49. (
  50. { "name":"TitleName", "type":"text", "x":133, "y":3, "text":uiScriptLocale.EXCHANGE_TITLE, "text_horizontal_align":"center" },
  51. ),
  52. },
  53.  
  54. ## MiddleBar
  55. {
  56. "name" : "Middle_Bar",
  57. "type" : "expanded_image",
  58.  
  59. "x" : (BOARD_WIDTH / 2) - 3,
  60. "y" : 31,
  61. "x_scale" : 1.0,
  62. "y_scale" : 1.16,
  63. "image" : ROOT + "windows/middlebar.sub",
  64. },
  65.  
  66. ## Owner
  67. {
  68. "name" : "Owner",
  69. "type" : "window",
  70.  
  71. "x" : 150,
  72. "y" : 33,
  73.  
  74. "width" : 130,
  75. "height" : 146,
  76.  
  77. "children" :
  78. (
  79. {
  80. "name" : "Owner_Slot",
  81. "type" : "grid_table",
  82.  
  83. "start_index" : 0,
  84.  
  85. "x" : 0,
  86. "y" : 0,
  87.  
  88. "x_count" : 4,
  89. "y_count" : 3,
  90. "x_step" : 32,
  91. "y_step" : 32,
  92. "x_blank" : 0,
  93. "y_blank" : 0,
  94.  
  95. "image" : "d:/ymir work/ui/public/slot_base.sub",
  96. },
  97. {
  98. "name" : "Owner_Cheque",
  99. "type" : "button",
  100.  
  101. "x" : 0,
  102. "y" : 102,
  103.  
  104. #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  105.  
  106. "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  107. "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  108. "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  109.  
  110. "children" :
  111. (
  112. {
  113. "name" : "Owner_Cheque_Value",
  114. "type" : "text",
  115.  
  116. "x" : 59,
  117. "y" : 2,
  118.  
  119. "text" : "1234567",
  120.  
  121. "text_horizontal_align" : "right",
  122. },
  123. ),
  124. },
  125. {
  126. "name" : "Owner_Money",
  127. "type" : "button",
  128.  
  129. "x" : 0,
  130. "y" : 124,
  131.  
  132. #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  133.  
  134. "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  135. "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  136. "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  137.  
  138. "children" :
  139. (
  140. {
  141. "name" : "Owner_Money_Value",
  142. "type" : "text",
  143.  
  144. "x" : 59,
  145. "y" : 2,
  146.  
  147. "text" : "1234567",
  148.  
  149. "text_horizontal_align" : "right",
  150. },
  151. ),
  152. },
  153. {
  154. "name" : "Owner_Accept_Light",
  155. "type" : "button",
  156.  
  157. "x" : 95,
  158. "y" : 102,
  159.  
  160. "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  161. "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  162. "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
  163. },
  164. {
  165. "name" : "Owner_Accept_Button",
  166. "type" : "toggle_button",
  167.  
  168. "x" : 85,
  169. "y" : 124,
  170.  
  171. "text" : uiScriptLocale.EXCHANGE_ACCEPT,
  172.  
  173. "default_image" : "d:/ymir work/ui/public/small_button_01.sub",
  174. "over_image" : "d:/ymir work/ui/public/small_button_02.sub",
  175. "down_image" : "d:/ymir work/ui/public/small_button_03.sub",
  176. },
  177. {
  178. "name" : "strOwner_Cheque",
  179. "type" : "text",
  180. "x" : 67,
  181. "y" : 104,
  182.  
  183. "text" : localeInfo.CHEQUE_SYSTEM_UNIT_WON,
  184. },
  185. {
  186. "name" : "strOwner_Yang",
  187. "type" : "text",
  188. "x" : 67,
  189. "y" : 126,
  190.  
  191. "text" : localeInfo.CHEQUE_SYSTEM_UNIT_YANG,
  192. },
  193. ),
  194. },
  195.  
  196. ## Target
  197. {
  198. "name" : "Target",
  199. "type" : "window",
  200.  
  201. "x" : 10,
  202. "y" : 33,
  203.  
  204. "width" : 130,
  205. "height" : 130,
  206.  
  207. "children" :
  208. (
  209. {
  210. "name" : "Target_Slot",
  211. "type" : "grid_table",
  212.  
  213. "start_index" : 0,
  214.  
  215. "x" : 0,
  216. "y" : 0,
  217.  
  218. "x_count" : 4,
  219. "y_count" : 3,
  220. "x_step" : 32,
  221. "y_step" : 32,
  222. "x_blank" : 0,
  223. "y_blank" : 0,
  224.  
  225. "image" : "d:/ymir work/ui/public/slot_base.sub",
  226. },
  227. {
  228. "name" : "Target_Cheque",
  229. "type" : "image",
  230.  
  231. "x" : 0,
  232. "y" : 102,
  233.  
  234. "image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  235.  
  236. "children" :
  237. (
  238. {
  239. "name" : "Target_Cheque_Value",
  240. "type" : "text",
  241.  
  242. "x" : 59,
  243. "y" : 2,
  244.  
  245. "text" : "1234567",
  246.  
  247. "text_horizontal_align" : "right",
  248. },
  249. ),
  250. },
  251. {
  252. "name" : "Target_Money",
  253. "type" : "image",
  254.  
  255. "x" : 0,
  256. "y" : 124,
  257.  
  258. "image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  259.  
  260. "children" :
  261. (
  262. {
  263. "name" : "Target_Money_Value",
  264. "type" : "text",
  265.  
  266. "x" : 59,
  267. "y" : 2,
  268.  
  269. "text" : "1234567",
  270.  
  271. "text_horizontal_align" : "right",
  272. },
  273. ),
  274. },
  275. {
  276. "name" : "Target_Accept_Light",
  277. "type" : "button",
  278.  
  279. "x" : 95,
  280. "y" : 102,
  281.  
  282. "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  283. "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  284. "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
  285. },
  286. {
  287. "name" : "strTarget_Cheque",
  288. "type" : "text",
  289. "x" : 67,
  290. "y" : 104,
  291.  
  292. "text" : localeInfo.CHEQUE_SYSTEM_UNIT_WON,
  293. },
  294. {
  295. "name" : "strTarget_Yang",
  296. "type" : "text",
  297. "x" : 67,
  298. "y" : 126,
  299.  
  300. "text" : localeInfo.CHEQUE_SYSTEM_UNIT_YANG,
  301. },
  302. ),
  303. },
  304. ),
  305. },
  306. ),
  307. }
  308. else :
  309. window = {
  310. "name" : "ExchangeDialog",
  311.  
  312. "x" : 0,
  313. "y" : 0,
  314.  
  315. "style" : ("movable", "float",),
  316.  
  317. "width" : 282,
  318. "height" : 167,
  319.  
  320. "children" :
  321. (
  322. {
  323. "name" : "board",
  324. "type" : "board",
  325. "style" : ("attach",),
  326.  
  327. "x" : 0,
  328. "y" : 0,
  329.  
  330. "width" : 282,
  331. "height" : 167,
  332.  
  333. "children" :
  334. (
  335. ## Title
  336. {
  337. "name" : "TitleBar",
  338. "type" : "titlebar",
  339. "style" : ("attach",),
  340.  
  341. "x" : 8,
  342. "y" : 8,
  343.  
  344. "width" : 266,
  345. "color" : "gray",
  346.  
  347. "children" :
  348. (
  349. { "name":"TitleName", "type":"text", "x":133, "y":3, "text":uiScriptLocale.EXCHANGE_TITLE, "text_horizontal_align":"center" },
  350. ),
  351. },
  352.  
  353. ## MiddleBar
  354. {
  355. "name" : "Middle_Bar",
  356. "type" : "image",
  357.  
  358. "x" : 139,
  359. "y" : 31,
  360.  
  361. "image" : ROOT + "windows/middlebar.sub",
  362. },
  363.  
  364. ## Owner
  365. {
  366. "name" : "Owner",
  367. "type" : "window",
  368.  
  369. "x" : 144,
  370. "y" : 33,
  371.  
  372. "width" : 130,
  373. "height" : 130,
  374.  
  375. "children" :
  376. (
  377. {
  378. "name" : "Owner_Slot",
  379. "type" : "grid_table",
  380.  
  381. "start_index" : 0,
  382.  
  383. "x" : 0,
  384. "y" : 0,
  385.  
  386. "x_count" : 4,
  387. "y_count" : 3,
  388. "x_step" : 32,
  389. "y_step" : 32,
  390. "x_blank" : 0,
  391. "y_blank" : 0,
  392.  
  393. "image" : "d:/ymir work/ui/public/slot_base.sub",
  394. },
  395. {
  396. "name" : "Owner_Money",
  397. "type" : "button",
  398.  
  399. "x" : 0,
  400. "y" : 102,
  401.  
  402. #"image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  403.  
  404. "default_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  405. "over_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  406. "down_image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  407.  
  408. "children" :
  409. (
  410. {
  411. "name" : "Owner_Money_Value",
  412. "type" : "text",
  413.  
  414. "x" : 59,
  415. "y" : 2,
  416.  
  417. "text" : "1234567",
  418.  
  419. "text_horizontal_align" : "right",
  420. },
  421. ),
  422. },
  423. {
  424. "name" : "Owner_Accept_Light",
  425. "type" : "button",
  426.  
  427. "x" : 62,
  428. "y" : 101,
  429.  
  430. "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  431. "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  432. "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
  433. },
  434. {
  435. "name" : "Owner_Accept_Button",
  436. "type" : "toggle_button",
  437.  
  438. "x" : 85,
  439. "y" : 101,
  440.  
  441. "text" : uiScriptLocale.EXCHANGE_ACCEPT,
  442.  
  443. "default_image" : "d:/ymir work/ui/public/small_button_01.sub",
  444. "over_image" : "d:/ymir work/ui/public/small_button_02.sub",
  445. "down_image" : "d:/ymir work/ui/public/small_button_03.sub",
  446. },
  447. ),
  448. },
  449.  
  450. ## Target
  451. {
  452. "name" : "Target",
  453. "type" : "window",
  454.  
  455. "x" : 10,
  456. "y" : 33,
  457.  
  458. "width" : 130,
  459. "height" : 130,
  460.  
  461. "children" :
  462. (
  463. {
  464. "name" : "Target_Slot",
  465. "type" : "grid_table",
  466.  
  467. "start_index" : 0,
  468.  
  469. "x" : 0,
  470. "y" : 0,
  471.  
  472. "x_count" : 4,
  473. "y_count" : 3,
  474. "x_step" : 32,
  475. "y_step" : 32,
  476. "x_blank" : 0,
  477. "y_blank" : 0,
  478.  
  479. "image" : "d:/ymir work/ui/public/slot_base.sub",
  480. },
  481. {
  482. "name" : "Target_Money",
  483. "type" : "image",
  484.  
  485. "x" : 0,
  486. "y" : 102,
  487.  
  488. "image" : "d:/ymir work/ui/public/parameter_slot_02.sub",
  489.  
  490. "children" :
  491. (
  492. {
  493. "name" : "Target_Money_Value",
  494. "type" : "text",
  495.  
  496. "x" : 59,
  497. "y" : 2,
  498.  
  499. "text" : "1234567",
  500.  
  501. "text_horizontal_align" : "right",
  502. },
  503. ),
  504. },
  505. {
  506. "name" : "Target_Accept_Light",
  507. "type" : "button",
  508.  
  509. "x" : 62,
  510. "y" : 101,
  511.  
  512. "default_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  513. "over_image" : "d:/ymir work/ui/game/windows/accept_button_off.sub",
  514. "down_image" : "d:/ymir work/ui/game/windows/accept_button_on.sub",
  515. },
  516. ),
  517. },
  518. ),
  519. },
  520. ),
  521. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement