Advertisement
Guest User

Untitled

a guest
Apr 21st, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 11.12 KB | None | 0 0
  1. import uiScriptLocale
  2.  
  3. ROOT_PATH = "d:/ymir work/ui/public/"
  4. LOCALE_PATH = "locale/gr/ui/select/"
  5. BOARD_X = SCREEN_WIDTH * (65) / 800
  6. BOARD_Y = SCREEN_HEIGHT * (215) / 600
  7.  
  8. PLUS_BUTTON_WIDTH = 20
  9. TEMPORARY_HEIGHT = 24 + 5
  10.  
  11. window = {
  12.     "name" : "CreateCharacterWindow",
  13.  
  14.     "x" : 0,
  15.     "y" : 0,
  16.  
  17.     "width" : SCREEN_WIDTH,
  18.     "height" : SCREEN_HEIGHT,
  19.  
  20.     "children" :
  21.     (
  22.         ## Board
  23.         {
  24.             "name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
  25.             "x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
  26.             "image" : "locale/gr/ui/select.sub",
  27.         },
  28.         ## Name
  29.         {
  30.             "name" : "name_warrior",
  31.             "type" : "image",
  32.  
  33.             "x" : BOARD_X - 27,
  34.             "y" : BOARD_Y - 174 + 25,
  35.  
  36.             "image" : LOCALE_PATH+"name_warrior.sub",
  37.         },
  38.         {
  39.             "name" : "name_assassin",
  40.             "type" : "image",
  41.  
  42.             "x" : BOARD_X - 27,
  43.             "y" : BOARD_Y - 174 + 25,
  44.  
  45.             "image" : LOCALE_PATH+"name_assassin.sub",
  46.         },
  47.         {
  48.             "name" : "name_sura",
  49.             "type" : "image",
  50.  
  51.             "x" : BOARD_X - 27,
  52.             "y" : BOARD_Y - 174 + 25,
  53.  
  54.             "image" : LOCALE_PATH+"name_sura.sub",
  55.         },
  56.         {
  57.             "name" : "name_shaman",
  58.             "type" : "image",
  59.  
  60.             "x" : BOARD_X - 27,
  61.             "y" : BOARD_Y - 174 + 25,
  62.  
  63.             "image" : LOCALE_PATH+"name_shaman.sub",
  64.         },
  65.  
  66.         ## Character Board
  67.         {
  68.             "name" : "character_board",
  69.             "type" : "thinboard",
  70.  
  71.             "x" : BOARD_X,
  72.             "y" : BOARD_Y,
  73.  
  74.             "width" : 208,
  75.             "height" : 300 + TEMPORARY_HEIGHT,
  76.  
  77.             "children" :
  78.             (
  79.                 {
  80.                     "name" : "text_board",
  81.                     "type" : "bar",
  82.  
  83.                     "x" : 8,
  84.                     "y" : 10,
  85.  
  86.                     "width" : 189,
  87.                     "height" : 122,
  88.  
  89.                     "children" :
  90.                     (
  91.                         {
  92.                             "name" : "prev_button",
  93.                             "type" : "button",
  94.  
  95.                             "x" : 95,
  96.                             "y" : 95,
  97.  
  98.                             "text" : uiScriptLocale.CREATE_PREV,
  99.  
  100.                             "default_image" : ROOT_PATH + "Small_Button_01.sub",
  101.                             "over_image" : ROOT_PATH + "Small_Button_02.sub",
  102.                             "down_image" : ROOT_PATH + "Small_Button_03.sub",
  103.                         },
  104.                         {
  105.                             "name" : "next_button",
  106.                             "type" : "button",
  107.  
  108.                             "x" : 140,
  109.                             "y" : 95,
  110.  
  111.                             "text" : uiScriptLocale.CREATE_NEXT,
  112.  
  113.                             "default_image" : ROOT_PATH + "Small_Button_01.sub",
  114.                             "over_image" : ROOT_PATH + "Small_Button_02.sub",
  115.                             "down_image" : ROOT_PATH + "Small_Button_03.sub",
  116.                         },
  117.                         {
  118.                             "name" : "right_line",
  119.                             "type" : "line",
  120.  
  121.                             "x" : 189-1,
  122.                             "y" : -1,
  123.  
  124.                             "width" : 0,
  125.                             "height" : 122,
  126.  
  127.                             "color" : 0xffAAA6A1,
  128.                         },
  129.                         {
  130.                             "name" : "bottom_line",
  131.                             "type" : "line",
  132.  
  133.                             "x" : 0,
  134.                             "y" : 122-1,
  135.  
  136.                             "width" : 189,
  137.                             "height" : 0,
  138.  
  139.                             "color" : 0xffAAA6A1,
  140.                         },
  141.                         {
  142.                             "name" : "left_line",
  143.                             "type" : "line",
  144.  
  145.                             "x" : 0,
  146.                             "y" : 0,
  147.  
  148.                             "width" : 0,
  149.                             "height" : 122-1,
  150.  
  151.                             "color" : 0xff2A2521,
  152.                         },
  153.                         {
  154.                             "name" : "top_line",
  155.                             "type" : "line",
  156.  
  157.                             "x" : 0,
  158.                             "y" : 0,
  159.  
  160.                             "width" : 189,
  161.                             "height" : 0,
  162.  
  163.                             "color" : 0xff2A2521,
  164.                         },
  165.                     ),
  166.                 },
  167.                 {
  168.                     "name" : "hth",
  169.                     "type" : "text",
  170.  
  171.                     "x" : 15,
  172.                     "y" : 138,
  173.  
  174.                     "text" : uiScriptLocale.CREATE_HP,
  175.  
  176.                     "children" :
  177.                     (
  178.                         {
  179.                             "name" : "hth_gauge",
  180.                             "type" : "gauge",
  181.  
  182.                             "x" : 30,
  183.                             "y" : 4,
  184.  
  185.                             "width" : 100 + PLUS_BUTTON_WIDTH,
  186.                             "color" : "red",
  187.                         },
  188.                         {
  189.                             "name" : "hth_slot",
  190.                             "type" : "slotbar",
  191.  
  192.                             "x" : 137 + PLUS_BUTTON_WIDTH,
  193.                             "y" : -1,
  194.                             "width" : 24,
  195.                             "height" : 16,
  196.  
  197.                             "children" :
  198.                             (
  199.                                 {
  200.                                     "name" : "hth_value",
  201.                                     "type" : "text",
  202.  
  203.                                     "x" : 0,
  204.                                     "y" : 1,
  205.                                     "all_align" : "center",
  206.  
  207.                                     "text" : "99",
  208.                                 },
  209.                             ),
  210.                         },
  211.                     ),
  212.                 },
  213.                 {
  214.                     "name" : "int",
  215.                     "type" : "text",
  216.  
  217.                     "x" : 15,
  218.                     "y" : 157,
  219.  
  220.                     "text" : uiScriptLocale.CREATE_SP,
  221.  
  222.                     "children" :
  223.                     (
  224.                         {
  225.                             "name" : "int_gauge",
  226.                             "type" : "gauge",
  227.  
  228.                             "x" : 30,
  229.                             "y" : 4,
  230.  
  231.                             "width" : 100 + PLUS_BUTTON_WIDTH,
  232.                             "color" : "pink",
  233.                         },
  234.                         {
  235.                             "name" : "int_slot",
  236.                             "type" : "slotbar",
  237.  
  238.                             "x" : 137 + PLUS_BUTTON_WIDTH,
  239.                             "y" : -1,
  240.                             "width" : 24,
  241.                             "height" : 16,
  242.  
  243.                             "children" :
  244.                             (
  245.                                 {
  246.                                     "name" : "int_value",
  247.                                     "type" : "text",
  248.  
  249.                                     "x" : 0,
  250.                                     "y" : 1,
  251.                                     "all_align" : "center",
  252.  
  253.                                     "text" : "99",
  254.                                 },
  255.                             ),
  256.                         },
  257.                     ),
  258.                 },
  259.                 {
  260.                     "name" : "str",
  261.                     "type" : "text",
  262.  
  263.                     "x" : 15,
  264.                     "y" : 176,
  265.  
  266.                     "text" : uiScriptLocale.CREATE_ATT_GRADE,
  267.  
  268.                     "children" :
  269.                     (
  270.                         {
  271.                             "name" : "str_gauge",
  272.                             "type" : "gauge",
  273.  
  274.                             "x" : 30,
  275.                             "y" : 4,
  276.  
  277.                             "width" : 100 + PLUS_BUTTON_WIDTH,
  278.                             "color" : "purple",
  279.                         },
  280.                         {
  281.                             "name" : "str_slot",
  282.                             "type" : "slotbar",
  283.  
  284.                             "x" : 137 + PLUS_BUTTON_WIDTH,
  285.                             "y" : -1,
  286.                             "width" : 24,
  287.                             "height" : 16,
  288.  
  289.                             "children" :
  290.                             (
  291.                                 {
  292.                                     "name" : "str_value",
  293.                                     "type" : "text",
  294.  
  295.                                     "x" : 0,
  296.                                     "y" : 1,
  297.                                     "all_align" : "center",
  298.  
  299.                                     "text" : "99",
  300.                                 },
  301.                             ),
  302.                         },
  303.                     ),
  304.                 },
  305.                 {
  306.                     "name" : "dex",
  307.                     "type" : "text",
  308.  
  309.                     "x" : 15,
  310.                     "y" : 195,
  311.  
  312.                     "text" : uiScriptLocale.CREATE_DEX_GRADE,
  313.  
  314.                     "children" :
  315.                     (
  316.                         {
  317.                             "name" : "dex_gauge",
  318.                             "type" : "gauge",
  319.  
  320.                             "x" : 30,
  321.                             "y" : 4,
  322.  
  323.                             "width" : 100 + PLUS_BUTTON_WIDTH,
  324.                             "color" : "blue",
  325.                         },
  326.                         {
  327.                             "name" : "dex_slot",
  328.                             "type" : "slotbar",
  329.  
  330.                             "x" : 137 + PLUS_BUTTON_WIDTH,
  331.                             "y" : -1,
  332.                             "width" : 24,
  333.                             "height" : 16,
  334.  
  335.                             "children" :
  336.                             (
  337.                                 {
  338.                                     "name" : "dex_value",
  339.                                     "type" : "text",
  340.  
  341.                                     "x" : 0,
  342.                                     "y" : 1,
  343.                                     "all_align" : "center",
  344.  
  345.                                     "text" : "99",
  346.                                 },
  347.                             ),
  348.                         },
  349.                     ),
  350.                 },
  351.  
  352.                 {
  353.                     "name" : "hth_button",
  354.                     "type" : "button",
  355.  
  356.                     "x" : 184,
  357.                     "y" : 139,
  358.  
  359.                     "default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
  360.                     "over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
  361.                     "down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
  362.                 },
  363.                 {
  364.                     "name" : "int_button",
  365.                     "type" : "button",
  366.  
  367.                     "x" : 184,
  368.                     "y" : 158,
  369.  
  370.                     "default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
  371.                     "over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
  372.                     "down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
  373.                 },
  374.                 {
  375.                     "name" : "str_button",
  376.                     "type" : "button",
  377.  
  378.                     "x" : 184,
  379.                     "y" : 177,
  380.  
  381.                     "default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
  382.                     "over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
  383.                     "down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
  384.                 },
  385.                 {
  386.                     "name" : "dex_button",
  387.                     "type" : "button",
  388.  
  389.                     "x" : 184,
  390.                     "y" : 196,
  391.  
  392.                     "default_image" : "d:/ymir work/ui/game/windows/btn_plus_up.sub",
  393.                     "over_image" : "d:/ymir work/ui/game/windows/btn_plus_over.sub",
  394.                     "down_image" : "d:/ymir work/ui/game/windows/btn_plus_down.sub",
  395.                 },
  396.  
  397.                 {
  398.                     "name" : "character_name",
  399.                     "type" : "text",
  400.  
  401.                     "x" : 43,
  402.                     "y" : 218,
  403.  
  404.                     "text" : uiScriptLocale.CREATE_NAME,
  405.  
  406.                     "text_horizontal_align" : "center",
  407.  
  408.                     "children" :
  409.                     (
  410.                         {
  411.                             "name" : "character_name_slot",
  412.                             "type" : "image",
  413.  
  414.                             "x" : 40 - 1,
  415.                             "y" : -2,
  416.  
  417.                             "image" : "d:/ymir work/ui/public/parameter_slot_04.sub",
  418.                         },
  419.                         {
  420.                             "name" : "character_name_value",
  421.                             "type" : "editline",
  422.  
  423.                             "x" : 40 - 1 + 3,
  424.                             "y" : 0,
  425.  
  426.                             "input_limit" : 12,
  427.                             "text" : "",
  428.                             "width" : 90,
  429.                             "height" : 20,
  430.                         },
  431.                     ),
  432.                 },
  433.  
  434.                 {
  435.                     "name" : "character_gender",
  436.                     "type" : "text",
  437.  
  438.                     "x" : 43,
  439.                     "y" : 247,
  440.  
  441.                     "text" : uiScriptLocale.CREATE_SEX,
  442.  
  443.                     "text_horizontal_align" : "center",
  444.                 },
  445.                 {
  446.                     "name" : "gender_button_01",
  447.                     "type" : "radio_button",
  448.  
  449.                     "x" : 79,
  450.                     "y" : 247,
  451.  
  452.                     "text" : uiScriptLocale.CREATE_MAN,
  453.  
  454.                     "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  455.                     "over_image"    : ROOT_PATH + "Middle_Button_02.sub",
  456.                     "down_image"    : ROOT_PATH + "Middle_Button_03.sub",
  457.                 },
  458.                 {
  459.                     "name" : "gender_button_02",
  460.                     "type" : "radio_button",
  461.  
  462.                     "x" : 139,
  463.                     "y" : 247,
  464.  
  465.                     "text" : uiScriptLocale.CREATE_WOMAN,
  466.  
  467.                     "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  468.                     "over_image"    : ROOT_PATH + "Middle_Button_02.sub",
  469.                     "down_image"    : ROOT_PATH + "Middle_Button_03.sub",
  470.                 },
  471.  
  472.                 {
  473.                     "name" : "character_shape",
  474.                     "type" : "text",
  475.  
  476.                     "x" : 43,
  477.                     "y" : 270,
  478.  
  479.                     "text" : uiScriptLocale.CREATE_SHAPE,
  480.  
  481.                     "text_horizontal_align" : "center",
  482.                 },
  483.                 {
  484.                     "name" : "shape_button_01",
  485.                     "type" : "radio_button",
  486.  
  487.                     "x" : 79,
  488.                     "y" : 239 + TEMPORARY_HEIGHT,
  489.  
  490.                     "text" : "1",
  491.  
  492.                     "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  493.                     "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  494.                     "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  495.                 },
  496.                 {
  497.                     "name" : "shape_button_02",
  498.                     "type" : "radio_button",
  499.  
  500.                     "x" : 139,
  501.                     "y" : 239 + TEMPORARY_HEIGHT,
  502.  
  503.                     "text" : "2",
  504.  
  505.                     "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  506.                     "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  507.                     "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  508.                 },
  509.  
  510.                 {
  511.                     "name" : "create_button",
  512.                     "type" : "button",
  513.  
  514.                     "x" : 11,
  515.                     "y" : 265 + TEMPORARY_HEIGHT,
  516.  
  517.                     "text" : uiScriptLocale.CREATE_CREATE,
  518.  
  519.                     "default_image" : ROOT_PATH + "Large_Button_01.sub",
  520.                     "over_image" : ROOT_PATH + "Large_Button_02.sub",
  521.                     "down_image" : ROOT_PATH + "Large_Button_03.sub",
  522.                 },
  523.                 {
  524.                     "name" : "cancel_button",
  525.                     "type" : "button",
  526.  
  527.                     "x" : 109,
  528.                     "y" : 265 + TEMPORARY_HEIGHT,
  529.  
  530.                     "text" : uiScriptLocale.CANCEL,
  531.  
  532.                     "default_image" : ROOT_PATH + "Large_Button_01.sub",
  533.                     "over_image" : ROOT_PATH + "Large_Button_02.sub",
  534.                     "down_image" : ROOT_PATH + "Large_Button_03.sub",
  535.                 },
  536.             ),
  537.         },
  538.  
  539.         ## Buttons
  540.         {
  541.             "name" : "left_button",
  542.             "type" : "button",
  543.  
  544.             "x" : SCREEN_WIDTH * (450 - 22*3) / 800,
  545.             "y" : SCREEN_HEIGHT * (505) / 600,
  546.  
  547.             "default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
  548.             "over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
  549.             "down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
  550.         },
  551.         {
  552.             "name" : "right_button",
  553.             "type" : "button",
  554.  
  555.             "x" : SCREEN_WIDTH * (580 - 22) / 800,
  556.             "y" : SCREEN_HEIGHT * (505) / 600,
  557.  
  558.             "default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
  559.             "over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
  560.             "down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
  561.         },
  562.  
  563.  
  564.     ),
  565. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement