Advertisement
Guest User

Untitled

a guest
Mar 12th, 2019
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 3.29 KB | None | 0 0
  1. import uiScriptLocale
  2.  
  3. IN_GAME_UI_WIDTH    = 240
  4. IN_GAME_UI_HEIGHT   = 180
  5. REWARD_UI_HEIGHT    = 67
  6.  
  7. SLOT_WIDTH = 32
  8. SLOT_HEIGHT = 32
  9.  
  10. window = {
  11.     "name" : "LuckyBoxWindow",
  12.     "style" : ("movable", "float",),
  13.  
  14.     "x" : SCREEN_WIDTH - 176 - IN_GAME_UI_WIDTH + 5,
  15.     "y" : SCREEN_HEIGHT - 37 - 565 + 209 + 32 - IN_GAME_UI_HEIGHT + 5,
  16.  
  17.     "width" : IN_GAME_UI_WIDTH,
  18.     "height" : IN_GAME_UI_HEIGHT,
  19.  
  20.     "children" :
  21.     [
  22.         {
  23.             "name" : "board",
  24.             "type" : "board",
  25.             "style" : ("attach",),
  26.  
  27.             "x" : 0,
  28.             "y" : 0,
  29.            
  30.             "width" : IN_GAME_UI_WIDTH,
  31.             "height" : IN_GAME_UI_HEIGHT,
  32.  
  33.             "children" :
  34.             [
  35.                 {
  36.                     "name" : "LuckyBox_TitleBar", "type" : "titlebar", "x" : 0, "y" : 5, "width" : IN_GAME_UI_WIDTH - 5, "height" : 21, "style" : ("attach",),
  37.                     "children" :
  38.                     (
  39.                         {"name":"TitleName", "type":"text", "x":0, "y":0, "text":uiScriptLocale.LUCKY_BOX_TITLE_NAME,  "all_align" : "center",},
  40.                     ),
  41.                 },
  42.                
  43.                 { "name":"LuckyBox_Reward", "type":"horizontalbar", "x":10, "y":IN_GAME_UI_HEIGHT / 2 - SLOT_HEIGHT - 20, "width":IN_GAME_UI_WIDTH - 20, },
  44.                 { "name":"LuckyBox_Name", "type":"text", "x":15, "y":IN_GAME_UI_HEIGHT / 2 - SLOT_HEIGHT - 20 + 2, "text":uiScriptLocale.LUCKY_BOX_RECV_NAME,},
  45.                                
  46.                 {                  
  47.                     "name" : "RewardItemSlot",
  48.                     "type" : "slot",
  49.                    
  50.                     "x" : 15,
  51.                     "y" : IN_GAME_UI_HEIGHT / 2 - SLOT_HEIGHT + 12,
  52.                     "width" : SLOT_WIDTH,
  53.                     "height" : IN_GAME_UI_HEIGHT,
  54.                    
  55.                     "image" : "d:/ymir work/ui/public/Slot_Base.sub",
  56.                    
  57.                     "slot" :
  58.                     (
  59.                         {"index":0, "x":0, "y":0, "width":SLOT_WIDTH, "height":SLOT_HEIGHT},
  60.                     ),                     
  61.                 },
  62.                
  63.                 ## Button
  64.                 {
  65.                     "name" : "RetryButton",
  66.                     "type" : "button",
  67.  
  68.                     "x" : 15 + SLOT_WIDTH + 5,
  69.                     "y" : IN_GAME_UI_HEIGHT / 2,
  70.  
  71.                     "text" : uiScriptLocale.LUCKY_BOX_RETRY_BUTTON,
  72.  
  73.                     "default_image" : "d:/ymir work/ui/event/long_button_01.sub",
  74.                     "over_image" : "d:/ymir work/ui/event/long_button_02.sub",
  75.                     "down_image" : "d:/ymir work/ui/event/long_button_03.sub",
  76.                 },
  77.                 {
  78.                     "name" : "RecvButton",
  79.                     "type" : "button",
  80.  
  81.                     "x" : 15 + SLOT_WIDTH + 5,
  82.                     "y" : IN_GAME_UI_HEIGHT / 2 - (SLOT_HEIGHT),
  83.  
  84.                     "text" : uiScriptLocale.LUCKY_BOX_RECV_BUTTON,
  85.  
  86.                     "default_image" : "d:/ymir work/ui/event/long_button_01.sub",
  87.                     "over_image" : "d:/ymir work/ui/event/long_button_02.sub",
  88.                     "down_image" : "d:/ymir work/ui/event/long_button_03.sub",
  89.                 },
  90.                
  91.                 { "name":"Notice_Yang", "type":"horizontalbar", "x":10, "y":IN_GAME_UI_HEIGHT - 55, "width":IN_GAME_UI_WIDTH - 20, },
  92.                 { "name":"RecycleTitleName", "type":"text", "x":15, "y":IN_GAME_UI_HEIGHT - 55 + 2, "text":uiScriptLocale.LUCKY_BOX_NOTICE_YANG,},             
  93.                
  94.                 {
  95.                     "name":"NeedMoneySlot",
  96.                     "type":"button",
  97.  
  98.                     "x" : 15 + SLOT_WIDTH + 5,
  99.                     "y" : IN_GAME_UI_HEIGHT - 40,
  100.  
  101.                     "default_image" : "d:/ymir work/ui/public/gold_slot.sub",
  102.                     "over_image" : "d:/ymir work/ui/public/gold_slot.sub",
  103.                     "down_image" : "d:/ymir work/ui/public/gold_slot.sub",
  104.  
  105.                     "children" :
  106.                     (
  107.                         {
  108.                             "name" : "NeedMoney",
  109.                             "type" : "text",
  110.  
  111.                             "x" : -75,
  112.                             "y" : 3,
  113.  
  114.                             "horizontal_align" : "right",
  115.                             "text_horizontal_align" : "right",
  116.  
  117.                             "text" : "50,000",
  118.                         },
  119.                     ),
  120.                 },
  121.             ],
  122.         },
  123.     ],
  124. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement