更改聊天窗口类目与文件名
This commit is contained in:
parent
d456913985
commit
d256e8b7d5
|
|
@ -1,17 +1,17 @@
|
|||
/*
|
||||
文件名:6_Message.nut
|
||||
路径:User/UI/Window/6_Message.nut
|
||||
创建日期:2025-01-17 19:41
|
||||
文件用途: 消息窗口
|
||||
文件名:6_PlayerChat.nut
|
||||
路径:User/UI/Window/6_PlayerChat.nut
|
||||
创建日期:2025-01-20 18:03
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
//主类
|
||||
class _Message extends Yosin_Window {
|
||||
class _PlayerChat extends Yosin_Window {
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
local background = Message_Backgournd();
|
||||
local background = PlayerChat_Backgournd();
|
||||
Addchild(background);
|
||||
|
||||
RegisterWidget();
|
||||
|
|
@ -20,43 +20,43 @@ class _Message extends Yosin_Window {
|
|||
function RegisterWidget() {
|
||||
|
||||
// 普通
|
||||
local ordinary = Message_SplicingButton(6, 206, 53, 20, 8, "普通", sq_RGBA(255, 255, 255, 255));
|
||||
local ordinary = PlayerChat_SplicingButton(6, 206, 53, 20, 8, "普通", sq_RGBA(255, 255, 255, 255));
|
||||
AddUIChild(ordinary);
|
||||
ordinary.LBDownOnClick = function(btn) {
|
||||
print(111);
|
||||
}
|
||||
ordinary.OnTriangleClick = function(btn) {
|
||||
print(222);
|
||||
print(222);
|
||||
}
|
||||
|
||||
// 公会
|
||||
local notice = Message_SplicingButton(60, 206, 53, 20, 47, "公会", sq_RGBA(254, 77, 245, 255));
|
||||
local notice = PlayerChat_SplicingButton(60, 206, 53, 20, 47, "公会", sq_RGBA(254, 77, 245, 255));
|
||||
AddUIChild(notice);
|
||||
notice.LBDownOnClick = function(btn) {
|
||||
print(111);
|
||||
}
|
||||
notice.OnTriangleClick = function(btn) {
|
||||
print(222);
|
||||
print(222);
|
||||
}
|
||||
|
||||
// 频道
|
||||
local channel = Message_SplicingButton(114, 206, 53, 20, 48, "频道", sq_RGBA(221, 153, 197, 255));
|
||||
local channel = PlayerChat_SplicingButton(114, 206, 53, 20, 48, "频道", sq_RGBA(221, 153, 197, 255));
|
||||
AddUIChild(channel);
|
||||
channel.LBDownOnClick = function(btn) {
|
||||
print(111);
|
||||
}
|
||||
channel.OnTriangleClick = function(btn) {
|
||||
print(222);
|
||||
print(222);
|
||||
}
|
||||
|
||||
// 募集
|
||||
local raise = Message_SplicingButton(168, 206, 53, 20, 49, "募集", sq_RGBA(105, 212, 238, 255));
|
||||
local raise = PlayerChat_SplicingButton(168, 206, 53, 20, 49, "募集", sq_RGBA(105, 212, 238, 255));
|
||||
AddUIChild(raise);
|
||||
raise.LBDownOnClick = function(btn) {
|
||||
print(111);
|
||||
}
|
||||
raise.OnTriangleClick = function(btn) {
|
||||
print(222);
|
||||
print(222);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ class _Message extends Yosin_Window {
|
|||
|
||||
|
||||
// 背景
|
||||
class Message_Backgournd extends CL_CanvasObject {
|
||||
class PlayerChat_Backgournd extends CL_CanvasObject {
|
||||
|
||||
constructor() {
|
||||
base.constructor();
|
||||
|
|
@ -121,11 +121,11 @@ class Message_Backgournd extends CL_CanvasObject {
|
|||
local systemText = FontAssetManager.GenerateNormal("系统", true, {
|
||||
color = sq_RGBA(200, 173, 134, 255)
|
||||
});
|
||||
DrawActor(systemText, 18 , 18);
|
||||
DrawActor(systemText, 18, 18);
|
||||
|
||||
// 系统
|
||||
local SystemBround = Yosin_NineBoxStretch( 321, 72, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||
DrawSprite(SystemBround, 6, 35);
|
||||
local SystemBround = Yosin_NineBoxStretch(321, 72, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||
DrawSprite(SystemBround, 6, 35);
|
||||
|
||||
// 喇叭按钮
|
||||
local megaphoneBtnBackground = Yosin_EmeStretch(53, 21, "sprite/interface/lenheartwindowcommon.img", 166);
|
||||
|
|
@ -135,15 +135,15 @@ class Message_Backgournd extends CL_CanvasObject {
|
|||
local megaphoneext = FontAssetManager.GenerateNormal("喇叭", true, {
|
||||
color = sq_RGBA(255, 239, 1, 255)
|
||||
});
|
||||
DrawActor(megaphoneext, 18 , 112);
|
||||
DrawActor(megaphoneext, 18, 112);
|
||||
|
||||
// 喇叭
|
||||
local megaphoneBround = Yosin_NineBoxStretch(321, 72, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||
DrawSprite(megaphoneBround, 6, 130);
|
||||
DrawSprite(megaphoneBround, 6, 130);
|
||||
|
||||
// 消息
|
||||
local MessageBround = Yosin_NineBoxStretch(321, 345, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||
DrawSprite(MessageBround, 6, 225);
|
||||
local PlayerChatBround = Yosin_NineBoxStretch(321, 345, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||
DrawSprite(PlayerChatBround, 6, 225);
|
||||
|
||||
|
||||
// 结束绘制
|
||||
|
|
@ -158,7 +158,7 @@ class Message_Backgournd extends CL_CanvasObject {
|
|||
|
||||
|
||||
// 消息分类按钮
|
||||
class Message_SplicingButton extends Yosin_CommonUi {
|
||||
class PlayerChat_SplicingButton extends Yosin_CommonUi {
|
||||
|
||||
//按钮状态
|
||||
State = 0;
|
||||
|
|
@ -185,8 +185,8 @@ class Message_SplicingButton extends Yosin_CommonUi {
|
|||
|
||||
for (local i = 0; i< 3; i++) {
|
||||
|
||||
local canvas = Yosin_EmeStretch(W, H, "sprite/interface/lenheartwindowcommon.img", 160 + i *3);
|
||||
local Sf = canvas.ExportSpriteFrame();
|
||||
local canvas = Yosin_EmeStretch(W, H, "sprite/interface/lenheartwindowcommon.img", 160 + i * 3);
|
||||
local Sf = canvas.ExportSpriteFrame();
|
||||
FrameList.push(Sf);
|
||||
}
|
||||
|
||||
|
|
@ -289,5 +289,8 @@
|
|||
},
|
||||
"User/Asset/Item/Stackable.nut": {
|
||||
"description": "消耗品及材料"
|
||||
},
|
||||
"User/UI/Window/6_PlayerChat.nut": {
|
||||
"description": "聊天消息窗口"
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue