Code:
import uiScriptLocale
ROOT_PATH = "d:/ymir work/ui/public/"
LOCALE_PATH = uiScriptLocale.SELECT_PATH
BOARD_X = SCREEN_WIDTH * (65) / 800
BOARD_Y = SCREEN_HEIGHT * (220) / 600
BOARD_ITEM_ADD_POSITION = -40
window = {
"name" : "SelectCharacterWindow",
"x" : 0,
"y" : 0,
"width" : SCREEN_WIDTH,
"height" : SCREEN_HEIGHT,
"children" :
(
## Board
{
"name" : "BackGround", "type" : "expanded_image", "x" : 0, "y" : 0,
"x_scale" : float(SCREEN_WIDTH) / 1024.0, "y_scale" : float(SCREEN_HEIGHT) / 768.0,
"image" : "locale/de/ui/select.sub",
},
## Name
{
"name" : "name_warrior",
"type" : "image",
"x" : BOARD_X - 20,
"y" : BOARD_Y - 110 + 25,
"image" : LOCALE_PATH+"name_warrior.sub",
},
{
"name" : "name_assassin",
"type" : "image",
"x" : BOARD_X - 20,
"y" : BOARD_Y - 110 + 25,
"image" : LOCALE_PATH+"name_assassin.sub",
},
{
"name" : "name_sura",
"type" : "image",
"x" : BOARD_X - 20,
"y" : BOARD_Y - 110 + 25,
"image" : LOCALE_PATH+"name_sura.sub",
},
{
"name" : "name_shaman",
"type" : "image",
"x" : BOARD_X - 20,
"y" : BOARD_Y - 110 + 25,
"image" : LOCALE_PATH+"name_shaman.sub",
},
## Character Board by .Temperies and Troll
{
"name" : "character_board",
"type" : "image",
"x" : SCREEN_WIDTH * (55) / 1900,
"y" : SCREEN_HEIGHT * (220) / 280,
"width" : 500,
"height" : 100 + BOARD_ITEM_ADD_POSITION,
"image" : "troll/trolljob2.sub",
"children" :
(
## Empire Flag
{
"name" : "EmpireFlag_A",
"type" : "expanded_image",
"x" : 193,
"y" : 5,
"image" : "troll/trollempire2.sub"
},
{
"name" : "EmpireFlag_B",
"type" : "expanded_image",
"x" : 193,
"y" : 5,
"image" : "troll/trollempire1.sub"
},
{
"name" : "EmpireFlag_C",
"type" : "expanded_image",
"x" : 193,
"y" : 5,
"image" : "troll/trollempire3.sub"
},
{
"name" : "EmpireNameSlot",
"type" : "image",
"x" : 220,
"y" : 58,
"image" : "",
"children" :
(
{
"name" : "EmpireName",
"type" : "text",
"x" : 0,
"y" : 0,
"color" : 0xff99FF00,
"text" : uiScriptLocale.SELECT_EMPIRE_NAME,
"all_align" : "center",
},
),
},
{
"name" : "GuildNameSlot",
"type" : "image",
"x" : 438,
"y" : 58,
"image" : "",
"children" :
(
{
"name" : "GuildName",
"type" : "text",
"x" : 0,
"y" : 0,
"color" : 0xff99FF00,
"text" : uiScriptLocale.SELECT_NO_GUILD,
"all_align" : "center",
},
{
"name" : "Gremio",
"type" : "text",
"x" : - 60,
"y" : 0,
"color" : 0xffFFFFFF,
"text" : "Gilde:",
"all_align" : "center",
},
),
},
{
"name" : "character_name",
"type" : "text",
"x" : 125,
"y" : 75,
"text" : uiScriptLocale.SELECT_NAME + ":",
"children" :
(
{
"name" : "character_name_slot",
"type" : "image",
"x" : 150,
"y" : 75,
"image" : "",
},
{
"name" : "character_name_value",
"type" : "text",
"x" : 10 + 130/2,
"y" : 0,
"color" : 0xffFFCA00,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_name_slot",
"type" : "image",
"x" : 43,
"y" : -2,
"image" : "",
},
{
"name" : "character_name_slot",
"type" : "text",
"x" : 550,
"y" : 54,
"text" : "Charakterauswahl",
"text_horizontal_align" : "center",
},
{
"name" : "character_level",
"type" : "text",
"x" : 125,
"y" : 85,
"text" : uiScriptLocale.SELECT_LEVEL + ":",
"children" :
(
{
"name" : "character_level_slot",
"type" : "image",
"x" : 43,
"y" : -2,
"image" : "",
},
{
"name" : "character_level_value",
"type" : "text",
"x" : 10 + 130/2,
"y" : 0,
"color" : 0xff99FF00,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_play_time",
"type" : "text",
"x" : 125,
"y" : 95,
"text" : uiScriptLocale.SELECT_PLAYTIME + ":",
"children" :
(
{
"name" : "character_play_time_slot",
"type" : "image",
"x" : 0,
"y" : 0,
"image" : "",
},
{
"name" : "character_play_time_value",
"type" : "text",
"x" : 95,
"y" : 0,
"color" : 0xffD2F700,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_hth",
"type" : "text",
"x" : 245,
"y" : 74,
"text" : uiScriptLocale.SELECT_HP,
"children" :
(
{
"name" : "gauge_hth",
"type" : "gauge",
"x" : 20,
"y" : 4,
"width" : 100,
"color" : "red",
},
{
"name" : "character_hth_slot",
"type" : "image",
"x" : 134,
"y" : -2,
"color" : 0xffFF0000,
"image" : "",
},
{
"name" : "character_hth_value",
"type" : "text",
"x" : 131,
"y" : 0,
"color" : 0xffFF0000,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_int",
"type" : "text",
"x" : 245,
"y" : 84,
"text" : uiScriptLocale.SELECT_SP,
"children" :
(
{
"name" : "gauge_int",
"type" : "gauge",
"x" : 20,
"y" : 4,
"width" : 100,
"color" : "pink",
},
{
"name" : "character_int_slot",
"type" : "image",
"x" : 95,
"y" : 0,
"image" : "",
},
{
"name" : "character_int_value",
"type" : "text",
"x" : 132,
"y" : 0,
"color" : 0xffE366B4,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_str",
"type" : "text",
"x" : 245,
"y" : 94,
"text" : uiScriptLocale.SELECT_ATT_GRADE,
"children" :
(
{
"name" : "gauge_str",
"type" : "gauge",
"x" : 20,
"y" : 4,
"width" : 100,
"color" : "purple",
},
{
"name" : "character_str_slot",
"type" : "image",
"x" : 15,
"y" : 0,
"image" : "",
},
{
"name" : "character_str_value",
"type" : "text",
"x" : 132,
"y" : 0,
"color" : 0xffCD35D2,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
{
"name" : "character_dex",
"type" : "text",
"x" : 245,
"y" : 104,
"text" : uiScriptLocale.SELECT_DEX_GRADE,
"children" :
(
{
"name" : "gauge_dex",
"type" : "gauge",
"x" : 20,
"y" : 4,
"width" : 100,
"color" : "blue",
},
{
"name" : "character_dex_slot",
"type" : "image",
"x" : 15,
"y" : 0,
"image" : "",
},
{
"name" : "character_dex_value",
"type" : "text",
"x" : 132,
"y" : 0,
"color" : 0xff0A67A3,
"text" : "",
"text_horizontal_align" : "center",
},
),
},
## Buttons
{
"name" : "start_button",
"type" : "button",
"x" : 495,
"y" : 75,
"text" : uiScriptLocale.SELECT_SELECT,
"text_height" : 6,
"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
},
{
"name" : "create_button",
"type" : "button",
"x" : 450,
"y" : 75,
"text" : uiScriptLocale.SELECT_CREATE,
"text_height" : 6,
"default_image" : ROOT_PATH + "XLarge_Button_01.sub",
"over_image" : ROOT_PATH + "XLarge_Button_02.sub",
"down_image" : ROOT_PATH + "XLarge_Button_03.sub",
},
{
"name" : "exit_button",
"type" : "button",
"x" : 495,
"y" : 99,
"text" : uiScriptLocale.SELECT_EXIT,
"default_image" : ROOT_PATH + "Large_Button_01.sub",
"over_image" : ROOT_PATH + "Large_Button_02.sub",
"down_image" : ROOT_PATH + "Large_Button_03.sub",
},
{
"name" : "delete_button",
"type" : "button",
"x" : 587,
"y" : 99,
"text" : uiScriptLocale.SELECT_DELETE,
"default_image" : ROOT_PATH + "Large_Button_01.sub",
"over_image" : ROOT_PATH + "Large_Button_02.sub",
"down_image" : ROOT_PATH + "Large_Button_03.sub",
},
),
},
## Buttons
{
"name" : "left_button",
"type" : "button",
"x" : SCREEN_WIDTH * (300 - 22*3) / 800,
"y" : SCREEN_HEIGHT * (3505) / 7900,
"default_image" : "d:/ymir work/ui/intro/select/dragon_left_button_01.sub",
"over_image" : "d:/ymir work/ui/intro/select/dragon_left_button_02.sub",
"down_image" : "d:/ymir work/ui/intro/select/dragon_left_button_03.sub",
},
{
"name" : "right_button",
"type" : "button",
"x" : SCREEN_WIDTH * (680 - 22) / 800,
"y" : SCREEN_HEIGHT * (3505) / 7800,
"default_image" : "d:/ymir work/ui/intro/select/dragon_right_button_01.sub",
"over_image" : "d:/ymir work/ui/intro/select/dragon_right_button_02.sub",
"down_image" : "d:/ymir work/ui/intro/select/dragon_right_button_03.sub",
},
),
}