Advertisement
Guest User

skillcolorwindow.py

a guest
Oct 30th, 2022
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.34 KB | None | 0 0
  1. # (c) 2019 Owsap Productions
  2.  
  3. import uiScriptLocale
  4.  
  5. BOARD_WIDTH = 350
  6. BOARD_HEIGHT = 340 + 14
  7.  
  8. THINBOARD_WIDTH = 310
  9. THINBOARD_HEIGHT = 280 + 14
  10.  
  11. BUTTON_GAP = 12.5
  12.  
  13. COLOR_PICKER_WIDTH = 256
  14. COLOR_PICKER_HEIGHT = 256
  15.  
  16. window = {
  17. "name" : "SkillColorWindow",
  18. "style" : ("movable", "float",),
  19.  
  20. "x" : (SCREEN_WIDTH - BOARD_WIDTH) / 2,
  21. "y" : (SCREEN_HEIGHT - BOARD_HEIGHT) / 2,
  22.  
  23. "width" : BOARD_WIDTH,
  24. "height" : BOARD_HEIGHT,
  25.  
  26. "children" :
  27. (
  28. ## Main Board
  29. {
  30. "name" : "Board",
  31. "type" : "board_with_titlebar",
  32. "style" : ("attach",),
  33.  
  34. "x" : 0,
  35. "y" : 5,
  36.  
  37. "width" : BOARD_WIDTH,
  38. "height" : BOARD_HEIGHT,
  39.  
  40. "title" : uiScriptLocale.SKILL_COLOR_TITLE,
  41.  
  42. "children" :
  43. (
  44. ## Thinboard (container)
  45. {
  46. "name" : "ThinBoard",
  47. "type" : "thinboard_circle",
  48.  
  49. "x" : 28,
  50. "y" : 35,
  51.  
  52. "width" : THINBOARD_WIDTH - 15,
  53. "height" : THINBOARD_HEIGHT - 15,
  54.  
  55. "children" :
  56. (
  57. ## Background Color Bar
  58. {
  59. "name" : "BGColorBar",
  60. "type" : "bar",
  61.  
  62. "x" : 0,
  63. "y" : 0,
  64.  
  65. "width" : THINBOARD_WIDTH - 15,
  66. "height" : THINBOARD_HEIGHT - 15,
  67.  
  68. "color" : 0xff303030,
  69. },
  70.  
  71. ## Background Image
  72. {
  73. "name" : "BGImage",
  74. "type" : "image",
  75.  
  76. "x" : 2.5,
  77. "y" : 2.5,
  78.  
  79. "image" : "d:/ymir work/ui/skillcolor/background_expanded.tga",
  80. },
  81.  
  82. ## Background Color Picker Image (p1)
  83. {
  84. "name" : "BGColorPickerImage",
  85. "type" : "image",
  86.  
  87. "x" : 35,
  88. "y" : 20,
  89.  
  90. "width" : COLOR_PICKER_WIDTH,
  91. "height" : COLOR_PICKER_HEIGHT,
  92.  
  93. "image" : "d:/ymir work/ui/skillcolor/color_picker_background.tga",
  94.  
  95. "children" :
  96. (
  97. ## Color Picker Button
  98. {
  99. "name" : "BGColorPickerButton",
  100. "type" : "button",
  101.  
  102. "x" : 0,
  103. "y" : 0,
  104.  
  105. "width" : COLOR_PICKER_WIDTH,
  106. "height" : COLOR_PICKER_HEIGHT,
  107. },
  108. ## Color Picker Dot Image
  109. {
  110. "name" : "BGColorPickerDotImage",
  111. "type" : "image",
  112.  
  113. "x" : 0,
  114. "y" : 0,
  115.  
  116. "width" : 12,
  117. "height" : 12,
  118.  
  119. "image" : "d:/ymir work/ui/skillcolor/color_picker_dot.tga",
  120. },
  121. ),
  122. },
  123.  
  124. ## Background2 Image (p2)
  125. {
  126. "name" : "BG2Image",
  127. "type" : "image",
  128.  
  129. "x" : 2.5,
  130. "y" : 2.5,
  131.  
  132. "image" : "d:/ymir work/ui/skillcolor/background_expanded.tga",
  133.  
  134. "children" :
  135. (
  136. ## Background2 Window (container)
  137. {
  138. "name" : "BG2Window",
  139. "type" : "window",
  140.  
  141. "x" : 70 + 1,
  142. "y" : 30,
  143.  
  144. "width" : 150,
  145. "height" : 172.5,
  146.  
  147. "children" :
  148. (
  149. ## Preset Selection
  150. {
  151. "name" : "BG2ColorPresetSlotImage",
  152. "type" : "expanded_image",
  153. "style" : ("attach",),
  154.  
  155. "x" : 0,
  156. "y" : 0,
  157.  
  158. "width" : COLOR_PICKER_WIDTH,
  159. "height" : COLOR_PICKER_HEIGHT,
  160.  
  161. "image" : "d:/ymir work/ui/pet/Pet_Incu_001.tga",
  162.  
  163. "children" :
  164. (
  165. {
  166. "name" : "BG2ColorPresetTitle",
  167. "type" : "text",
  168.  
  169. "x" : 0,
  170. "y" : -10,
  171.  
  172. "text" : uiScriptLocale.SKILL_COLOR_PRESET_TITLE,
  173. "all_align" : "center"
  174. },
  175. {
  176. "name" : "BG2ColorPresetEditLine",
  177. "type" : "button",
  178.  
  179. "x" : 13,
  180. "y" : 30 - 2,
  181.  
  182. "width" : 136,
  183. "height" : 16,
  184.  
  185. "text" : uiScriptLocale.SKILL_COLOR_PRESET_SELECT,
  186. },
  187. {
  188. "name" : "BG2ColorPresetButton",
  189. "type" : "button",
  190.  
  191. "x" : 124.5,
  192. "y" : 29,
  193.  
  194. "default_image" : "d:/ymir work/ui/game/mailbox/friend_select_arrow_button_default.sub",
  195. "over_image" : "d:/ymir work/ui/game/mailbox/friend_select_arrow_button_over.sub",
  196. "down_image" : "d:/ymir work/ui/game/mailbox/friend_select_arrow_button_down.sub",
  197. },
  198. ),
  199. },
  200.  
  201. ## Preset Buttons
  202. {
  203. "name" : "BG2ColorPresetSaveButton",
  204. "type" : "button",
  205.  
  206. "x" : 0,
  207. "y" : 60,
  208.  
  209. "text" : uiScriptLocale.SKILL_COLOR_PRESET_SAVE,
  210. "text_height" : 6,
  211.  
  212. "default_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_01.sub",
  213. "over_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_02.sub",
  214. "down_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_03.sub",
  215. },
  216. {
  217. "name" : "BG2ColorPresetClearButton",
  218. "type" : "button",
  219.  
  220. "x" : 0,
  221. "y" : 60 + 30,
  222.  
  223. "text" : uiScriptLocale.SKILL_COLOR_PRESET_CLEAR,
  224. "text_height" : 6,
  225.  
  226. "default_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_01.sub",
  227. "over_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_02.sub",
  228. "down_image" : "d:/ymir work/ui/game/myshop_deco/select_btn_03.sub",
  229. },
  230.  
  231. ## Custom Hex Color
  232. {
  233. "name" : "BG2CustomColorInputSlotImage",
  234. "type" : "expanded_image",
  235. "style" : ("attach",),
  236.  
  237. "x" : 0,
  238. "y" : 120,
  239.  
  240. "width" : COLOR_PICKER_WIDTH,
  241. "height" : COLOR_PICKER_HEIGHT,
  242.  
  243. "image" : "d:/ymir work/ui/pet/Pet_Incu_001.tga",
  244.  
  245. "children" :
  246. (
  247. {
  248. "name" : "BG2CustomColorTitle",
  249. "type" : "text",
  250.  
  251. "x" : 0,
  252. "y" : -10,
  253.  
  254. "text" : uiScriptLocale.SKILL_COLOR_CUSTOM_COLOR_CODE_TITLE,
  255. "all_align" : "center"
  256. },
  257. {
  258. "name" : "BG2CustomColorEditLine",
  259. "type" : "editline",
  260.  
  261. "x" : 13,
  262. "y" : 30,
  263.  
  264. "width" : 136,
  265. "height" : 15,
  266.  
  267. "text" : "",
  268. "input_limit" : 7,
  269. },
  270. ),
  271. },
  272. ),
  273. },
  274.  
  275. ## ToolTips
  276. {
  277. "name" : "BG2CustomColorToolTip",
  278. "type" : "button",
  279.  
  280. "x" : 200,
  281. "y" : 35 + 120,
  282.  
  283. "default_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
  284. "over_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
  285. "down_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
  286. },
  287. {
  288. "name" : "BG2ColorPresetToolTip",
  289. "type" : "button",
  290.  
  291. "x" : 200,
  292. "y" : 35,
  293.  
  294. "default_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
  295. "over_image" : "d:/ymir work/ui/pattern/q_mark_02.tga",
  296. "down_image" : "d:/ymir work/ui/pattern/q_mark_01.tga",
  297. },
  298. ),
  299. },
  300. ),
  301. },
  302.  
  303. ## Color Layer Buttons
  304. {
  305. "name" : "ColorLayer1Button",
  306. "type" : "button",
  307.  
  308. "x" : BUTTON_GAP + 62.5 + 35 * 0,
  309. "y" : BOARD_HEIGHT - 65,
  310.  
  311. "text" : "1",
  312. "text_height" : 4,
  313.  
  314. "default_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_00.sub",
  315. "over_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_01.sub",
  316. "down_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  317. "disable_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  318. },
  319.  
  320. {
  321. "name" : "ColorLayer2Button",
  322. "type" : "button",
  323.  
  324. "x" : BUTTON_GAP + 62.5 + 35 * 1,
  325. "y" : BOARD_HEIGHT - 65,
  326.  
  327. "text" : "2",
  328. "text_height" : 4,
  329.  
  330. "default_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_00.sub",
  331. "over_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_01.sub",
  332. "down_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  333. "disable_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  334. },
  335.  
  336. {
  337. "name" : "ColorLayer3Button",
  338. "type" : "button",
  339.  
  340. "x" : BUTTON_GAP + 62.5 + 35 * 2,
  341. "y" : BOARD_HEIGHT - 65,
  342.  
  343. "text" : "3",
  344. "text_height" : 4,
  345.  
  346. "default_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_00.sub",
  347. "over_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_01.sub",
  348. "down_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  349. "disable_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  350. },
  351. {
  352. "name" : "ColorLayer4Button",
  353. "type" : "button",
  354.  
  355. "x" : BUTTON_GAP + 62.5 + 35 * 3,
  356. "y" : BOARD_HEIGHT - 65,
  357.  
  358. "text" : "4",
  359. "text_height" : 4,
  360.  
  361. "default_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_00.sub",
  362. "over_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_01.sub",
  363. "down_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  364. "disable_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  365. },
  366. {
  367. "name" : "ColorLayer5Button",
  368. "type" : "button",
  369.  
  370. "x" : BUTTON_GAP + 62.5 + 35 * 4,
  371. "y" : BOARD_HEIGHT - 65,
  372.  
  373. "text" : "5",
  374. "text_height" : 4,
  375.  
  376. "default_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_00.sub",
  377. "over_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_01.sub",
  378. "down_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  379. "disable_image" : "d:/ymir work/ui/privatesearch/private_pagenumber_02.sub",
  380. },
  381.  
  382. ## Default button
  383. {
  384. "name" : "ConfirmButton",
  385. "type" : "button",
  386.  
  387. "x" : BUTTON_GAP,
  388. "y" : BOARD_HEIGHT - 35.5,
  389.  
  390. "text" : uiScriptLocale.SKILL_COLOR_CHANGE,
  391. "text_height" : 6,
  392.  
  393. "default_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  394. "over_image" : "d:/ymir work/ui/game/dungeon_list/button_h.tga",
  395. "down_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  396. },
  397.  
  398. {
  399. "name" : "DefaultButton",
  400. "type" : "button",
  401.  
  402. "x" : BUTTON_GAP + 110,
  403. "y" : BOARD_HEIGHT - 35.5,
  404.  
  405. "text" : uiScriptLocale.SKILL_COLOR_DEFAULT,
  406. "text_height" : 7,
  407.  
  408. "default_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  409. "over_image" : "d:/ymir work/ui/game/dungeon_list/button_h.tga",
  410. "down_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  411. },
  412.  
  413. {
  414. "name" : "CancelButton",
  415. "type" : "button",
  416.  
  417. "x" : BUTTON_GAP + 220,
  418. "y" : BOARD_HEIGHT - 35.5,
  419.  
  420. "text" : uiScriptLocale.SKILL_COLOR_CANCEL,
  421. "text_height" : 6,
  422.  
  423. "default_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  424. "over_image" : "d:/ymir work/ui/game/dungeon_list/button_h.tga",
  425. "down_image" : "d:/ymir work/ui/game/dungeon_list/button_d.tga",
  426. },
  427.  
  428. ## Background2 Color Preset Window (internal)
  429. {
  430. "name" : "BG2ColorPresetWindow",
  431. "type" : "window",
  432.  
  433. "x" : 94.5,
  434. "y" : 115,
  435.  
  436. "width" : 131,
  437. "height" : 0,
  438. },
  439.  
  440. ## Background2 Mouse Over Image (internal)
  441. {
  442. "name" : "BG2MouseOverImage",
  443. "type" : "expanded_image",
  444. "style" : ("not_pick",),
  445.  
  446. "x" : 0 + 10,
  447. "y" : 0 + 32,
  448.  
  449. "image" : "d:/ymir work/ui/game/mailbox/friend_list_mouse_over_img.sub",
  450. },
  451. )
  452. },
  453. ),
  454. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement