diff --git a/sqr/User/UI/Window/2_Create_Character.nut b/sqr/User/UI/Window/2_Create_Character.nut index 83f2830..b2b06cc 100644 --- a/sqr/User/UI/Window/2_Create_Character.nut +++ b/sqr/User/UI/Window/2_Create_Character.nut @@ -535,7 +535,7 @@ class _CreateCharacter_SelectBaseInfo extends Yosin_Window { Addchild(name); // 职业介绍 - jobInfo = FontAssetManager.GenerateNormal("职业介绍", false, { + jobInfo = FontAssetManager.GenerateNormal("职业介绍", true, { color = sq_RGBA(194, 160, 53, 255) }); jobInfo.SetPosition(0, 52); @@ -680,6 +680,8 @@ class HeadButton extends Yosin_CommonUi { base.constructor(X, Y, 62, 62); + // OpenDeBug(); + // 角色头像 Character = CL_SpriteObject("sprite/interface2/charactercreatever2/characterbtn.img", imageId) Character.SetPosition(0, 0); @@ -689,7 +691,7 @@ class HeadButton extends Yosin_CommonUi { jobNameText = FontAssetManager.GenerateNormal(name, true, { color = sq_RGBA(194, 160, 53, 255) }); - jobNameText.SetPosition(31 - jobNameText.GetSize().w / 2, 45); + jobNameText.SetPosition(31 - jobNameText.GetSize().w / 2 + 6 , 45); Addchild(jobNameText); CharacterCover = CL_SpriteObject("sprite/interface2/charactercreatever2/characterbtn.img", 0) diff --git a/sqr/User/UI/Window/4_PersonalInfo.nut b/sqr/User/UI/Window/4_PersonalInfo.nut index 1c43021..6895d1f 100644 --- a/sqr/User/UI/Window/4_PersonalInfo.nut +++ b/sqr/User/UI/Window/4_PersonalInfo.nut @@ -93,13 +93,38 @@ class roleInfo extends Yosin_Window { // 背景 local backGround = CL_SpriteObject("sprite/interface2/profile/profile.img", 60); Addchild(backGround); + + // 装备 + RegisterEquipment(); + // 名称 等级 其他 + RegisterNameAndOther(); + // 属性 + RegisterPropertyItems(); + // 底部四个按钮 + RegisterBottomButton(); + + + } + + // 装备 + function RegisterEquipment() { // 装备背景 local equipmentBackground = CL_SpriteObject("sprite/interface2/profile/profile.img", 14); equipmentBackground.SetPosition(7.5, 8); Addchild(equipmentBackground); + // 中间装备背景 + local centerBackground = CL_SpriteObject("sprite/interface2/profile/profile.img", 77); + centerBackground.SetPosition( 124 , 10); + Addchild(centerBackground); + } + + + + // 名称 等级 其他 + function RegisterNameAndOther() { // 冒险家名望 local adventurerFame = CL_SpriteObject("sprite/interface2/profile/profile_icon.img", 53); adventurerFame.SetPosition(70, 185); @@ -117,8 +142,11 @@ class roleInfo extends Yosin_Window { }); adventurerFameNum.SetPosition(adventurerFameText.right() + 5, adventurerFameText.Y); Addchild(adventurerFameNum); + } + + function RegisterPropertyItems() { // 属性 // 生命 @@ -175,8 +203,11 @@ class roleInfo extends Yosin_Window { // 攻击属性 local attackProperty = roleInfoPropertyItem(life.X, moveSpeed.bottom(), 16, "攻击属性", "火(0)/冰(0)/光(0)/暗(0)", true, 260); Addchild(attackProperty); + } + // 底部四个按钮 + function RegisterBottomButton() { // 副职业 local subJob = otherButton(0, 401, 62, "副职业", false); AddUIChild(subJob); @@ -201,8 +232,8 @@ class roleInfo extends Yosin_Window { separationOne.SetPosition(battleAnalysis.right(), battleAnalysis.Y + 7.5); Addchild(separationOne); - // 决斗信息 //todo 图不对 - local duelInfo = otherButton(battleAnalysis.right() + 1, battleAnalysis.Y, 66, "决斗信息"); + // 决斗信息 // 根据决斗场等级 显示 sprite/interface2/pvp02/pvprank_icon/tier_icon.img 24 + local duelInfo = otherButton(battleAnalysis.right() + 1, battleAnalysis.Y, 18, "决斗信息", true); AddUIChild(duelInfo); duelInfo.OnClick = function (btn) { //todo 打开面板 @@ -220,13 +251,6 @@ class roleInfo extends Yosin_Window { //todo 打开面板 print(11111); }.bindenv(this); - - - - } - - function RegisterDraw() { - } //逻辑入口 @@ -359,25 +383,33 @@ class roleInfoPropertyItem extends Yosin_CommonUi { // 其他面板按钮 class otherButton extends Yosin_CommonUi { + // 是否启用按钮 enabled = true; - - constructor(gX, gY, idx, title, enabled = true, ) { + // pvp 是否是pvp 按钮 + constructor(gX, gY, idx, title, pvp = false, enabled = true, ) { base.constructor(gX, gY, 65, 65); this.enabled = enabled; - local icon = CL_SpriteObject("sprite/interface2/profile/profile.img", enabled ? idx : idx +1 ); - icon.SetPosition( 0, 4); - Addchild(icon); - local titlecolor = enabled? sq_RGBA(160, 132, 75, 255) : sq_RGBA(79, 79, 79, 255); // 属性名称 local property = FontAssetManager.GenerateNormal(title, true, { color = titlecolor }); - property.SetPosition( 65/ 2 - property.GetSize().w / 2 , icon.bottom() + 5); + property.SetPosition( 32 - property.GetSize().w / 2 , 45 ); Addchild(property); + + local path = pvp? "sprite/oldimageforreplay/interface2/pvp02/pvprank_icon/tier_icon.img" : "sprite/interface2/profile/profile.img"; + local icon = CL_SpriteObject(path, enabled ? idx : idx +1 ); + if (pvp){ + icon.SetScale(0.7, 0.7); + } + icon.SetPosition(32 - icon.GetSize().w / 2, property.Y - icon.GetSize().h - 5); + Addchild(icon); + + + } }