Commit 8bbb009e authored by hujiebin's avatar hujiebin

feat:ui 来了

parent 38042739
...@@ -69,16 +69,16 @@ var ( ...@@ -69,16 +69,16 @@ var (
CpPrivilegeActiveProfile: 270, CpPrivilegeActiveProfile: 270,
CpPrivilegeMicEffect: 271, CpPrivilegeMicEffect: 271,
} }
// cp特权icon // todo ui // cp特权icon
CpPrivilegeIcon = map[CpPrivilege]string{ CpPrivilegeIcon = map[CpPrivilege]map[CpLevel]string{
CpPrivilegeSpace: "icon_p_1.png", CpPrivilegeSpace: {CpLevel0: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png", CpLevel1: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png", CpLevel2: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png", CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_space.png"},
CpPrivilegeBanner: "icon_p_2.png", CpPrivilegeBanner: {CpLevel1: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_banner1.png", CpLevel2: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_banner2.png", CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_banner3.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_banner4.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_banner5.png"},
CpPrivilegeMedal: "icon_p_3.png", CpPrivilegeMedal: {CpLevel1: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_medal1.png", CpLevel2: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_medal2.png", CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_medal3.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_medal4.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_medal5.png"},
CpPrivilegeCert: "icon_p_4.png", CpPrivilegeCert: {CpLevel0: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert0.png", CpLevel1: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert1.png", CpLevel2: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert2.png", CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert3.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert4.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_cert5.png"},
CpPrivilegeRoomEffect: "icon_p_5.png", CpPrivilegeRoomEffect: {CpLevel2: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_enter2.png", CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_enter3.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_enter4.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_enter5.png"},
CpPrivilegeHeadwear: "icon_p_6.png", CpPrivilegeHeadwear: {CpLevel3: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_headwear.png", CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_headwear.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_headwear.png"},
CpPrivilegeActiveProfile: "icon_p_7.png", CpPrivilegeActiveProfile: {CpLevel4: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_profile.png", CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_profile.png"},
CpPrivilegeMicEffect: "icon_p_8.png", CpPrivilegeMicEffect: {CpLevel5: "https://image.whoisamy.shop/hilo/resource/cp/cp_p_mic.png"},
} }
) )
......
...@@ -72,14 +72,14 @@ var CvResLevelList = []CvResLevel{ ...@@ -72,14 +72,14 @@ var CvResLevelList = []CvResLevel{
} }
var ( var (
CvPrivilege1 = CvPrivilege{cp_e.CpPrivilegeSpace, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeSpace], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeSpace], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeSpace], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeSpace]} CvPrivilege1 = CvPrivilege{cp_e.CpPrivilegeSpace, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeSpace], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeSpace], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeSpace]}
CvPrivilege2 = CvPrivilege{cp_e.CpPrivilegeBanner, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeBanner], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeBanner], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeBanner], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeBanner]} CvPrivilege2 = CvPrivilege{cp_e.CpPrivilegeBanner, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeBanner], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeBanner], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeBanner]}
CvPrivilege3 = CvPrivilege{cp_e.CpPrivilegeMedal, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeMedal], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeMedal], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeMedal], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeMedal]} CvPrivilege3 = CvPrivilege{cp_e.CpPrivilegeMedal, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeMedal], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeMedal], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeMedal]}
CvPrivilege4 = CvPrivilege{cp_e.CpPrivilegeCert, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeCert], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeCert], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeCert], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeCert]} CvPrivilege4 = CvPrivilege{cp_e.CpPrivilegeCert, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeCert], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeCert], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeCert]}
CvPrivilege5 = CvPrivilege{cp_e.CpPrivilegeRoomEffect, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeRoomEffect], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeRoomEffect], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeRoomEffect], true, false, CpPrivilegeLevelList[cp_e.CpPrivilegeRoomEffect]} CvPrivilege5 = CvPrivilege{cp_e.CpPrivilegeRoomEffect, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeRoomEffect], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeRoomEffect], "", "", true, false, CpPrivilegeLevelList[cp_e.CpPrivilegeRoomEffect]}
CvPrivilege6 = CvPrivilege{cp_e.CpPrivilegeHeadwear, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeHeadwear], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeHeadwear], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeHeadwear], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeHeadwear]} CvPrivilege6 = CvPrivilege{cp_e.CpPrivilegeHeadwear, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeHeadwear], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeHeadwear], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeHeadwear]}
CvPrivilege7 = CvPrivilege{cp_e.CpPrivilegeActiveProfile, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeActiveProfile], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeActiveProfile], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeActiveProfile], true, false, CpPrivilegeLevelList[cp_e.CpPrivilegeActiveProfile]} CvPrivilege7 = CvPrivilege{cp_e.CpPrivilegeActiveProfile, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeActiveProfile], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeActiveProfile], "", "", true, false, CpPrivilegeLevelList[cp_e.CpPrivilegeActiveProfile]}
CvPrivilege8 = CvPrivilege{cp_e.CpPrivilegeMicEffect, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeMicEffect], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeMicEffect], "", cp_e.CpPrivilegeIcon[cp_e.CpPrivilegeMicEffect], false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeMicEffect]} CvPrivilege8 = CvPrivilege{cp_e.CpPrivilegeMicEffect, cp_e.CpPrivilegeNameMsgId[cp_e.CpPrivilegeMicEffect], "", cp_e.CpPrivilegeDescMsgId[cp_e.CpPrivilegeMicEffect], "", "", false, false, CpPrivilegeLevelList[cp_e.CpPrivilegeMicEffect]}
) )
var CpLevelPrivilegeList = map[cp_e.CpLevel][]CvPrivilege{ var CpLevelPrivilegeList = map[cp_e.CpLevel][]CvPrivilege{
...@@ -108,6 +108,7 @@ func CopyCpLevelPrivilegeList(Level cp_e.CpLevel, lang string) []CvPrivilege { ...@@ -108,6 +108,7 @@ func CopyCpLevelPrivilegeList(Level cp_e.CpLevel, lang string) []CvPrivilege {
for i, v := range privileges { for i, v := range privileges {
privileges[i].Name = GetTranslate(v.NameMsgId, lang) privileges[i].Name = GetTranslate(v.NameMsgId, lang)
privileges[i].Desc = GetTranslate(v.DescMsgId, lang) privileges[i].Desc = GetTranslate(v.DescMsgId, lang)
privileges[i].Icon = cp_e.CpPrivilegeIcon[v.Type][Level]
} }
return privileges return privileges
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment