feat: 楼传界面额外功能
This commit is contained in:
parent
e976931949
commit
c4d5780f1c
@ -1291,20 +1291,13 @@ function _hideFly(floorId) {
|
|||||||
core.setFlag('hideFloors', hideFloors);
|
core.setFlag('hideFloors', hideFloors);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (Object.keys(hideFloors).length <= 1) {
|
|
||||||
core.drawFailTip('当前无法执行隐藏操作!');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
hideFloors[floorId] = true;
|
hideFloors[floorId] = true;
|
||||||
}
|
}
|
||||||
core.setFlag('hideFloors', hideFloors);
|
core.setFlag('hideFloors', hideFloors);
|
||||||
}
|
}
|
||||||
|
|
||||||
function _hideFlyMode() {
|
|
||||||
core.setFlag('noHideFly', !core.hasFlag('noHideFly'));
|
|
||||||
}
|
|
||||||
|
|
||||||
function _isFloorHided(floorId) {
|
function _isFloorHided(floorId) {
|
||||||
|
if (floorId === core.status.floorId) return false; // 当前所在层需要无条件显示
|
||||||
return !core.hasFlag('noHideFly') && core.getFlag('hideFloors', {}).hasOwnProperty(floorId);
|
return !core.hasFlag('noHideFly') && core.getFlag('hideFloors', {}).hasOwnProperty(floorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1318,8 +1311,14 @@ actions.prototype._clickFly = function (x, y) {
|
|||||||
const floorId = core.floorIds[core.status.event.data];
|
const floorId = core.floorIds[core.status.event.data];
|
||||||
if (x >= 0 && x <= this.HSIZE + 3 && y >= 3 && y <= this.LAST - 1)
|
if (x >= 0 && x <= this.HSIZE + 3 && y >= 3 && y <= this.LAST - 1)
|
||||||
core.flyTo(floorId);
|
core.flyTo(floorId);
|
||||||
if (x >= 1 && x <= 2 && y === 2) _hideFly(floorId);
|
if (x >= 1 && x <= 2 && y === 2) {
|
||||||
if (x >= 3 && x <= 6 && y === 2) _hideFlyMode();
|
_hideFly(floorId);
|
||||||
|
core.ui.drawFly(core.status.event.data);
|
||||||
|
}
|
||||||
|
if (x >= 3 && x <= 6 && y === 2) {
|
||||||
|
core.setFlag('noHideFly', !core.hasFlag('noHideFly'));
|
||||||
|
core.ui.drawFly(core.status.event.data);
|
||||||
|
}
|
||||||
if (x >= 7 && x <= 8 && y === 2) {
|
if (x >= 7 && x <= 8 && y === 2) {
|
||||||
core.myprompt("请输入一段笔记,字数不要过多。", null, function (data) {
|
core.myprompt("请输入一段笔记,字数不要过多。", null, function (data) {
|
||||||
if (data) {
|
if (data) {
|
||||||
|
|||||||
@ -2564,7 +2564,7 @@ ui.prototype.drawFly = function (page) {
|
|||||||
const noHideFly = core.hasFlag('noHideFly');
|
const noHideFly = core.hasFlag('noHideFly');
|
||||||
|
|
||||||
core.fillText('ui', isHide ? '[显示本层]' : '[隐藏本层]', 60, 80, '#EEEEEE', this._buildFont(12, false));
|
core.fillText('ui', isHide ? '[显示本层]' : '[隐藏本层]', 60, 80, '#EEEEEE', this._buildFont(12, false));
|
||||||
core.fillText('ui', '[显示隐藏层:' + noHideFly ? 'ON' : 'OFF' + ']', 160, 80, '#EEEEEE', this._buildFont(12, false));
|
core.fillText('ui', '[显示隐藏层:' + (noHideFly ? 'ON' : 'OFF') + ']', 160, 80, '#EEEEEE', this._buildFont(12, false));
|
||||||
core.fillText('ui', '[楼层笔记]', 260, 80, '#EEEEEE', this._buildFont(12, false));
|
core.fillText('ui', '[楼层笔记]', 260, 80, '#EEEEEE', this._buildFont(12, false));
|
||||||
|
|
||||||
var middle = this.HPIXEL + 39;
|
var middle = this.HPIXEL + 39;
|
||||||
@ -2592,7 +2592,7 @@ ui.prototype.drawFly = function (page) {
|
|||||||
var size = this.PIXEL - 143;
|
var size = this.PIXEL - 143;
|
||||||
|
|
||||||
core.strokeRect('ui', 20, 100, size, size, '#FFFFFF', 2);
|
core.strokeRect('ui', 20, 100, size, size, '#FFFFFF', 2);
|
||||||
if (isHide) core.setAlpha('ui', 0.8);
|
if (isHide) core.setAlpha('ui', 0.6);
|
||||||
core.drawThumbnail(floorId, null, { ctx: 'ui', x: 20, y: 100, size: size, damage: true });
|
core.drawThumbnail(floorId, null, { ctx: 'ui', x: 20, y: 100, size: size, damage: true });
|
||||||
if (isHide) core.setAlpha('ui', 1);
|
if (isHide) core.setAlpha('ui', 1);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user