Advertisement
Guest User

inventorywindow.py

a guest
Apr 23rd, 2019
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 7.18 KB | None | 0 0
  1. import uiScriptLocale
  2.  
  3. EQUIPMENT_START_INDEX = 90
  4.  
  5. window = {
  6.     "name": "InventoryWindow",
  7.  
  8.     ## 600 - (width + 24 px)
  9.     "x": SCREEN_WIDTH - 176,
  10.     "y": SCREEN_HEIGHT - 37 - 565,
  11.  
  12.     "style": ("movable", "float",),
  13.  
  14.     "width": 176 + 130,
  15.     "height": 565,
  16.  
  17.     "children":
  18.         (
  19.             ## Inventory, Equipment Slots
  20.             {
  21.                 "name": "board",
  22.                 "type": "board",
  23.                 "style": ("attach",),
  24.  
  25.                 "x": 0,
  26.                 "y": 0,
  27.  
  28.                 "width": 176 + 130,
  29.                 "height": 565,
  30.  
  31.                 "children":
  32.                     (
  33.                         ## Title
  34.                         {
  35.                             "name": "TitleBar",
  36.                             "type": "titlebar",
  37.                             "style": ("attach",),
  38.  
  39.                             "x": 8,
  40.                             "y": 7,
  41.  
  42.                             "width": 161 + 130,
  43.                             "color": "yellow",
  44.  
  45.                             "children":
  46.                                 (
  47.                                     {"name": "TitleName", "type": "text", "x": 77 + 130, "y": 3,
  48.                                      "text": uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align": "center"},
  49.                                 ),
  50.                         },
  51.  
  52.                         ## Equipment Slot
  53.                         {
  54.                             "name": "Equipment_Base",
  55.                             "type": "expanded_image",
  56.  
  57.                             "x": 10,
  58.                             "y": 33,
  59.  
  60.                             "image": "d:/ymir work/ui/game/windows/equipment_base.sub",
  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": 34, "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": 3, "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.                                             #{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},                                          
  88.                                         ),
  89.                                     },
  90.                                     ## MallButton
  91.                                     {
  92.                                         "name": "MallButton",
  93.                                         "type": "button",
  94.  
  95.                                         "x": 118,
  96.                                         "y": 148,
  97.  
  98.                                         "tooltip_text": uiScriptLocale.MALL_TITLE,
  99.                                         "default_image": "d:/ymir work/ui/game/mall_button_01.tga",
  100.                                         "over_image": "d:/ymir work/ui/game/mall_button_02.tga",
  101.                                         "down_image": "d:/ymir work/ui/game/mall_button_03.tga",
  102.                                     },
  103.                                     ## CostumeButton
  104.                                     {
  105.                                         "name": "CostumeButton",
  106.                                         "type": "button",
  107.  
  108.                                         "x": 78,
  109.                                         "y": 5,
  110.  
  111.                                         "tooltip_text": uiScriptLocale.COSTUME_TITLE,
  112.  
  113.                                         "default_image": "d:/ymir work/ui/game/costume_button_01.tga",
  114.                                         "over_image": "d:/ymir work/ui/game/costume_button_02.tga",
  115.                                         "down_image": "d:/ymir work/ui/game/costume_button_03.tga",
  116.                                     },
  117.                                     {
  118.                                         "name": "Equipment_Tab_01",
  119.                                         "type": "radio_button",
  120.  
  121.                                         "x": 86,
  122.                                         "y": 161,
  123.  
  124.                                         "default_image": "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
  125.                                         "over_image": "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
  126.                                         "down_image": "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
  127.  
  128.                                         "children":
  129.                                             (
  130.                                                 {
  131.                                                     "name": "Equipment_Tab_01_Print",
  132.                                                     "type": "text",
  133.  
  134.                                                     "x": 0,
  135.                                                     "y": 0,
  136.  
  137.                                                     "all_align": "center",
  138.  
  139.                                                     "text": "I",
  140.                                                 },
  141.                                             ),
  142.                                     },
  143.                                     {
  144.                                         "name": "Equipment_Tab_02",
  145.                                         "type": "radio_button",
  146.  
  147.                                         "x": 86 + 32,
  148.                                         "y": 161,
  149.  
  150.                                         "default_image": "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
  151.                                         "over_image": "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
  152.                                         "down_image": "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
  153.  
  154.                                         "children":
  155.                                             (
  156.                                                 {
  157.                                                     "name": "Equipment_Tab_02_Print",
  158.                                                     "type": "text",
  159.  
  160.                                                     "x": 0,
  161.                                                     "y": 0,
  162.  
  163.                                                     "all_align": "center",
  164.  
  165.                                                     "text": "II",
  166.                                                 },
  167.                                             ),
  168.                                     },
  169.  
  170.                                 ),
  171.                         },
  172.  
  173.                         {
  174.                             "name": "Inventory_Tab_01",
  175.                             "type": "radio_button",
  176.  
  177.                             "x": 10,
  178.                             "y": 33 + 191,
  179.  
  180.                             "default_image": "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
  181.                             "over_image": "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
  182.                             "down_image": "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
  183.  
  184.                             "tooltip_text": uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,
  185.  
  186.                             "children":
  187.                                 (
  188.                                     {
  189.                                         "name": "Inventory_Tab_01_Print",
  190.                                         "type": "text",
  191.  
  192.                                         "x": 0,
  193.                                         "y": 0,
  194.  
  195.                                         "all_align": "center",
  196.  
  197.                                         "text": "I",
  198.                                     },
  199.                                 ),
  200.                         },
  201.                         {
  202.                             "name": "Inventory_Tab_02",
  203.                             "type": "radio_button",
  204.  
  205.                             "x": 10 + 78,
  206.                             "y": 33 + 191,
  207.  
  208.                             "default_image": "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
  209.                             "over_image": "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
  210.                             "down_image": "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
  211.  
  212.                             "tooltip_text": uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,
  213.  
  214.                             "children":
  215.                                 (
  216.                                     {
  217.                                         "name": "Inventory_Tab_02_Print",
  218.                                         "type": "text",
  219.  
  220.                                         "x": 0,
  221.                                         "y": 0,
  222.  
  223.                                         "all_align": "center",
  224.  
  225.                                         "text": "II",
  226.                                     },
  227.                                 ),
  228.                         },
  229.  
  230.                         ## Item Slot
  231.                         {
  232.                             "name": "ItemSlot",
  233.                             "type": "grid_table",
  234.  
  235.                             "x": 8,
  236.                             "y": 246,
  237.  
  238.                             "start_index": 0,
  239.                             "x_count": 5,
  240.                             "y_count": 9,
  241.                             "x_step": 32,
  242.                             "y_step": 32,
  243.  
  244.                             "image": "d:/ymir work/ui/public/Slot_Base.sub"
  245.                         },
  246.  
  247.                         ## Print
  248.                         {
  249.                             "name": "Money_Slot",
  250.                             "type": "button",
  251.  
  252.                             "x": 8,
  253.                             "y": 28,
  254.  
  255.                             "horizontal_align": "center",
  256.                             "vertical_align": "bottom",
  257.  
  258.                             "default_image": "d:/ymir work/ui/public/parameter_slot_05.sub",
  259.                             "over_image": "d:/ymir work/ui/public/parameter_slot_05.sub",
  260.                             "down_image": "d:/ymir work/ui/public/parameter_slot_05.sub",
  261.  
  262.                             "children":
  263.                                 (
  264.                                     {
  265.                                         "name": "Money_Icon",
  266.                                         "type": "image",
  267.  
  268.                                         "x": -18,
  269.                                         "y": 2,
  270.  
  271.                                         "image": "d:/ymir work/ui/game/windows/money_icon.sub",
  272.                                     },
  273.  
  274.                                     {
  275.                                         "name": "Money",
  276.                                         "type": "text",
  277.  
  278.                                         "x": 3,
  279.                                         "y": 4,
  280.  
  281.                                         "horizontal_align": "right",
  282.                                         "text_horizontal_align": "right",
  283.  
  284.                                         "text": "123456789",
  285.                                     },
  286.                                 ),
  287.                         },
  288.  
  289.                     ),
  290.             },
  291.         ),
  292. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement