Advertisement
Guest User

Pickmoneydialog

a guest
Dec 1st, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 4.73 KB | None | 0 0
  1. import uiScriptLocale
  2. import app
  3.  
  4. if app.ENABLE_CHEQUE_SYSTEM :
  5.     BOARD_WIDTH = 190
  6.     BOARD_HEIGHT = 112
  7.     window = {
  8.         "name" : "PickMoneyDialog",
  9.  
  10.         "x" : 100,
  11.         "y" : 100,
  12.  
  13.         "style" : ("movable", "float",),
  14.  
  15.         "width" : BOARD_WIDTH,
  16.         "height" : BOARD_HEIGHT,
  17.  
  18.         "children" :
  19.         (
  20.             {
  21.                 "name" : "board",
  22.                 "type" : "board_with_titlebar",
  23.  
  24.                 "x" : 0,
  25.                 "y" : 0,
  26.  
  27.                 "width" : BOARD_WIDTH,
  28.                 "height" : BOARD_HEIGHT,
  29.                 "title" : uiScriptLocale.PICK_MONEY_TITLE,
  30.  
  31.                 "children" :
  32.                 (
  33.                     ## Cheque Slot
  34.                     {
  35.                         "name" : "cheque_slot",
  36.                         "type" : "image",
  37.  
  38.                         "x" : 20+15,
  39.                         "y" : 34,
  40.  
  41.                         "image" : "d:/ymir work/ui/public/Parameter_Slot_02.sub",
  42.  
  43.                         "children" :
  44.                         (
  45.  
  46.                             {
  47.                                 "name":"Cheque_Icon",
  48.                                 "type":"image",
  49.  
  50.                                 "x":-22,
  51.                                 "y":2,
  52.  
  53.                                 "image":"d:/ymir work/ui/game/windows/cheque_icon.sub",
  54.                             },
  55.                             {
  56.                                 "name" : "cheque_value",
  57.                                 "type" : "editline",
  58.  
  59.                                 "x" : 3,
  60.                                 "y" : 2,
  61.  
  62.                                 "width" : 60,
  63.                                 "height" : 18,
  64.  
  65.                                 "input_limit" : 6,
  66.                                 "only_number" : 1,
  67.  
  68.                                 "text" : "0",
  69.                             },
  70.                             {
  71.                                 "name" : "cheque_max_value",
  72.                                 "type" : "text",
  73.  
  74.                                 "x" : 63,
  75.                                 "y" : 3,
  76.  
  77.                                 "text" : "/ 99",
  78.                             },
  79.                         ),
  80.                     },
  81.                    
  82.                     ## Money Slot
  83.                     {
  84.                         "name" : "money_slot",
  85.                         "type" : "image",
  86.  
  87.                         "x" : 20+15,
  88.                         "y" : 56,
  89.  
  90.                         "image" : "d:/ymir work/ui/public/Parameter_Slot_02.sub",
  91.  
  92.                         "children" :
  93.                         (
  94.                             {
  95.                                 "name":"Money_Icon",
  96.                                 "type":"image",
  97.  
  98.                                 "x":-22,
  99.                                 "y":2,
  100.  
  101.                                 "image":"d:/ymir work/ui/game/windows/money_icon.sub",
  102.                             },
  103.                             {
  104.                                 "name" : "money_value",
  105.                                 "type" : "editline",
  106.  
  107.                                 "x" : 3,
  108.                                 "y" : 2,
  109.  
  110.                                 "width" : 60,
  111.                                 "height" : 18,
  112.  
  113.                                 "input_limit" : 13,
  114.                                 "only_number" : 1,
  115.  
  116.                                 "text" : "1",
  117.                             },
  118.                             {
  119.                                 "name" : "max_value",
  120.                                 "type" : "text",
  121.  
  122.                                 "x" : 63,
  123.                                 "y" : 3,
  124.  
  125.                                 "text" : "/ 999999",
  126.                             },
  127.                         ),
  128.                     },
  129.  
  130.                     ## Button
  131.                     {
  132.                         "name" : "accept_button",
  133.                         "type" : "button",
  134.  
  135.                         "x" : BOARD_WIDTH/2 - 61 - 5,
  136.                         "y" : BOARD_HEIGHT - 32,
  137.  
  138.                         "text" : uiScriptLocale.OK,
  139.  
  140.                         "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
  141.                         "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
  142.                         "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
  143.                     },
  144.                     {
  145.                         "name" : "cancel_button",
  146.                         "type" : "button",
  147.  
  148.                         "x" : BOARD_WIDTH/2 + 5,
  149.                         "y" : BOARD_HEIGHT - 32,
  150.  
  151.                         "text" : uiScriptLocale.CANCEL,
  152.  
  153.                         "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
  154.                         "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
  155.                         "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
  156.                     },
  157.                 ),
  158.             },
  159.         ),
  160.     }
  161. else :
  162.     window = {
  163.         "name" : "PickMoneyDialog",
  164.  
  165.         "x" : 100,
  166.         "y" : 100,
  167.  
  168.         "style" : ("movable", "float",),
  169.  
  170.         "width" : 170,
  171.         "height" : 90,
  172.  
  173.         "children" :
  174.         (
  175.             {
  176.                 "name" : "board",
  177.                 "type" : "board_with_titlebar",
  178.  
  179.                 "x" : 0,
  180.                 "y" : 0,
  181.  
  182.                 "width" : 170,
  183.                 "height" : 90,
  184.                 "title" : uiScriptLocale.PICK_MONEY_TITLE,
  185.  
  186.                 "children" :
  187.                 (
  188.  
  189.                     ## Money Slot
  190.                     {
  191.                         "name" : "money_slot",
  192.                         "type" : "image",
  193.  
  194.                         "x" : 20,
  195.                         "y" : 34,
  196.  
  197.                         "image" : "d:/ymir work/ui/public/Parameter_Slot_02.sub",
  198.  
  199.                         "children" :
  200.                         (
  201.                             {
  202.                                 "name" : "money_value",
  203.                                 "type" : "editline",
  204.  
  205.                                 "x" : 3,
  206.                                 "y" : 2,
  207.  
  208.                                 "width" : 60,
  209.                                 "height" : 18,
  210.  
  211.                                 "input_limit" : 6,
  212.                                 "only_number" : 1,
  213.  
  214.                                 "text" : "1",
  215.                             },
  216.                             {
  217.                                 "name" : "max_value",
  218.                                 "type" : "text",
  219.  
  220.                                 "x" : 63,
  221.                                 "y" : 3,
  222.  
  223.                                 "text" : "/ 999999",
  224.                             },
  225.                         ),
  226.                     },
  227.  
  228.                     ## Button
  229.                     {
  230.                         "name" : "accept_button",
  231.                         "type" : "button",
  232.  
  233.                         "x" : 170/2 - 61 - 5,
  234.                         "y" : 58,
  235.  
  236.                         "text" : uiScriptLocale.OK,
  237.  
  238.                         "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
  239.                         "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
  240.                         "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
  241.                     },
  242.                     {
  243.                         "name" : "cancel_button",
  244.                         "type" : "button",
  245.  
  246.                         "x" : 170/2 + 5,
  247.                         "y" : 58,
  248.  
  249.                         "text" : uiScriptLocale.CANCEL,
  250.  
  251.                         "default_image" : "d:/ymir work/ui/public/middle_button_01.sub",
  252.                         "over_image" : "d:/ymir work/ui/public/middle_button_02.sub",
  253.                         "down_image" : "d:/ymir work/ui/public/middle_button_03.sub",
  254.                     },
  255.                 ),
  256.             },
  257.         ),
  258.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement