11111
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
创建日期:2024-08-10 08:04
|
||||
文件用途:修补世界地图
|
||||
*/
|
||||
YosinWorldMapX <- 0;
|
||||
YosinWorldMapY <- 0;
|
||||
class RepairWorldMapC extends LenheartNewUI_Windows {
|
||||
//调试模式
|
||||
// DeBugMode = true;
|
||||
@@ -20,7 +22,7 @@ class RepairWorldMapC extends LenheartNewUI_Windows {
|
||||
//世界地图信息
|
||||
Info = null;
|
||||
|
||||
//当前城镇编号
|
||||
//当前区域编号
|
||||
AreaId = 0;
|
||||
|
||||
//下拉框打开Flag
|
||||
@@ -36,6 +38,7 @@ class RepairWorldMapC extends LenheartNewUI_Windows {
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
Childrens = [];
|
||||
Info = {};
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
|
||||
@@ -48,6 +51,25 @@ class RepairWorldMapC extends LenheartNewUI_Windows {
|
||||
L_sq_WAB(0x1031B36, 0x90);
|
||||
L_sq_WAB(0x1031B37, 0x90);
|
||||
L_sq_WAB(0x1031B38, 0x90);
|
||||
|
||||
Info = Rindro_Script.GetFileData("region/region.lst", function(DataTable, Data) {
|
||||
while (!Data.Eof()) {
|
||||
local Key = Data.Get();
|
||||
local Path = "region/" + Data.Get();
|
||||
local RgnInfo = Rindro_Script.GetFileData(Path, function(DataTableA, Data) {
|
||||
while (!Data.Eof()) {
|
||||
local Str = Data.Get();
|
||||
if (Str == "[name]") {
|
||||
DataTableA.Name <- Sq_ConvertWideChar(Data.Get(), "big5");
|
||||
}
|
||||
}
|
||||
});
|
||||
DataTable.rawset(Key.tointeger() - 1, {
|
||||
Name = RgnInfo.Name
|
||||
});
|
||||
}
|
||||
}.bindenv(this));
|
||||
Info.rawdelete("filepath");
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
@@ -65,19 +87,19 @@ class RepairWorldMapC extends LenheartNewUI_Windows {
|
||||
return;
|
||||
}
|
||||
//黑框
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 8, 131, 7);
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 8, 131 + YosinWorldMapX, 7 + YosinWorldMapY);
|
||||
//绘制区域名称
|
||||
L_sq_DrawCode(getroottable().RINDRO_CONFIG.region[AreaId].Name, 135, 10, 0xFFFFFFFF, 1, 1);
|
||||
L_sq_DrawCode(Info[AreaId].Name, 135 + YosinWorldMapX, 10 + YosinWorldMapY, 0xFFFFFFFF, 1, 1);
|
||||
|
||||
if (TabbarFlag) {
|
||||
foreach(Pos, Value in getroottable().RINDRO_CONFIG.region) {
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 9, 131, 25 + (Pos * 18));
|
||||
foreach(Pos, Value in Info) {
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 9, 131 + YosinWorldMapX, 25 + (Pos * 18) + YosinWorldMapY);
|
||||
// L_sq_DrawWindow(128, 24 + (Pos * 18), 108, 10, "interface/lenheartwindowcommon.img", 97, 11, 12, 11, 13);
|
||||
L_sq_DrawCode(Value.Name, 135, 28 + (Pos * 18), 0xFFFFFFFF, 1, 1);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 131, 25 + (Pos * 18), 108, 18)) {
|
||||
L_sq_DrawCode(Value.Name, 135 + YosinWorldMapX, 28 + (Pos * 18) + YosinWorldMapY, 0xFFFFFFFF, 1, 1);
|
||||
if (sq_IsIntersectRect(IMouse.GetXPos(), IMouse.GetYPos(), 1, 1, 131 + YosinWorldMapX, 25 + (Pos * 18) + YosinWorldMapY, 108, 18)) {
|
||||
MarkFlag = Pos;
|
||||
L_sq_SetDrawImgModel(2, 0);
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 16, 131, 25 + (Pos * 18));
|
||||
L_sq_DrawImg("interface/minimap_minimap_town.img", 16, 131 + YosinWorldMapX, 25 + (Pos * 18) + YosinWorldMapY);
|
||||
L_sq_ReleaseDrawImgModel();
|
||||
}
|
||||
}
|
||||
@@ -125,10 +147,9 @@ function Sq_DrawMiniMapUI(obj) {
|
||||
getroottable().rawdelete("RepairWorldMap_Obj");
|
||||
|
||||
function Lenheart_RepairWorldMap_Fun(obj) {
|
||||
return;
|
||||
local RootTab = getroottable();
|
||||
if (!RootTab.rawin("RepairWorldMap_Obj")) {
|
||||
RootTab.rawset("RepairWorldMap_Obj", LenheartNewUI_CreateWindow(RepairWorldMapC, "世界地图修补", 230, 0, 30, 30, 0));
|
||||
RootTab.rawset("RepairWorldMap_Obj", LenheartNewUI_CreateWindow(RepairWorldMapC, "世界地图修补", 230 + YosinWorldMapX, 0 + YosinWorldMapY, 30, 30, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user