31 lines
976 B
Plaintext
31 lines
976 B
Plaintext
/*
|
|
文件名:TripleCav.nut
|
|
路径:UI/Windows/Widget/TripleCav.nut
|
|
创建日期:2025-10-24 23:15
|
|
文件用途:三联画布
|
|
*/
|
|
class GameWidget_TripleCav extends Canvas {
|
|
/**
|
|
* 创建三联图画布
|
|
* @function
|
|
* @param {string} ImgPath Img路径
|
|
* @param {integer} ImgStart Img起始索引
|
|
* @param {integer} Width 总宽度
|
|
* @returns {gamewidget_triplecav}
|
|
*/
|
|
constructor(ImgPath, ImgStart, Width) {
|
|
local Left_Width = sq_GetPng(ImgPath, ImgStart).Width;
|
|
local Height = sq_GetPng(ImgPath, ImgStart).Height;
|
|
local Right_Width = sq_GetPng(ImgPath, ImgStart + 2).Width;
|
|
|
|
base.constructor(Width, Height);
|
|
|
|
//绘制左侧
|
|
DrawImg(ImgPath, ImgStart, 0, 0);
|
|
//绘制中间
|
|
DrawImgRect(ImgPath, ImgStart + 1, Left_Width, 0, Width - Left_Width - Right_Width, Height);
|
|
//绘制右侧
|
|
DrawImg(ImgPath, ImgStart + 2, Width - Right_Width, 0);
|
|
}
|
|
}
|