Advertisement
meleys

Untitled

Jul 3rd, 2019
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 10.36 KB | None | 0 0
  1. import uiScriptLocale
  2. import app
  3.  
  4. ROOT_PATH = "d:/ymir work/ui/public/"
  5.  
  6. TEMPORARY_X = +13
  7. TEXT_TEMPORARY_X = -10
  8. BUTTON_TEMPORARY_X = 5
  9. PVP_X = -10
  10.  
  11. if app.ENABLE_FOG_FIX:
  12.     window = {
  13.         "name" : "SystemOptionDialog",
  14.         "style" : ("movable", "float",),
  15.  
  16.         "x" : 0,
  17.         "y" : 0,
  18.  
  19.         "width" : 305,
  20.         "height" : 255,
  21.  
  22.         "children" :
  23.         (
  24.             {
  25.                 "name" : "board",
  26.                 "type" : "board",
  27.  
  28.                 "x" : 0,
  29.                 "y" : 0,
  30.  
  31.                 "width" : 305,
  32.                 "height" : 255,
  33.  
  34.                 "children" :
  35.                 (
  36.                     ## Title
  37.                     {
  38.                         "name" : "titlebar",
  39.                         "type" : "titlebar",
  40.                         "style" : ("attach",),
  41.  
  42.                         "x" : 8,
  43.                         "y" : 8,
  44.  
  45.                         "width" : 290,
  46.                         "color" : "gray",
  47.  
  48.                         "children" :
  49.                         (
  50.                             {
  51.                             "name":"titlename", "type":"text", "x":0, "y":3,
  52.                             "horizontal_align":"center", "text_horizontal_align":"center",
  53.                             "text": uiScriptLocale.SYSTEMOPTION_TITLE,
  54.                              },
  55.                         ),
  56.                     },
  57.  
  58.                    
  59.                     ## Music
  60.                     {
  61.                         "name" : "music_name",
  62.                         "type" : "text",
  63.  
  64.                         "x" : 30,
  65.                         "y" : 75,
  66.  
  67.                         "text" : uiScriptLocale.OPTION_MUSIC,
  68.                     },
  69.                    
  70.                     {
  71.                         "name" : "music_volume_controller",
  72.                         "type" : "sliderbar",
  73.  
  74.                         "x" : 110,
  75.                         "y" : 75,
  76.                     },
  77.                    
  78.                     {
  79.                         "name" : "bgm_button",
  80.                         "type" : "button",
  81.  
  82.                         "x" : 20,
  83.                         "y" : 100,
  84.  
  85.                         "text" : uiScriptLocale.OPTION_MUSIC_CHANGE,
  86.  
  87.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  88.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  89.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  90.                     },
  91.                    
  92.                     {
  93.                         "name" : "bgm_file",
  94.                         "type" : "text",
  95.  
  96.                         "x" : 100,
  97.                         "y" : 102,
  98.  
  99.                         "text" : uiScriptLocale.OPTION_MUSIC_DEFAULT_THEMA,
  100.                     },
  101.                    
  102.                     ## Sound
  103.                     {
  104.                         "name" : "sound_name",
  105.                         "type" : "text",
  106.  
  107.                         "x" : 30,
  108.                         "y" : 50,
  109.  
  110.                         "text" : uiScriptLocale.OPTION_SOUND,
  111.                     },
  112.                    
  113.                     {
  114.                         "name" : "sound_volume_controller",
  115.                         "type" : "sliderbar",
  116.  
  117.                         "x" : 110,
  118.                         "y" : 50,
  119.                     }, 
  120.  
  121.                     ## 카메라
  122.                     {
  123.                         "name" : "camera_mode",
  124.                         "type" : "text",
  125.  
  126.                         "x" : 40 + TEXT_TEMPORARY_X,
  127.                         "y" : 135+2,
  128.  
  129.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE,
  130.                     },
  131.                    
  132.                     {
  133.                         "name" : "camera_short",
  134.                         "type" : "radio_button",
  135.  
  136.                         "x" : 110,
  137.                         "y" : 135,
  138.  
  139.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE_SHORT,
  140.  
  141.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  142.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  143.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  144.                     },
  145.                    
  146.                     {
  147.                         "name" : "camera_long",
  148.                         "type" : "radio_button",
  149.  
  150.                         "x" : 110+70,
  151.                         "y" : 135,
  152.  
  153.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE_LONG,
  154.  
  155.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  156.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  157.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  158.                     },
  159.  
  160.                     ## 안개
  161.                     {
  162.                         "name" : "fog_mode",
  163.                         "type" : "text",
  164.  
  165.                         "x" : 30,
  166.                         "y" : 160+2,
  167.  
  168.                         "text" : uiScriptLocale.OPTION_FOG,
  169.                     },
  170.                    
  171.                     {
  172.                         "name" : "fog_on",
  173.                         "type" : "radio_button",
  174.  
  175.                         "x" : 110,
  176.                         "y" : 160,
  177.  
  178.                         "text" : uiScriptLocale.OPTION_FOG_ON,
  179.  
  180.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  181.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  182.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  183.                     },
  184.                    
  185.                     {
  186.                         "name" : "fog_off",
  187.                         "type" : "radio_button",
  188.  
  189.                         "x" : 110+50,
  190.                         "y" : 160,
  191.  
  192.                         "text" : uiScriptLocale.OPTION_FOG_OFF,
  193.                        
  194.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  195.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  196.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  197.                     },
  198.  
  199.                     ## 타일 가속
  200.                     {
  201.                         "name" : "tiling_mode",
  202.                         "type" : "text",
  203.  
  204.                         "x" : 40 + TEXT_TEMPORARY_X,
  205.                         "y" : 185+2,
  206.  
  207.                         "text" : uiScriptLocale.OPTION_TILING,
  208.                     },
  209.                    
  210.                     {
  211.                         "name" : "tiling_cpu",
  212.                         "type" : "radio_button",
  213.  
  214.                         "x" : 110,
  215.                         "y" : 185,
  216.  
  217.                         "text" : uiScriptLocale.OPTION_TILING_CPU,
  218.  
  219.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  220.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  221.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  222.                     },
  223.                    
  224.                     {
  225.                         "name" : "tiling_gpu",
  226.                         "type" : "radio_button",
  227.  
  228.                         "x" : 110+50,
  229.                         "y" : 185,
  230.  
  231.                         "text" : uiScriptLocale.OPTION_TILING_GPU,
  232.  
  233.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  234.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  235.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  236.                     },
  237.                    
  238.                     {
  239.                         "name" : "tiling_apply",
  240.                         "type" : "button",
  241.  
  242.                         "x" : 110+100,
  243.                         "y" : 185,
  244.  
  245.                         "text" : uiScriptLocale.OPTION_TILING_APPLY,
  246.  
  247.                         "default_image" : ROOT_PATH + "middle_Button_01.sub",
  248.                         "over_image" : ROOT_PATH + "middle_Button_02.sub",
  249.                         "down_image" : ROOT_PATH + "middle_Button_03.sub",
  250.                     },
  251.                 ),
  252.             },
  253.         ),
  254.     }
  255. else:
  256.     window = {
  257.         "name" : "SystemOptionDialog",
  258.         "style" : ("movable", "float",),
  259.  
  260.         "x" : 0,
  261.         "y" : 0,
  262.  
  263.         "width" : 305,
  264.         "height" : 255,
  265.  
  266.         "children" :
  267.         (
  268.             {
  269.                 "name" : "board",
  270.                 "type" : "board",
  271.  
  272.                 "x" : 0,
  273.                 "y" : 0,
  274.  
  275.                 "width" : 305,
  276.                 "height" : 255,
  277.  
  278.                 "children" :
  279.                 (
  280.                     ## Title
  281.                     {
  282.                         "name" : "titlebar",
  283.                         "type" : "titlebar",
  284.                         "style" : ("attach",),
  285.  
  286.                         "x" : 8,
  287.                         "y" : 8,
  288.  
  289.                         "width" : 290,
  290.                         "color" : "gray",
  291.  
  292.                         "children" :
  293.                         (
  294.                             {
  295.                             "name":"titlename", "type":"text", "x":0, "y":3,
  296.                             "horizontal_align":"center", "text_horizontal_align":"center",
  297.                             "text": uiScriptLocale.SYSTEMOPTION_TITLE,
  298.                              },
  299.                         ),
  300.                     },
  301.  
  302.                    
  303.                     ## Music
  304.                     {
  305.                         "name" : "music_name",
  306.                         "type" : "text",
  307.  
  308.                         "x" : 30,
  309.                         "y" : 75,
  310.  
  311.                         "text" : uiScriptLocale.OPTION_MUSIC,
  312.                     },
  313.                    
  314.                     {
  315.                         "name" : "music_volume_controller",
  316.                         "type" : "sliderbar",
  317.  
  318.                         "x" : 110,
  319.                         "y" : 75,
  320.                     },
  321.                    
  322.                     {
  323.                         "name" : "bgm_button",
  324.                         "type" : "button",
  325.  
  326.                         "x" : 20,
  327.                         "y" : 100,
  328.  
  329.                         "text" : uiScriptLocale.OPTION_MUSIC_CHANGE,
  330.  
  331.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  332.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  333.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  334.                     },
  335.                    
  336.                     {
  337.                         "name" : "bgm_file",
  338.                         "type" : "text",
  339.  
  340.                         "x" : 100,
  341.                         "y" : 102,
  342.  
  343.                         "text" : uiScriptLocale.OPTION_MUSIC_DEFAULT_THEMA,
  344.                     },
  345.                    
  346.                     ## Sound
  347.                     {
  348.                         "name" : "sound_name",
  349.                         "type" : "text",
  350.  
  351.                         "x" : 30,
  352.                         "y" : 50,
  353.  
  354.                         "text" : uiScriptLocale.OPTION_SOUND,
  355.                     },
  356.                    
  357.                     {
  358.                         "name" : "sound_volume_controller",
  359.                         "type" : "sliderbar",
  360.  
  361.                         "x" : 110,
  362.                         "y" : 50,
  363.                     }, 
  364.  
  365.                     ## 카메라
  366.                     {
  367.                         "name" : "camera_mode",
  368.                         "type" : "text",
  369.  
  370.                         "x" : 40 + TEXT_TEMPORARY_X,
  371.                         "y" : 135+2,
  372.  
  373.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE,
  374.                     },
  375.                    
  376.                     {
  377.                         "name" : "camera_short",
  378.                         "type" : "radio_button",
  379.  
  380.                         "x" : 110,
  381.                         "y" : 135,
  382.  
  383.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE_SHORT,
  384.  
  385.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  386.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  387.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  388.                     },
  389.                    
  390.                     {
  391.                         "name" : "camera_long",
  392.                         "type" : "radio_button",
  393.  
  394.                         "x" : 110+70,
  395.                         "y" : 135,
  396.  
  397.                         "text" : uiScriptLocale.OPTION_CAMERA_DISTANCE_LONG,
  398.  
  399.                         "default_image" : ROOT_PATH + "Middle_Button_01.sub",
  400.                         "over_image" : ROOT_PATH + "Middle_Button_02.sub",
  401.                         "down_image" : ROOT_PATH + "Middle_Button_03.sub",
  402.                     },
  403.  
  404.                     ## 안개
  405.                     {
  406.                         "name" : "fog_mode",
  407.                         "type" : "text",
  408.  
  409.                         "x" : 30,
  410.                         "y" : 160+2,
  411.  
  412.                         "text" : uiScriptLocale.OPTION_FOG,
  413.                     },
  414.                    
  415.                     {
  416.                         "name" : "fog_level0",
  417.                         "type" : "radio_button",
  418.  
  419.                         "x" : 110,
  420.                         "y" : 160,
  421.  
  422.                         "text" : uiScriptLocale.OPTION_FOG_DENSE,
  423.  
  424.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  425.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  426.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  427.                     },
  428.                    
  429.                     {
  430.                         "name" : "fog_level1",
  431.                         "type" : "radio_button",
  432.  
  433.                         "x" : 110+50,
  434.                         "y" : 160,
  435.  
  436.                         "text" : uiScriptLocale.OPTION_FOG_MIDDLE,
  437.                        
  438.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  439.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  440.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  441.                     },
  442.                    
  443.                     {
  444.                         "name" : "fog_level2",
  445.                         "type" : "radio_button",
  446.  
  447.                         "x" : 110 + 100,
  448.                         "y" : 160,
  449.  
  450.                         "text" : uiScriptLocale.OPTION_FOG_LIGHT,
  451.                        
  452.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  453.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  454.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  455.                     },
  456.  
  457.                     ## 타일 가속
  458.                     {
  459.                         "name" : "tiling_mode",
  460.                         "type" : "text",
  461.  
  462.                         "x" : 40 + TEXT_TEMPORARY_X,
  463.                         "y" : 185+2,
  464.  
  465.                         "text" : uiScriptLocale.OPTION_TILING,
  466.                     },
  467.                    
  468.                     {
  469.                         "name" : "tiling_cpu",
  470.                         "type" : "radio_button",
  471.  
  472.                         "x" : 110,
  473.                         "y" : 185,
  474.  
  475.                         "text" : uiScriptLocale.OPTION_TILING_CPU,
  476.  
  477.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  478.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  479.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  480.                     },
  481.                    
  482.                     {
  483.                         "name" : "tiling_gpu",
  484.                         "type" : "radio_button",
  485.  
  486.                         "x" : 110+50,
  487.                         "y" : 185,
  488.  
  489.                         "text" : uiScriptLocale.OPTION_TILING_GPU,
  490.  
  491.                         "default_image" : ROOT_PATH + "small_Button_01.sub",
  492.                         "over_image" : ROOT_PATH + "small_Button_02.sub",
  493.                         "down_image" : ROOT_PATH + "small_Button_03.sub",
  494.                     },
  495.                    
  496.                     {
  497.                         "name" : "tiling_apply",
  498.                         "type" : "button",
  499.  
  500.                         "x" : 110+100,
  501.                         "y" : 185,
  502.  
  503.                         "text" : uiScriptLocale.OPTION_TILING_APPLY,
  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.         ),
  512.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement