Guest User

inventorywindow.py

a guest
Jun 7th, 2018
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 8.78 KB | None | 0 0
  1. import uiScriptLocale
  2. import item
  3.  
  4. EQUIPMENT_START_INDEX = 180
  5.  
  6. window = {
  7.     "name" : "InventoryWindow",
  8.  
  9.     ## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px)
  10.     "x" : SCREEN_WIDTH - 176,
  11.     "y" : SCREEN_HEIGHT - 37 - 565,
  12.  
  13.     "style" : ("movable", "float",),
  14.  
  15.     "width" : 176,
  16.     "height" : 565,
  17.  
  18.     "children" :
  19.     (
  20.         ## Inventory, Equipment Slots
  21.         {
  22.             "name" : "board",
  23.             "type" : "board",
  24.             "style" : ("attach",),
  25.  
  26.             "x" : 0,
  27.             "y" : 0,
  28.  
  29.             "width" : 176,
  30.             "height" : 565,
  31.  
  32.             "children" :
  33.             (
  34.                 ## Title
  35.                 {
  36.                     "name" : "TitleBar",
  37.                     "type" : "titlebar",
  38.                     "style" : ("attach",),
  39.  
  40.                     "x" : 8,
  41.                     "y" : 7,
  42.  
  43.                     "width" : 161,
  44.                     "color" : "yellow",
  45.  
  46.                     "children" :
  47.                     (
  48.                         { "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
  49.                     ),
  50.                 },
  51.  
  52.                 ## Equipment Slot
  53.                 {
  54.                     "name" : "Equipment_Base",
  55.                     "type" : "image",
  56.  
  57.                     "x" : 10,
  58.                     "y" : 33,
  59.  
  60.                     "image" : "d:/ymir work/ui/equipment_bg_without_ring.tga",
  61.  
  62.                     "children" :
  63.                     (
  64.  
  65.                         {
  66.                             "name" : "EquipmentSlot",
  67.                             "type" : "slot",
  68.  
  69.                             "x" : 3,
  70.                             "y" : 3,
  71.  
  72.                             "width" : 150,
  73.                             "height" : 182,
  74.  
  75.                             "slot" : (
  76.                                         {"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
  77.                                         {"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
  78.                                         {"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
  79.                                         {"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
  80.                                         {"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
  81.                                         {"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32},
  82.                                         {"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32},
  83.                                         {"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32},
  84.                                         {"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32},
  85.                                         {"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32},
  86.                                         {"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
  87.                                         ## »õ ¹ÝÁö1
  88.                                         ##{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32},
  89.                                         ## »õ ¹ÝÁö2
  90.                                         ##{"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
  91.                                         ## »õ º§Æ®
  92.                                         {"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
  93.                                     ),
  94.                         },
  95.                         ## MallButton
  96.                         {
  97.                             "name" : "MallButton",
  98.                             "type" : "button",
  99.  
  100.                             "x" : 118,
  101.                             "y" : 148,
  102.  
  103.                             "tooltip_text" : uiScriptLocale.MALL_TITLE,
  104.  
  105.                             "default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
  106.                             "over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
  107.                             "down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
  108.                         },
  109.                         ## Offline Shop Button
  110.                         {
  111.                             "name" : "OfflineShopButton",
  112.                             "type" : "button",
  113.  
  114.                             "x" : 114,
  115.                             "y" : 107,
  116.  
  117.                             "tooltip_text" : uiScriptLocale.TASKBAR_OFFLINE_SHOP,
  118.  
  119.                             "default_image" : "locale/it/offlineshop/boton1.tga",
  120.                             "over_image" : "locale/it/offlineshop/boton2.tga",
  121.                             "down_image" : "locale/it/offlineshop/boton1.tga",
  122.                         },
  123.                         ## CostumeButton
  124.                         {
  125.                             "name" : "CostumeButton",
  126.                             "type" : "button",
  127.  
  128.                             "x" : 77,
  129.                             "y" : 5,
  130.  
  131.                             "tooltip_text" : uiScriptLocale.COSTUME_TITLE,
  132.  
  133.                             "default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
  134.                             "over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
  135.                             "down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
  136.                         },                     
  137.                         {
  138.                             "name" : "Equipment_Tab_01",
  139.                             "type" : "radio_button",
  140.  
  141.                             "x" : 86,
  142.                             "y" : 161,
  143.  
  144.                             "default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
  145.                             "over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
  146.                             "down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
  147.  
  148.                             "children" :
  149.                             (
  150.                                 {
  151.                                     "name" : "Equipment_Tab_01_Print",
  152.                                     "type" : "text",
  153.  
  154.                                     "x" : 0,
  155.                                     "y" : 0,
  156.  
  157.                                     "all_align" : "center",
  158.  
  159.                                     "text" : "I",
  160.                                 },
  161.                             ),
  162.                         },
  163.                         {
  164.                             "name" : "Equipment_Tab_02",
  165.                             "type" : "radio_button",
  166.  
  167.                             "x" : 86 + 32,
  168.                             "y" : 161,
  169.  
  170.                             "default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
  171.                             "over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
  172.                             "down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
  173.  
  174.                             "children" :
  175.                             (
  176.                                 {
  177.                                     "name" : "Equipment_Tab_02_Print",
  178.                                     "type" : "text",
  179.  
  180.                                     "x" : 0,
  181.                                     "y" : 0,
  182.  
  183.                                     "all_align" : "center",
  184.  
  185.                                     "text" : "II",
  186.                                 },
  187.                             ),
  188.                         },
  189.  
  190.                     ),
  191.                 },
  192.                 {
  193.                     "name" : "Inventory_Tab_01",
  194.                     "type" : "radio_button",
  195.  
  196.                     "x" : 10,
  197.                     "y" : 33 + 191,
  198.  
  199.                     "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
  200.                     "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
  201.                     "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
  202.                     "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,
  203.  
  204.                     "children" :
  205.                     (
  206.                         {
  207.                             "name" : "Inventory_Tab_01_Print",
  208.                             "type" : "text",
  209.  
  210.                             "x" : 0,
  211.                             "y" : 0,
  212.  
  213.                             "all_align" : "center",
  214.  
  215.                             "text" : "I",
  216.                         },
  217.                     ),
  218.                 },
  219.                 {
  220.                     "name" : "Inventory_Tab_02",
  221.                     "type" : "radio_button",
  222.  
  223.                     #"x" : 10 + 78,
  224.                     "x" : 10 + 39,
  225.                     "y" : 33 + 191,
  226.  
  227.                     "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
  228.                     "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
  229.                     "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
  230.                     "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,
  231.  
  232.                     "children" :
  233.                     (
  234.                         {
  235.                             "name" : "Inventory_Tab_02_Print",
  236.                             "type" : "text",
  237.  
  238.                             "x" : 0,
  239.                             "y" : 0,
  240.  
  241.                             "all_align" : "center",
  242.  
  243.                             "text" : "II",
  244.                         },
  245.                     ),
  246.                 },
  247.                
  248.                 {
  249.                     "name" : "Inventory_Tab_03",
  250.                     "type" : "radio_button",
  251.  
  252.                     "x" : 10 + 39 + 39,
  253.                     "y" : 33 + 191,
  254.  
  255.                     "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
  256.                     "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
  257.                     "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
  258.                     "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_3,
  259.  
  260.                     "children" :
  261.                     (
  262.                         {
  263.                             "name" : "Inventory_Tab_03_Print",
  264.                             "type" : "text",
  265.  
  266.                             "x" : 0,
  267.                             "y" : 0,
  268.  
  269.                             "all_align" : "center",
  270.  
  271.                             "text" : "III",
  272.                         },
  273.                     ),
  274.                 },
  275.                
  276.                 {
  277.                     "name" : "Inventory_Tab_04",
  278.                     "type" : "radio_button",
  279.  
  280.                     "x" : 10 + 39 + 39 + 39,
  281.                     "y" : 33 + 191,
  282.  
  283.                     "default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
  284.                     "over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
  285.                     "down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
  286.                     "tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_4,
  287.  
  288.                     "children" :
  289.                     (
  290.                         {
  291.                             "name" : "Inventory_Tab_04_Print",
  292.                             "type" : "text",
  293.  
  294.                             "x" : 0,
  295.                             "y" : 0,
  296.  
  297.                             "all_align" : "center",
  298.  
  299.                             "text" : "IV",
  300.                         },
  301.                     ),
  302.                 },
  303.  
  304.                 ## Item Slot
  305.                 {
  306.                     "name" : "ItemSlot",
  307.                     "type" : "grid_table",
  308.  
  309.                     "x" : 8,
  310.                     "y" : 246,
  311.  
  312.                     "start_index" : 0,
  313.                     "x_count" : 5,
  314.                     "y_count" : 9,
  315.                     "x_step" : 32,
  316.                     "y_step" : 32,
  317.  
  318.                     "image" : "d:/ymir work/ui/public/Slot_Base.sub"
  319.                 },
  320.  
  321.                 ## Print
  322.                 {
  323.                     "name":"Money_Slot",
  324.                     "type":"button",
  325.  
  326.                     "x":8,
  327.                     "y":28,
  328.  
  329.                     "horizontal_align":"center",
  330.                     "vertical_align":"bottom",
  331.  
  332.                     "default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
  333.                     "over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
  334.                     "down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
  335.  
  336.                     "children" :
  337.                     (
  338.                         {
  339.                             "name":"Money_Icon",
  340.                             "type":"image",
  341.  
  342.                             "x":-18,
  343.                             "y":2,
  344.  
  345.                             "image":"d:/ymir work/ui/game/windows/money_icon.sub",
  346.                         },
  347.  
  348.                         {
  349.                             "name" : "Money",
  350.                             "type" : "text",
  351.  
  352.                             "x" : 3,
  353.                             "y" : 3,
  354.  
  355.                             "horizontal_align" : "right",
  356.                             "text_horizontal_align" : "right",
  357.  
  358.                             "text" : "123456789",
  359.                         },
  360.                     ),
  361.                 },
  362.             ),
  363.         },
  364.     ),
  365. }
Advertisement
Add Comment
Please, Sign In to add comment