更改聊天窗口类目与文件名
This commit is contained in:
parent
d456913985
commit
d256e8b7d5
|
|
@ -1,17 +1,17 @@
|
||||||
/*
|
/*
|
||||||
文件名:6_Message.nut
|
文件名:6_PlayerChat.nut
|
||||||
路径:User/UI/Window/6_Message.nut
|
路径:User/UI/Window/6_PlayerChat.nut
|
||||||
创建日期:2025-01-17 19:41
|
创建日期:2025-01-20 18:03
|
||||||
文件用途: 消息窗口
|
文件用途:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//主类
|
//主类
|
||||||
class _Message extends Yosin_Window {
|
class _PlayerChat extends Yosin_Window {
|
||||||
|
|
||||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||||
base.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);
|
Addchild(background);
|
||||||
|
|
||||||
RegisterWidget();
|
RegisterWidget();
|
||||||
|
|
@ -20,7 +20,7 @@ class _Message extends Yosin_Window {
|
||||||
function RegisterWidget() {
|
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);
|
AddUIChild(ordinary);
|
||||||
ordinary.LBDownOnClick = function(btn) {
|
ordinary.LBDownOnClick = function(btn) {
|
||||||
print(111);
|
print(111);
|
||||||
|
|
@ -30,7 +30,7 @@ class _Message extends Yosin_Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 公会
|
// 公会
|
||||||
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);
|
AddUIChild(notice);
|
||||||
notice.LBDownOnClick = function(btn) {
|
notice.LBDownOnClick = function(btn) {
|
||||||
print(111);
|
print(111);
|
||||||
|
|
@ -40,7 +40,7 @@ class _Message extends Yosin_Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 频道
|
// 频道
|
||||||
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);
|
AddUIChild(channel);
|
||||||
channel.LBDownOnClick = function(btn) {
|
channel.LBDownOnClick = function(btn) {
|
||||||
print(111);
|
print(111);
|
||||||
|
|
@ -50,7 +50,7 @@ class _Message extends Yosin_Window {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 募集
|
// 募集
|
||||||
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);
|
AddUIChild(raise);
|
||||||
raise.LBDownOnClick = function(btn) {
|
raise.LBDownOnClick = function(btn) {
|
||||||
print(111);
|
print(111);
|
||||||
|
|
@ -74,7 +74,7 @@ class _Message extends Yosin_Window {
|
||||||
|
|
||||||
|
|
||||||
// 背景
|
// 背景
|
||||||
class Message_Backgournd extends CL_CanvasObject {
|
class PlayerChat_Backgournd extends CL_CanvasObject {
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
base.constructor();
|
base.constructor();
|
||||||
|
|
@ -121,10 +121,10 @@ class Message_Backgournd extends CL_CanvasObject {
|
||||||
local systemText = FontAssetManager.GenerateNormal("系统", true, {
|
local systemText = FontAssetManager.GenerateNormal("系统", true, {
|
||||||
color = sq_RGBA(200, 173, 134, 255)
|
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);
|
local SystemBround = Yosin_NineBoxStretch(321, 72, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||||
DrawSprite(SystemBround, 6, 35);
|
DrawSprite(SystemBround, 6, 35);
|
||||||
|
|
||||||
// 喇叭按钮
|
// 喇叭按钮
|
||||||
|
|
@ -135,15 +135,15 @@ class Message_Backgournd extends CL_CanvasObject {
|
||||||
local megaphoneext = FontAssetManager.GenerateNormal("喇叭", true, {
|
local megaphoneext = FontAssetManager.GenerateNormal("喇叭", true, {
|
||||||
color = sq_RGBA(255, 239, 1, 255)
|
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);
|
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);
|
local PlayerChatBround = Yosin_NineBoxStretch(321, 345, "sprite/interface/newstyle/windows/chatting/chatting_ver4.img", 265);
|
||||||
DrawSprite(MessageBround, 6, 225);
|
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;
|
State = 0;
|
||||||
|
|
@ -185,7 +185,7 @@ class Message_SplicingButton extends Yosin_CommonUi {
|
||||||
|
|
||||||
for (local i = 0; i< 3; i++) {
|
for (local i = 0; i< 3; i++) {
|
||||||
|
|
||||||
local canvas = Yosin_EmeStretch(W, H, "sprite/interface/lenheartwindowcommon.img", 160 + i *3);
|
local canvas = Yosin_EmeStretch(W, H, "sprite/interface/lenheartwindowcommon.img", 160 + i * 3);
|
||||||
local Sf = canvas.ExportSpriteFrame();
|
local Sf = canvas.ExportSpriteFrame();
|
||||||
FrameList.push(Sf);
|
FrameList.push(Sf);
|
||||||
}
|
}
|
||||||
|
|
@ -289,5 +289,8 @@
|
||||||
},
|
},
|
||||||
"User/Asset/Item/Stackable.nut": {
|
"User/Asset/Item/Stackable.nut": {
|
||||||
"description": "消耗品及材料"
|
"description": "消耗品及材料"
|
||||||
|
},
|
||||||
|
"User/UI/Window/6_PlayerChat.nut": {
|
||||||
|
"description": "聊天消息窗口"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue