no message

This commit is contained in:
2025-11-08 12:21:06 +08:00
parent e195b0f168
commit 204151d95c
82 changed files with 151530 additions and 12 deletions

View File

@@ -0,0 +1,85 @@
/*
文件名:Lenheart_Ani_Class.nut
路径:Base/UI/Lenheart_Ani_Class.nut
创建日期:2024-08-06 18:56
文件用途:Ani
*/
class Lenheart_Ani {
X = 0;
Y = 0;
ImgPath = null;
ImgFrame = null;
//播放状态
State = 0;
//循环
LoopFlag = true;
//当前帧数
CurFrame = 0;
//初始化时间
InitTime = 0;
//Ani当前帧播放时间
PlayCurTime = 0;
//img 路径 调用帧数组
constructor(path, frame, Pos) {
ImgPath = ("Character/" + path + ".img").tolower();
ImgFrame = frame;
InitTime = Clock();
State = 1;
X = Pos[0];
Y = Pos[1];
}
function Show(dt) {
if (State == 1) {
if (ImgFrame) {
local NowFrameObj = ImgFrame[CurFrame];
PlayCurTime += dt;
L_sq_DrawImg(ImgPath, NowFrameObj.ImgIndex, NowFrameObj.Pos[0] + X, NowFrameObj.Pos[1] + Y);
if (PlayCurTime >= NowFrameObj.Delay) {
CurFrame++;
//播放完成
if (CurFrame >= ImgFrame.len()) {
if (LoopFlag) CurFrame = 0;
else State = 0;
}
InitTime = Clock();
PlayCurTime = 0;
}
}
}
}
function ShowEx(dt,gRgba,rate_x,rate_y) {
if (State == 1) {
if (ImgFrame) {
local NowFrameObj = ImgFrame[CurFrame];
PlayCurTime += dt;
L_sq_DrawImg(ImgPath, NowFrameObj.ImgIndex, NowFrameObj.Pos[0] + X, NowFrameObj.Pos[1] + Y,1,gRgba,rate_x,rate_y);
if (PlayCurTime >= NowFrameObj.Delay) {
CurFrame++;
//播放完成
if (CurFrame >= ImgFrame.len()) {
if (LoopFlag) CurFrame = 0;
else State = 0;
}
InitTime = Clock();
PlayCurTime = 0;
}
}
}
}
function Reset()
{
CurFrame = 0;
State = 1;
}
}

View File

@@ -0,0 +1,512 @@
/*
文件名:Lenheart_Character_Info_Class.nut
路径:Base/UI/Lenheart_Character_Info_Class.nut
创建日期:2024-08-27 12:13
文件用途:个人信息属性面板
*/
return;
class Lenheart_Character_Info_ClassC extends LenheartNewUI_Windows {
//调试模式
// DeBugMode = true;
//不是窗口
NoWindow = true;
//是否可见
Visible = false;
//图标路径
IconPath = "interface2/profile/profile_icon1.img";
//我的信息
MyInfo = null;
//滚轮偏移值
YOffset = 0;
function My_GetCharacterInfoCallBack(Chunk) {
local Jso = Json.Decode(Chunk);
MyInfo = Jso.Attribute;
}
//初始化
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
//注册控件
RegisterWidget();
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
Pack_Control.rawset(20069014, My_GetCharacterInfoCallBack.bindenv(this));
}
function RegisterWidget() {
// //关闭按钮
// local CloseButton = LenheartNewUI_BaseButton(278, 0, 11, 12, "interface/lenheartwindowcommon.img", 276);
// CloseButton.OnClick = function() {
// this.Visible = false;
// }.bindenv(this);
// Childrens.append(CloseButton);
}
//绘制主界面
function DrawMain(obj) {
DrawInfo(obj);
}
function CheckPosInDrawBox(PosY) {
if ((PosY + YOffset) >= 0 && (PosY + YOffset)< 144) return true;
return false;
}
//绘制信息
function DrawInfo(obj) {
if (MyInfo) {
//生命魔法值
local PosOffset = 0;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 0, X + 4, Y + 3 + YOffset);
L_sq_DrawCode("HP", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local HpStr = MyInfo.CurHp.tostring() + "/" + MyInfo.MaxHp.tostring();
L_sq_DrawCode(HpStr, X + 128 - LenheartTextClass.GetStringLength(HpStr), Y + 4 + (0 * 18) + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
L_sq_DrawImg(IconPath, 1, X + 130, Y + 3 + YOffset);
L_sq_DrawCode("MP", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local HpStr = MyInfo.CurMp.tostring() + "/" + MyInfo.MaxMp.tostring();
L_sq_DrawCode(HpStr, X + 248 - LenheartTextClass.GetStringLength(HpStr), Y + 4 + (0 * 18) + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//力量智力
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 2, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("力量", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.Strength.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
L_sq_DrawImg(IconPath, 3, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("智力", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.Intellect.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//体力精神
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 4, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("体力", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.Vitality.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
L_sq_DrawImg(IconPath, 5, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("精神", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.Spirit.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//物理攻击魔法攻击
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 6, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("物理攻击", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.PhysicalAttack.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
L_sq_DrawImg(IconPath, 7, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("魔法攻击", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.MagicalAttack.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//独立攻击力
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 31, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("独立攻击力(物理/魔法)", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.IndependentAttack.tostring();
L_sq_DrawCode(Str, X + 248 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//物理防御魔法防御
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 8, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("物理防御", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.PhysicalDefend.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
L_sq_DrawImg(IconPath, 9, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("魔法防御", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.MagicalDefend.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(150, 255, 30, 250), 0, 1);
}
//物理暴击 魔法暴击
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 10, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("物理暴击", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = format("%0.1f%%", MyInfo.PhysicalCrit);
L_sq_DrawCode(Str, X + 133 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 11, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("魔法暴击", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = format("%0.1f%%", MyInfo.MagicalCrit);
L_sq_DrawCode(Str2, X + 253 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//攻击速度 释放速度
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 12, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("攻击速度", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = format("%0.1f%%", MyInfo.AttackSpeed);
L_sq_DrawCode(Str, X + 133 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 13, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("释放速度", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = format("%0.1f%%", MyInfo.ReleaseSpeed);
L_sq_DrawCode(Str2, X + 253 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//移动速度 抗魔
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 14, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("移动速度", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = format("%0.1f%%", MyInfo.MoveSpeed);
L_sq_DrawCode(Str, X + 133 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 15, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("抗魔", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.AntiMagic.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//命中率 回避率
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 16, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("命中率", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = format("%0.1f%%", MyInfo.HitRate);
L_sq_DrawCode(Str, X + 133 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 17, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("回避率", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = format("%0.1f%%", MyInfo.DodgeRate);
L_sq_DrawCode(Str2, X + 253 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//HP恢复量 MP恢复量
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 18, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("HP恢复量", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.HPRecovery.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 19, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("MP恢复量", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.MPRecovery.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//僵直度 硬直
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 20, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("僵直度", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.StunRate.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 21, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("硬直", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.StunResist.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//火属性强化 火属性抗性
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 22, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("火属性强化", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.FireStrength.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 23, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("火属性抗性", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.FireResist.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//冰属性强化 冰属性抗性
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 24, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("冰属性强化", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.IceStrength.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 25, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("冰属性抗性", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.IceResist.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//光属性强化 光属性抗性
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 26, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("光属性强化", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.LightStrength.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 27, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("光属性抗性", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.LightResist.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//暗属性强化 暗属性抗性
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 28, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("暗属性强化", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.DarkStrength.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 29, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("暗属性抗性", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.DarkResist.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
//名望值 罪恶值
PosOffset += 18;
if (CheckPosInDrawBox(PosOffset)) {
L_sq_DrawImg(IconPath, 53, X + 4, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("名望值", X + 20, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str = MyInfo.Fame.tostring();
L_sq_DrawCode(Str, X + 128 - LenheartTextClass.GetStringLength(Str), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
L_sq_DrawImg(IconPath, 45, X + 130, Y + 3 + PosOffset + YOffset);
L_sq_DrawCode("最终伤害", X + 148, Y + 4 + PosOffset + YOffset, sq_RGBA(255, 255, 255, 250), 0, 1);
local Str2 = MyInfo.FinalDamage.tostring();
L_sq_DrawCode(Str2, X + 248 - LenheartTextClass.GetStringLength(Str2), Y + 4 + PosOffset + YOffset, sq_RGBA(251, 251, 251, 250), 0, 1);
}
}
}
function Show(obj) {
}
function RealShow(obj) {
DrawMain(obj);
LenheartNewUI_Windows.Show(obj);
}
//override
//鼠标滚轮事件回调
function OnMouseWheel(Flag, MousePos_X, MousePos_Y) {
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y, Width, Height)) {
if (Flag) {
if (YOffset< 0) YOffset += 18;
}
if (!Flag) {
if (YOffset > (-145)) YOffset -= 18;
}
}
//调用原生方法
LenheartNewUI_Windows.OnMouseWheel(Flag, MousePos_X, MousePos_Y);
}
GetMyInfoFlag = false;
//逻辑入口
function Proc(obj) {
Visible = false;
LenheartNewUI_Windows.SyncPos(X, Y);
local WindowX = sq_GetPopupWindowMainCotrol(74);
if (!WindowX) {
GetMyInfoFlag = false;
}
if (!WindowX) return;
if (!GetMyInfoFlag) {
GetMyInfoFlag = true;
local T = {
op = 20069013,
Info = Lenheart_Character_GetAttribute(null)
}
SendPackEx(T);
}
X = Base_X;
Y = Base_Y;
}
Base_X = 0;
Base_Y = 0;
function SyncState(Args) {
Base_X = Args[0] + 800;
Base_Y = Args[1] - 174;
local obj = sq_getMyCharacter();
RealShow(obj);
Visible = true;
}
}
DrawCodeCallBackFunc.Rindro_Character_Info <- function(Args) {
if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
local MyWindow = getroottable().rawget("Lenheart_Character_Info_Class_Obj");
MyWindow.SyncState(Args);
}
}
//个人信息窗口逻辑
function L_Character_Info_Window(WindowObject) {
return false;
// //返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
// local Flag = false;
// if (getroottable().rawin("Lenheart_Character_Info_Class_Obj")) {
// local MyWindow = getroottable().rawget("Lenheart_Character_Info_Class_Obj");
// local Ret = MyWindow.SyncState(WindowObject);
// if (Ret) Flag = true;
// }
// return Flag;
}
getroottable().rawdelete("Lenheart_Character_Info_Class_Obj");
function Lenheart_Character_Info_Class_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("Lenheart_Character_Info_Class_Obj")) {
RootTab.rawset("Lenheart_Character_Info_Class_Obj", LenheartNewUI_CreateWindow(Lenheart_Character_Info_ClassC, "个人信息属性面板窗口", 0, 0, 263, 146, 0));
}
}
getroottable()["LenheartFuncTab"].rawset("Lenheart_Character_Info_ClassFuncN", Lenheart_Character_Info_Class_Fun);
class Lenheart_Other_Character_Info_ClassC extends Lenheart_Character_Info_ClassC {
//调试模式
// DeBugMode = true;
//不是窗口
NoWindow = true;
//是否可见
Visible = false;
//图标路径
IconPath = "interface2/profile/profile_icon1.img";
//我的信息
MyInfo = null;
//滚轮偏移值
YOffset = 0;
function Other_GetCharacterInfoCallBack(Chunk) {
local Jso = Json.Decode(Chunk);
MyInfo = Jso.Attribute;
}
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
//注册控件
RegisterWidget();
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
Pack_Control.rawset(20069012, Other_GetCharacterInfoCallBack.bindenv(this));
}
function RegisterWidget() {
}
function Show(obj) {
}
function DrawMain(obj) {
DrawInfo(obj);
}
function RealShow(obj) {
DrawMain(obj);
LenheartNewUI_Windows.Show(obj);
}
//override
//鼠标滚轮事件回调
function OnMouseWheel(Flag, MousePos_X, MousePos_Y) {
if (Flag) {
if (YOffset< 0) YOffset += 18;
}
if (!Flag) {
if (YOffset > (-145)) YOffset -= 18;
}
//调用原生方法
LenheartNewUI_Windows.OnMouseWheel(Flag, MousePos_X, MousePos_Y);
}
//逻辑入口
function Proc(obj) {
Visible = false;
LenheartNewUI_Windows.SyncPos(X, Y);
local WindowX = sq_GetPopupWindowMainCotrol(74);
if (!WindowX || !OldWindowAddress) return;
X = L_sq_RA(OldWindowAddress + 0x14);
Y = L_sq_RA(OldWindowAddress + 0x18) + 154;
}
OldWindowAddress = null;
function SyncState(Address) {
OldWindowAddress = Address;
local obj = sq_getMyCharacter();
RealShow(obj);
Visible = true;
return true;
}
}
//他人信息窗口逻辑
function L_Other_Character_Info_Window(WindowObject) {
return false;
//返回Flase 原逻辑继续执行 返回Tue 原逻辑终止执行
local Flag = false;
if (getroottable().rawin("Lenheart_Other_Character_Info_Class_Obj")) {
local MyWindow = getroottable().rawget("Lenheart_Other_Character_Info_Class_Obj");
local Ret = MyWindow.SyncState(WindowObject);
if (Ret) Flag = true;
}
return Flag;
}
getroottable().rawdelete("Lenheart_Other_Character_Info_Class_Obj");
function Lenheart_Other_Character_Info_Class_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("Lenheart_Other_Character_Info_Class_Obj")) {
RootTab.rawset("Lenheart_Other_Character_Info_Class_Obj", LenheartNewUI_CreateWindow(Lenheart_Other_Character_Info_ClassC, "他人信息属性面板窗口", 0, 0, 263, 146, 0));
}
}
getroottable()["LenheartFuncTab"].rawset("Lenheart_Other_Character_Info_ClassFuncN", Lenheart_Other_Character_Info_Class_Fun);

View File

@@ -0,0 +1,57 @@
/*
文件名:Lenheart_Cursor_Class.nut
路径:Base/UI/Lenheart_Cursor_Class.nut
创建日期:2024-09-25 19:23
文件用途:鼠标绘制逻辑
*/
class Rindro_Cursor {
//强制锁
ForceLockState = false;
//是否启用
UseState = 0;
TypeState = 0;
SubState = 0;
constructor() {
}
function Proc(Xpos, Ypos) {
//使用自建的鼠标绘制函数
if (UseState) {
//工作类型为0
if (TypeState == 0) {
//常规状态
if (SubState == 0) {
L_sq_DrawImg("interface/newstyle/windows/cursor.img", 0, Xpos, Ypos);
}
//按下状态
else if (SubState == 1) {
L_sq_DrawImg("interface/newstyle/windows/cursor.img", 1, Xpos, Ypos);
}
} else {
L_sq_DrawImg("interface/newstyle/windows/cursor.img", TypeState, Xpos, Ypos);
}
}
}
function Sync(Xpos, Ypos) {
Proc(Xpos, Ypos);
return UseState;
}
}
_Rindro_Cusor_ <- Rindro_Cursor();
function SyncRindro_Cursor(Xpos, Ypos) {
if (getroottable().rawin("_Rindro_Cusor_")) {
local Ret = _Rindro_Cusor_.Sync(Xpos, Ypos);
return Ret;
}
return false;
}

View File

@@ -0,0 +1,418 @@
/*
文件名:Lenheart_Each_Class.nut
路径:Base/UI/Lenheart_Each_Class.nut
创建日期:2024-09-30 14:46
文件用途:交互界面类
*/
class LenheartNewUI_Each_BaseButton extends LenheartNewUI_CommonUi {
State = 0;
BaseIdx = 29;
DWidth = null;
Path = null;
Idx = null;
SetFlag = null;
SetIndex = null;
Icon = null;
IconIdx = null;
Str = null;
StrColor = sq_RGBA(189, 159, 126, 250);
constructor(X, Y, W, H, Path, Idx) {
this.DWidth = W;
this.Path = Path;
this.Idx = Idx;
LenheartNewUI_CommonUi.constructor(X, Y, W, H);
}
function SetFrame(gPath, gIdx) {
if (gPath) Path = gPath;
Idx = gIdx;
}
function Show(obj) {
//不可用
if (State == 8) {
// L_sq_DrawImg(Path, Idx + 3, X, Y);
} else {
//按下
if (isLBDown) {
L_sq_DrawImg(Path, Idx + 1, X, Y);
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 2);
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 5, StrColor, 0, 1);
}
//悬停
else if (isInRect) {
L_sq_DrawImg(Path, Idx, X, Y);
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 1);
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 4, StrColor, 0, 1);
}
//普通
else {
L_sq_DrawImg(Path, 0, X, Y);
if (Icon) L_sq_DrawImg(Icon, IconIdx, X + 3, Y + 1);
if (Str) L_sq_DrawCode(Str, X + 60 - LenheartTextClass.GetStringLength(Str) / 2, Y + 4, StrColor, 0, 1);
}
}
}
//鼠标左键弹起回调
function OnMouseLbUp(MousePos_X, MousePos_Y) {
if (isLBDown && OnClick) {
OnClick(this);
}
isLBDown = false;
}
}
class Lenheart_EachC extends LenheartNewUI_Windows {
//调试模式
// DeBugMode = true;
//不是窗口
NoWindow = true;
//是否可见
// Visible = false;
Info = null;
NPC_Index = null;
NPC_Flag = false;
NPC_ButtonMap = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
NPC_ButtonMap = {};
//注册控件
RegisterWidget();
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
}
function RegisterWidget() {
}
function Show(obj) {
}
function TopShow(obj) {
if (NPC_Index) {
SyncPos();
LenheartNewUI_Windows.Show(obj);
}
}
function DrawMain(obj) {
// if (Info) {
// local NPC_Index = Rindro_BaseToolClass.GetEachNpcId();
// }
}
// function BottomShow() {}
//初始化NPC按钮
function InitNpcButton() {
Childrens = [];
if (NPC_ButtonMap.rawin(NPC_Index)) {
foreach(Func in NPC_ButtonMap[NPC_Index]) {
Func(this);
}
}
this.Visible = true;
}
function AddEachForNpc(Index, Func) {
if (NPC_ButtonMap.rawin(Index)) {
NPC_ButtonMap[Index].append(Func);
return;
}
NPC_ButtonMap.rawset(Index, [Func]);
}
function RemoveEachForNpc(Index) {
NPC_ButtonMap.rawdelete(Index);
}
//逻辑入口
function Proc(obj) {
LenheartNewUI_Windows.SyncPos(X, Y);
NPC_Index = Rindro_BaseToolClass.GetEachNpcId();
if (NPC_Index) {
if (!NPC_Flag) {
NPC_Flag = true;
InitNpcButton();
}
} else {
NPC_Flag = false;
}
}
function CloseAllEach() {
local EachClassObject = L_sq_RA(0x1ADE0E0);
if (EachClassObject) {
local FristChildOffset = (EachClassObject + 0x68);
for (local i = 0; i< 74; i++) {
local AddressBuf = FristChildOffset + (4 * i);
local ChildAddress = L_sq_RA(AddressBuf);
if (ChildAddress) {
local OpenFlag = L_sq_RA(ChildAddress + 0xC);
if (OpenFlag = 257) L_sq_WA(ChildAddress + 0xC, 256);
}
}
}
}
function Lenheart_Get_Each_Info() {
local EachCount = 0;
local Xpos = 0;
local Ypos = 0;
local EachClassObject = L_sq_RA(0x1ADE0E0);
if (EachClassObject) {
local FristChildOffset = (EachClassObject + 0x68);
for (local i = 0; i< 74; i++) {
local AddressBuf = FristChildOffset + (4 * i);
local ChildAddress = L_sq_RA(AddressBuf);
if (ChildAddress) {
local OpenFlag = L_sq_RA(ChildAddress + 0xC);
if (OpenFlag == 257) EachCount++;
}
//第0个的时候记录一下坐标
if (i == 0) {
Xpos = L_sq_RA(ChildAddress + 0x14);
Ypos = L_sq_RA(ChildAddress + 0x18);
}
}
}
return {
Count = EachCount,
X = Xpos,
Y = Ypos
};
}
//override
//鼠标左键弹起回调
function OnMouseLbUp(MousePos_X, MousePos_Y) {
//调用原生方法
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
}
function SyncPos() {
//读取交互坐标数据
Info = Lenheart_Get_Each_Info();
X = Info.X;
Y = Info.Y + (21 * Info.Count);
//宽度
Width = 100;
//高度
Height = (21 * Childrens.len());
//同步子对象坐标
foreach(pos, winobj in Childrens) {
winobj.X = Info.X;
winobj.Y = Info.Y + (21 * (Info.Count + pos));
}
}
}
function Lenheart_Each_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("L_Each_Obj")) {
RootTab.rawset("L_Each_Obj", LenheartNewUI_CreateWindow(Lenheart_EachC, "玩家与NPC交互界面窗口", 0, 0, 0, 0, 0));
}
}
getroottable()["LenheartFuncTab"].rawset("Lenheart_EachN", Lenheart_Each_Fun);
class Lenheart_PlayerEachC extends LenheartNewUI_Windows {
//调试模式
// DeBugMode = true;
//不是窗口
NoWindow = true;
//是否可见
// Visible = false;
Info = null;
Basic = null;
//当前交互角色姓名
PlayerEach_Name = null;
PlayerEach_Flag = false;
PlayerEach_ButtonMap = null;
//通用按钮
PlayerEach_CommonButtonMap = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
PlayerEach_ButtonMap = {};
PlayerEach_CommonButtonMap = {};
//注册控件
RegisterWidget();
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
}
function RegisterWidget() {}
function Show(obj) {}
function TopShow(obj) {}
function DrawMain(obj) {}
function MySelfShow() {
if (PlayerEach_Name) {
local obj = sq_getMyCharacter();
LenheartNewUI_Windows.Show(obj);
}
}
//初始化NPC按钮
function InitNpcButton() {
Childrens = [];
if (PlayerEach_ButtonMap.rawin(PlayerEach_Name)) {
foreach(Func in PlayerEach_ButtonMap[PlayerEach_Name]) {
Func(this);
}
}
foreach(Func in PlayerEach_CommonButtonMap) {
Func(this);
}
this.Visible = true;
}
function AddEachForCommon(Index, Func) {
PlayerEach_CommonButtonMap.rawset(Index, Func);
}
function RemoveEachForCommon(Index) {
PlayerEach_CommonButtonMap.rawdelete(Index);
}
function AddEachForPlayerName(Index, Func) {
if (PlayerEach_ButtonMap.rawin(Index)) {
PlayerEach_ButtonMap[Index].append(Func);
return;
}
PlayerEach_ButtonMap.rawset(Index, [Func]);
}
function RemoveEachForPlayerName(Index) {
PlayerEach_ButtonMap.rawdelete(Index);
}
function CloseAllEach() {
if (Basic) {
L_sq_WA(L_sq_P2I(Basic) + 0xC, 256);
}
}
//逻辑入口
function Proc(obj) {
LenheartNewUI_Windows.SyncPos(X, Y);
local Str = L_Sq_GetPlayerEachName();
if (Str.len() > 0) {
PlayerEach_Name = Str;
}
if (PlayerEach_Name) {
if (!PlayerEach_Flag) {
PlayerEach_Flag = true;
InitNpcButton();
}
} else {
PlayerEach_Flag = false;
}
}
//override
//鼠标左键弹起回调
function OnMouseLbUp(MousePos_X, MousePos_Y) {
LenheartNewUI_Windows.OnMouseLbUp(MousePos_X, MousePos_Y);
}
function SelfSyncPos(gInfo) {
//读取交互坐标数据
Info = gInfo;
Basic = gInfo.BasicAdd;
X = Info.X;
Y = Info.Y + (21 * Info.Count);
//宽度
Width = 100;
//高度
Height = (21 * Childrens.len());
//同步子对象坐标
foreach(pos, winobj in Childrens) {
winobj.X = Info.X;
winobj.Y = Info.Y + (21 * (Info.Count + pos));
}
}
}
RindroPlayerEachDrawFlag <- false;
RindroPlayerEachDrawCountBuffer <- 0;
RindroPlayerEachDrawCount <- 0;
Rindro_Haker.LoadHook(0x10002A0, ["pointer", "int", "int"],
function(args) {
if (L_Sq_GetPlayerEachName().len() <= 0) return;
local Xpos = L_sq_RA(L_sq_P2I(args[0]) + 0x14);
local Ypos = L_sq_RA(L_sq_P2I(args[0]) + 0x18);
if (!RindroPlayerEachDrawFlag) {
local RootTab = getroottable();
RindroPlayerEachDrawFlag = true;
if (RootTab.rawin("L_PlayerEach_Obj")) {
RootTab["L_PlayerEach_Obj"].SelfSyncPos({
X = Xpos,
Y = Ypos,
Count = RindroPlayerEachDrawCount,
BasicAdd = args[0]
});
RootTab["L_PlayerEach_Obj"].MySelfShow();
}
}
RindroPlayerEachDrawCountBuffer++;
// print(args[0]);
return null;
},
function(args) {
return null;
});
function Lenheart_PlayerEach_Fun(obj) {
local RootTab = getroottable();
RindroPlayerEachDrawFlag = false;
RindroPlayerEachDrawCount = RindroPlayerEachDrawCountBuffer;
RindroPlayerEachDrawCountBuffer = 0;
if (!RootTab.rawin("L_PlayerEach_Obj")) {
RootTab.rawset("L_PlayerEach_Obj", LenheartNewUI_CreateWindow(Lenheart_PlayerEachC, "玩家与玩家交互界面窗口", 0, 0, 0, 0, 0));
}
}
getroottable()["LenheartFuncTab"].rawset("Lenheart_PlayerEachN", Lenheart_PlayerEach_Fun);

View File

@@ -0,0 +1,374 @@
/*
文件名:Lenheart_Event_Class.nut
路径:Base/UI/Lenheart_Event_Class.nut
创建日期:2024-08-11 09:47
文件用途:活动图标
*/
class LenheartNewUI_EventButton extends LenheartNewUI_CommonUi {
State = 0;
BaseIdx = 29;
DWidth = null;
Path = null;
Idx = null;
BindObj = null;
Timer = 0;
EffFlag = true;
ShowName = null;
constructor(X, Y, Path, Idx) {
this.DWidth = 20;
this.Path = Path;
this.Idx = Idx;
LenheartNewUI_CommonUi.constructor(X, Y, 20, 20);
Timer = Clock();
}
function SetFrame(gPath, gIdx) {
if (gPath) Path = gPath;
Idx = gIdx;
}
function Show(obj) {
T_DrawDynamicAni(obj, "common/yosinevent/eventsystemeff.ani", X, Y, "EventIcon" + ObjectId);
//不可用
if (State == 8) {
L_sq_DrawImg(Path, Idx + 3, X, Y + 1);
} else {
//按下
if (isLBDown) {
L_sq_DrawImg(Path, Idx + 1, X, Y);
}
//悬停
else if (isInRect) {
L_sq_DrawImg(Path, Idx, X, Y);
}
//普通
else {
L_sq_DrawImg(Path, Idx, X, Y);
}
}
}
//鼠标左键按下回调
function OnMouseLbDown(MousePos_X, MousePos_Y) {
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, X, Y, Width, Height)) isLBDown = true;
}
//鼠标左键弹起回调 overr
function OnMouseLbUp(MousePos_X, MousePos_Y) {
if (isLBDown && OnClick) {
local obj = sq_getMyCharacter();
obj.sq_PlaySound("CLICK_BUTTON1");
OnClick(this);
}
isLBDown = false;
}
}
class Rindro_Event extends LenheartNewUI_Windows {
//调试模式
// DeBugMode = true;
EventFlag = true;
//不是窗口
NoWindow = true;
//显示标志位
PosIdx = null;
//闪烁透明度
Alpha = 250;
//闪烁模式
BlinkMode = false;
//时间
Timer = 0;
//是否可见
Visible = true;
//主要Button
MainButton = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
Childrens = [];
LenheartNewUI_Windows.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
Timer = Clock();
}
//绘制主界面
function DrawMain(obj) {
local RT = Clock() - Timer;
//根据模式调整透明度
if (!BlinkMode) Alpha = sq_GetUniformVelocity(250, 130, RT, 500);
else Alpha = sq_GetUniformVelocity(130, 250, RT, 500);
//转换模式
if (RT >= 500) {
Timer = Clock();
BlinkMode = !BlinkMode;
}
L_sq_SetDrawImgModel(2, 0);
L_sq_DrawImg("interface2/yosin/eventsystemeff.img", 0, X, Y, 1, sq_RGBA(255, 255, 255, Alpha), 1.0, 1.0);
L_sq_ReleaseDrawImgModel();
}
function Show(obj) {
// DrawMain(obj);
// LenheartNewUI_Windows.Show(obj);
}
function EventShow(obj) {
DrawMain(obj);
LenheartNewUI_Windows.Show(obj);
}
function TopShow(obj) {
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, X, Y, 20, 20)) {
local XposOffset = 0;
local Len = LenheartTextClass.GetStringLength(MainButton.ShowName);
local Count = ((Len - 10) / 15) + 1;
XposOffset = (-(10 + Count * 15) / 2) + 10;
L_sq_DrawImg("interface2/yosin/eventsystem.img", 0, X + XposOffset, Y - 24);
for (local i = 0; i< Count; i++) {
L_sq_DrawImg("interface2/yosin/eventsystem.img", 1, X + XposOffset + 5 + (15 * i), Y - 24);
}
L_sq_DrawImg("interface2/yosin/eventsystem.img", 2, X + XposOffset + 5 + (15 * Count), Y - 24);
L_sq_DrawCode(MainButton.ShowName, X - Len / 2 + 12, Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
}
}
function SyncEventIcon() {
local Count = L_sq_RA(L_sq_RA(0x1A39C2C) + 0x6c);
X = EventList_Obj.X + (((Count + PosIdx) % 8) * 20);
Y = EventList_Obj.Y - ((Count + PosIdx) / 8) * 20;
}
//逻辑入口
function Proc(obj) {
//同步图标位置
SyncEventIcon();
LenheartNewUI_Windows.SyncPos(X, Y);
}
}
class Rindro_EventList {
X = 0;
Y = 0;
//活动数组
Events = null;
EventsMap = null;
function YosinEventIconInfoCallBack(Chunk) {
local Jso = Json.Decode(Chunk);
X = Jso.YosinEventIconInfoXpos;
Y = Jso.YosinEventIconInfoYpos;
getroottable()["LenheartEventOffset"] <- {
x = X - 456,
y = Y
};
L_sq_RefreshEventIcon();
}
constructor() {
Events = [];
EventsMap = {};
Pack_Control.rawset(30002, YosinEventIconInfoCallBack.bindenv(this));
}
//添加活动
function AddEvent(Name, Idx, WindowObject, ...) {
if (EventsMap.rawin(Name)) return EventsMap.rawget(Name);
local Window = LenheartNewUI_CreateWindow(Rindro_Event, Name, 0, 0, 20, 20, 0)
local Flag = Events.len();
local ImgPath = "interface2/yosin/eventsystemlist.img";
if (vargc == 1) ImgPath = vargv[0];
local ButtonBuf = LenheartNewUI_EventButton(0, 0, ImgPath, Idx);
ButtonBuf.BindObj = WindowObject;
ButtonBuf.ShowName = Name;
ButtonBuf.OnClick = function(B_obj) {
if (B_obj.BindObj) B_obj.BindObj.OpenCallBack();
}.bindenv(this);
Window.AddChild(ButtonBuf);
Window.PosIdx = Events.len();
Window.MainButton = ButtonBuf;
Events.append(Window);
EventsMap.rawset(Name, Window);
return Window;
}
//检测是否悬停活动图标
function CheckInEvent(MousePos_X, MousePos_Y) {
if (sq_GetPopupWindowMainCotrol(244)) return;
foreach(Window in Events) {
if (sq_IsIntersectRect(MousePos_X, MousePos_Y, 1, 1, Window.X, Window.Y, Window.Width, Window.Height)) {
getroottable().WindowsShowABFlag <- true;
}
}
}
}
getroottable().rawdelete("EventList_Obj")
function Lenheart_EventList_Fun(obj) {
local RootTab = getroottable();
if (!RootTab.rawin("EventList_Obj")) {
RootTab.rawset("EventList_Obj", Rindro_EventList());
}
}
//获取活动图标坐标 在活动图标变动时会被调用
function Sq_Get_Event_Pos_X() {
if (getroottable().rawin("LenheartEventOffset")) {
return getroottable()["LenheartEventOffset"].x;
} else {
getroottable()["LenheartEventOffset"] <- {
x = 277,
y = 530
};
return getroottable()["LenheartEventOffset"].x;
}
}
function Sq_Get_Event_Pos_Y() {
if (getroottable().rawin("LenheartEventOffset")) {
return getroottable()["LenheartEventOffset"].y;
} else {
getroottable()["LenheartEventOffset"] <- {
x = 277,
y = 530
};
return getroottable()["LenheartEventOffset"].y;
}
}
/*
//活动图标类
class Rindro_EventIcon extends LenheartNewUI_CommonUi {
//Key
Key = null;
//活动图标文字
EventStr = null;
//活动图标Ani编号
EventFrame = null;
//绑定对象
BandObject = null;
//图标img路径
ImgPath = "interface2/yosin/eventsystemlist.img";
x = null;
y = null;
constructor(gEventStr, gEventFrame, gKey, gBandObject) {
this.EventStr = gEventStr;
this.EventFrame = gEventFrame;
this.Key = gKey;
this.BandObject = gBandObject;
local RootTab = getroottable();
if (RootTab.rawin("YosinEventSystem")) {
local Arr = RootTab["YosinEventSystem"];
local TryAppend = true;
local wpos;
foreach(pos, value in Arr) {
if (value.Key == this.Key) {
TryAppend = false;
wpos = pos;
}
}
if (TryAppend) {
Arr.append(this);
RootTab.rawset("YosinEventSystem", Arr);
} else {
Arr[wpos] = this;
RootTab.rawset("YosinEventSystem", Arr);
}
} else {
local Arr = [];
Arr.append(this);
RootTab.rawset("YosinEventSystem", Arr);
}
}
function Show(obj, X, Y) {
x = X;
y = Y;
//绘制框
T_DrawDynamicAni(obj, "common/yosinevent/eventsystemeff.ani", X, Y, "YosinEventIconEffA");
try {
if (isLBDown()) {
//绘制活动图标
L_sq_DrawImg(ImgPath, EventFrame, X, Y + 1);
//T_DrawStayAni(obj, "common/yosinevent/eventsystemlist.ani", X, Y + 1, EventFrame, "YosinEventIconKey" + Key);
} else {
//绘制活动图标
L_sq_DrawImg(ImgPath, EventFrame, X, Y);
}
} catch (exception) {
if (isLBDown()) {
//绘制活动图标
T_DrawStayAni(obj, "common/yosinevent/eventsystemlist.ani", X, Y + 1, EventFrame, "YosinEventIconKey" + Key);
} else {
//绘制活动图标
T_DrawStayAni(obj, "common/yosinevent/eventsystemlist.ani", X, Y, EventFrame, "YosinEventIconKey" + Key);
}
}
}
function StrShow(obj, X, Y) {
//悬停
if (isInRect() && EventStr) {
local count = EventStr.len() / 3;
T_DrawStayAni(obj, "common/yosinevent/eventsystem.ani", X - (count * 7), Y - 24, 0, "YosinEventIconStrEffL");
for (local i = 0; i< count; i++) {
T_DrawStayAni(obj, "common/yosinevent/eventsystem.ani", X - (count * 7) + 5 + (i * 15), Y - 24, 1, "YosinEventIconStrEffZ");
}
T_DrawStayAni(obj, "common/yosinevent/eventsystem.ani", X - (count * 7) + 5 + (count * 15), Y - 24, 2, "YosinEventIconStrEffR");
L_sq_DrawCode(EventStr, X - (count * 4), Y - 17, sq_RGBA(255, 255, 255, 250), 0, 1);
}
if (isLBActive()) {
BandObject.MainState = true;
BandObject.OpenClassCallBack();
}
}
//悬停状态
function isInRect() {
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, x, y, 20, 20)) return true;
else return false;
}
//左键按下状态
function isLBDown() {
if (isInRect() && Mobj.Lb == 1) return true;
else return false;
}
//左键弹起状态
function isLBUp() {
if (isInRect() && Mobj.Lb == 0) return true;
else return false;
}
//左键单击状态
function isLBActive() {
if (isInRect() && Mobj.LbEvent) return true;
else return false;
}
}
*/

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,52 @@
/*
文件名:OldWindowsMap.nut
路径:Base/UI/OldWindowsMap.nut
创建日期:2024-08-06 18:56
文件用途:用于查询是否鼠标悬停在原生窗口上的Flag 以下编号代表着没有悬停其他均为悬停在原生窗口
*/
NotOldWindowsMap <- {}
NotOldWindowsMap.rawset(92, 1);
NotOldWindowsMap.rawset(79, 1);
NotOldWindowsMap.rawset(2395, 1);
NotOldWindowsMap.rawset(2396, 1);
NotOldWindowsMap.rawset(3877, 1);
NotOldWindowsMap.rawset(3878, 1);
NotOldWindowsMap.rawset(3873, 1);
NotOldWindowsMap.rawset(3874, 1);
NotOldWindowsMap.rawset(3858, 1);
NotOldWindowsMap.rawset(3871, 1);
NotOldWindowsMap.rawset(3857, 1);
NotOldWindowsMap.rawset(3861, 1);
NotOldWindowsMap.rawset(3862, 1);
NotOldWindowsMap.rawset(93, 1);
NotOldWindowsMap.rawset(94, 1);
NotOldWindowsMap.rawset(95, 1);
NotOldWindowsMap.rawset(96, 1);
NotOldWindowsMap.rawset(97, 1);
NotOldWindowsMap.rawset(98, 1);
NotOldWindowsMap.rawset(99, 1);
NotOldWindowsMap.rawset(100, 1);
NotOldWindowsMap.rawset(101, 1);
NotOldWindowsMap.rawset(114, 1);
NotOldWindowsMap.rawset(88, 1);
NotOldWindowsMap.rawset(102, 1);
NotOldWindowsMap.rawset(108, 1);
NotOldWindowsMap.rawset(109, 1);
NotOldWindowsMap.rawset(103, 1);
NotOldWindowsMap.rawset(104, 1);
NotOldWindowsMap.rawset(110, 1);
NotOldWindowsMap.rawset(111, 1);
NotOldWindowsMap.rawset(105, 1);
NotOldWindowsMap.rawset(106, 1);
NotOldWindowsMap.rawset(112, 1);
NotOldWindowsMap.rawset(113, 1);
NotOldWindowsMap.rawset(107, 1);
NotOldWindowsMap.rawset(87, 1);
NotOldWindowsMap.rawset(86, 1);
NotOldWindowsMap.rawset(80, 1);
NotOldWindowsMap.rawset(81, 1);
NotOldWindowsMap.rawset(82, 1);
NotOldWindowsMap.rawset(83, 1);
NotOldWindowsMap.rawset(4067, 1);
NotOldWindowsMap.rawset(122, 1);
NotOldWindowsMap.rawset(120, 1);