Compare commits

..

No commits in common. "1e199445a0c5484ef0dc9a898826b7204482dd9e" and "30b7d298ab9064dc8fceec3d251120ad64cf1182" have entirely different histories.

5 changed files with 23 additions and 115 deletions

View File

@ -377,7 +377,6 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"wangyuexiao.png", "wangyuexiao.png",
"winskin.png", "winskin.png",
"winskin2.png", "winskin2.png",
"winskin3.png",
"wupin.png", "wupin.png",
"xialouti.png", "xialouti.png",
"xianzi.png", "xianzi.png",

View File

@ -1647,13 +1647,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
core.dom.caidan1Ctx.drawImage(core.material.images.images['caidan_grayscale.png'], 0, 0) core.dom.caidan1Ctx.drawImage(core.material.images.images['caidan_grayscale.png'], 0, 0)
return; return;
} }
//手册和道具栏画面背景
if (core.status.event.id === 'book' || core.status.event.id === 'toolbox') {
core.dom.caidan1Ctx.drawImage(core.material.images.images['black.png'], 0, 0)
core.drawWindowSkin('winskin.png', core.dom.caidan1Ctx, -20, 0, 201, 290);
core.drawWindowSkin('winskin.png', core.dom.caidan1Ctx, 0, 290, 161, 95);
core.drawWindowSkin('winskin.png', core.dom.caidan1Ctx, 0, 385, 161, 95);
}
if (core.flags.statusCanvas) { // 系统开关「自绘状态栏」开启 if (core.flags.statusCanvas) { // 系统开关「自绘状态栏」开启
@ -1694,40 +1687,20 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
fill(core.getFlag("juqing", 0), 107, 91 + 35 + 36 + 34 + 32 + 32, '#FF0000'); fill(core.getFlag("juqing", 0), 107, 91 + 35 + 36 + 34 + 32 + 32, '#FF0000');
ctx.textAlign = 'left'; ctx.textAlign = 'left';
if (flags.hard - 4) fill1('[' + core.formatBigNumber(core.getRealStatus('mdef')) + ']', 76, 174, '#FF1495'); if (flags.hard - 4) fill1('[' + core.formatBigNumber(core.getRealStatus('mdef')) + ']', 76, 174, '#FF1495');
if (core.status.event.id !== 'book' && core.status.event.id !== 'toolbox') { core.drawImage(ctx, core.material.images.items, 0, 0, 32, 128, 13, 300, 28, 112);
core.drawImage(ctx, core.material.images.items, 0, 0, 32, 128, 13, 300, 28, 112); fill('黄钥匙', 50, 320, '#FFFF80');
fill('黄钥匙', 50, 320, '#FFFF80'); fill('蓝钥匙', 50, 320 + 28, '#80FFFF');
fill('蓝钥匙', 50, 320 + 28, '#80FFFF'); fill('红钥匙', 50, 320 + 56, '#FF8080');
fill('红钥匙', 50, 320 + 56, '#FF8080'); fill('黑钥匙', 50, 320 + 84, '#000000');
fill('黑钥匙', 50, 320 + 84, '#000000'); ctx.textAlign = 'right';
ctx.textAlign = 'right'; fill(core.itemCount('yellowKey'), 140, 320, '#FFFF80');
fill(core.itemCount('yellowKey'), 140, 320, '#FFFF80'); fill(core.itemCount('blueKey'), 140, 320 + 28, '#80FFFF');
fill(core.itemCount('blueKey'), 140, 320 + 28, '#80FFFF'); fill(core.itemCount('redKey'), 140, 320 + 56, '#FF8080');
fill(core.itemCount('redKey'), 140, 320 + 56, '#FF8080'); fill(core.itemCount('greenKey'), 140, 320 + 84, '#000000');
fill(core.itemCount('greenKey'), 140, 320 + 84, '#000000'); core.drawImage(ctx, core.material.images.images[['00005.png', '00001.png', '00002.png', '00003.png', '00004.png', '00005.png'][flags.hard || 0]], 7, 404 - [0, 10, 10, 0, 0, 0][flags.hard || 0]);
core.drawImage(ctx, core.material.images.images[['00005.png', '00001.png', '00002.png', '00003.png', '00004.png', '00005.png'][flags.hard || 0]], 7, 404 - [0, 10, 10, 0, 0, 0][flags.hard || 0]); ctx.textAlign = 'left';
ctx.textAlign = 'left'; if (flags.poison) fill("中毒", 8, 282, '#00CD00');
if (flags.poison) fill("中毒", 8, 282, '#00CD00'); if (flags.weak) fill("衰弱", 64, 282, '#FF1493');
if (flags.weak) fill("衰弱", 64, 282, '#FF1493');
} else {
core.drawWindowSkin('winskin3.png', ctx, 0, 0, 181, 290);
fill('游戏时间', 20, 330, '#c0e0ff');
fill('步数', 20, 425, '#c0e0ff');
ctx.textAlign = 'right';
var hour = Math.floor(core.animateFrame.totalTime / (1000 * 60 * 60)) % 24,
minutes = Math.floor(core.animateFrame.totalTime / (1000 * 60)) % 60,
seconds = Math.floor(core.animateFrame.totalTime / 1000) % 60,
day = Math.floor(core.animateFrame.totalTime / (1000 * 60 * 60 * 24)),
step = core.status.hero.steps;
hour = hour < 10 ? '0' + hour : hour;
minutes = minutes < 10 ? '0' + minutes : minutes;
seconds = seconds < 10 ? '0' + seconds : seconds;
if (day >= 1)
fill(day + ':' + hour + ':' + minutes + ':' + seconds, 140, 360, "#ffffff");
else
fill(hour + ':' + minutes + ':' + seconds, 140, 360, "#ffffff");
fill(step, 140, 455, '#ffffff');
}
} }
} else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏 } else if (core.flags.extendToolbar && !core.domStyle.isVertical) { // 横屏且隐藏状态栏
if (!core.dymCanvas['status']) if (!core.dymCanvas['status'])

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

View File

@ -4,19 +4,19 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "tools", "cls": "tools",
"name": "黄钥匙", "name": "黄钥匙",
"text": "用来开黄色的门", "text": "用来开黄色的门",
"hideInToolbox": false "hideInToolbox": true
}, },
"blueKey": { "blueKey": {
"cls": "tools", "cls": "tools",
"name": "蓝钥匙", "name": "蓝钥匙",
"text": "用来开蓝色的门", "text": "用来开蓝色的门",
"hideInToolbox": false "hideInToolbox": true
}, },
"redKey": { "redKey": {
"cls": "tools", "cls": "tools",
"name": "红钥匙", "name": "红钥匙",
"text": "用来开红色的门", "text": "用来开红色的门",
"hideInToolbox": false "hideInToolbox": true
}, },
"redGem": { "redGem": {
"cls": "items", "cls": "items",
@ -310,15 +310,15 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"book": { "book": {
"cls": "constants", "cls": "constants",
"name": "怪物手册", "name": "怪物手册",
"text": "持有后可以察看怪物信息", "text": "可以查看当前楼层各怪物属性",
"hideInToolbox": false, "hideInToolbox": true,
"useItemEffect": "core.ui.drawBook(0);", "useItemEffect": "core.ui.drawBook(0);",
"canUseItemEffect": "true" "canUseItemEffect": "true"
}, },
"fly": { "fly": {
"cls": "constants", "cls": "constants",
"name": "楼层传送器", "name": "楼层传送器",
"text": "在访问过的楼层间任意往来快捷键g", "text": "可以自由往来去过的楼层",
"hideInReplay": true, "hideInReplay": true,
"hideInToolbox": false, "hideInToolbox": false,
"useItemEffect": "core.ui.drawFly(core.floorIds.indexOf(core.status.floorId));", "useItemEffect": "core.ui.drawFly(core.floorIds.indexOf(core.status.floorId));",
@ -363,7 +363,7 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"greenKey": { "greenKey": {
"cls": "tools", "cls": "tools",
"name": "黑钥匙", "name": "黑钥匙",
"text": "用来开黑色的门" "text": "可以打开一扇黑门"
}, },
"steelKey": { "steelKey": {
"cls": "tools", "cls": "tools",

View File

@ -850,7 +850,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.clearMap('bookBg'); ////清空手册Bg core.clearMap('bookBg'); ////清空手册Bg
core.clearMap('itemBg'); ////清空道具栏Bg core.clearMap('itemBg'); ////清空道具栏Bg
core.clearUIEventSelector(1); ////清除绘制的光标 core.clearUIEventSelector(1); ////清除绘制的光标
core.clearUIEventSelector(2);
if (core.status.hero && core.status.hero.flags) { if (core.status.hero && core.status.hero.flags) {
// 清除全部临时变量 // 清除全部临时变量
Object.keys(core.status.hero.flags).forEach(function (name) { Object.keys(core.status.hero.flags).forEach(function (name) {
@ -879,71 +879,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
/// core.setAlpha('ui', 0.85); /// core.setAlpha('ui', 0.85);
/// core.fillRect('ui', 0, 0, core._PX_, core._PY_, '#000000'); /// core.fillRect('ui', 0, 0, core._PX_, core._PY_, '#000000');
core.createCanvas('itemBg', 0, 0, 480, 480, 138); ///创建一个动态画布用于绘制道具栏bg core.createCanvas('itemBg', 0, 0, 480, 480, 138); ///创建一个动态画布用于绘制道具栏bg
core.drawWindowSkin('winskin.png', 'itemBg', 0, 0, core._PX_, core._PY_ - 306); ///道具栏背景用winskin绘制 core.drawWindowSkin('winskin.png', 'itemBg', 0, 0, core._PX_, core._PY_); ///道具栏背景用winskin绘制
core.drawWindowSkin('winskin.png', 'itemBg', 0, core._PY_ - 306 - 20, core._PX_, core._PY_ - 306);
core.drawWindowSkin('winskin.png', 'itemBg', 0, core._PY_ - 146 - 30, core._PX_, core._PY_ - 306);
}
////// 绘制道具栏 //////
ui.prototype._drawToolbox = function (index) {
var info = this._drawToolbox_getInfo(index);
this._drawToolbox_drawBackground();
// 绘制线
core.setAlpha('ui', 1);
core.setStrokeStyle('ui', '#DDDDDD');
core.canvas.ui.lineWidth = 2;
core.canvas.ui.strokeWidth = 2;
core.setTextAlign('ui', 'right');
var line1 = core._PY_ - 306;
// this._drawToolbox_drawLine(line1, "消耗道具");
var line2 = core._PY_ - 146;
// this._drawToolbox_drawLine(line2, "永久道具");
this._drawToolbox_drawDescription(info, line1);
this._drawToolbox_drawContent(info, line1, info.tools, info.toolsPage, true);
this.drawPagination(info.toolsPage, info.toolsTotalPage, core._HEIGHT_ - 6);
this._drawToolbox_drawContent(info, line2, info.constants, info.constantsPage);
this.drawPagination(info.constantsPage, info.constantsTotalPage);
core.setTextAlign('ui', 'center');
core.fillText('ui', '[装备栏]', core._PX_ - 46, 25, '#DDDDDD', this._buildFont(15, true));
core.fillText('ui', '返回游戏', core._PX_ - 46, core._PY_ - 13);
}
ui.prototype._drawToolbox_drawDescription = function (info, max_height) {
core.setTextAlign('ui', 'left');
if (!info.selectId) return;
var item = core.material.items[info.selectId];
var name = item.name || "未知道具";
try { name = core.replaceText(name); } catch (e) {}
core.fillText('ui', name, 10 + 10, 32 + 10, "#ffffff", this._buildFont(20, true));
core.drawUIEventSelector(2, 'winskin.png', 15, 32 - 10, 25 * name.length || 0, 30, 139);
var text = item.text || "该道具暂无描述。";
try { text = core.replaceText(text); } catch (e) {}
var height = null;
for (var fontSize = 20; fontSize >= 9; fontSize -= 2) {
var config = { left: 10 + 10, top: 46 + 20, fontSize: fontSize, maxWidth: core._PX_ - 15, bold: true, color: "white" };
height = 42 + core.getTextContentHeight(text, config);
if (height < max_height || fontSize == 9) {
core.drawTextContent('ui', text, config);
break;
}
}
if (height < max_height - 33) {
core.fillText('ui', '<继续点击该道具即可进行使用>', 10 + 10, max_height - 15 - 10, '#CCCCCC', this._buildFont(14, false));
}
}
////// 点击工具栏时的打开操作 //////
events.prototype.openToolbox = function (fromUserAction) {
if (core.isReplaying()) return;
if (!this._checkStatus('toolbox', fromUserAction)) return;
core.playSound('打开界面');
core.updateStatusBar(); ///更新状态栏以绘制工具栏时的状态栏背景
core.ui._drawToolbox();
} }
ui.prototype._drawToolbox_drawContent = function (info, line, items, page, drawCount) { ui.prototype._drawToolbox_drawContent = function (info, line, items, page, drawCount) {