statusBar Bottom, jump time, setAutomaticRoute

This commit is contained in:
ckcz123 2019-04-01 20:37:08 +08:00
parent ffda8bdf97
commit e6e604ee7c
2 changed files with 15 additions and 7 deletions

View File

@ -472,8 +472,14 @@ control.prototype.setAutomaticRoute = function (destX, destY, stepPostfix) {
if (this._setAutomaticRoute_isTurning(destX, destY, stepPostfix)) return; if (this._setAutomaticRoute_isTurning(destX, destY, stepPostfix)) return;
if (this._setAutomaticRoute_clickMoveDirectly(destX, destY, stepPostfix)) return; if (this._setAutomaticRoute_clickMoveDirectly(destX, destY, stepPostfix)) return;
// 找寻自动寻路路线 // 找寻自动寻路路线
var moveStep = core.automaticRoute(destX, destY).concat(stepPostfix); var moveStep = core.automaticRoute(destX, destY);
if (moveStep.length == 0) return core.deleteCanvas('route'); if (moveStep.length == 0) {
if (destX != core.status.hero.loc.x || destY != core.status.hero.loc.y)
return;
moveStep = [];
}
var moveStep = moveStep.concat(stepPostfix);
if (moveStep.length == 0) return;
core.status.automaticRoute.destX=destX; core.status.automaticRoute.destX=destX;
core.status.automaticRoute.destY=destY; core.status.automaticRoute.destY=destY;
this._setAutomaticRoute_drawRoute(moveStep); this._setAutomaticRoute_drawRoute(moveStep);
@ -2353,10 +2359,11 @@ control.prototype.updateGlobalAttribute = function (name) {
core.dom.statusBar.style.borderTop = border; core.dom.statusBar.style.borderTop = border;
core.dom.statusBar.style.borderLeft = border; core.dom.statusBar.style.borderLeft = border;
core.dom.statusBar.style.borderRight = core.domStyle.isVertical?border:''; core.dom.statusBar.style.borderRight = core.domStyle.isVertical?border:'';
core.dom.statusBar.style.borderBottom = core.domStyle.isVertical?'':border;
core.dom.gameDraw.style.border = border; core.dom.gameDraw.style.border = border;
core.dom.toolBar.style.borderBottom = border;
core.dom.toolBar.style.borderLeft = border; core.dom.toolBar.style.borderLeft = border;
core.dom.toolBar.style.borderRight = core.domStyle.isVertical?border:''; core.dom.toolBar.style.borderRight = core.domStyle.isVertical?border:'';
core.dom.toolBar.style.borderBottom = core.domStyle.isVertical?border:'';
break; break;
} }
case 'statusBarColor': case 'statusBarColor':
@ -2588,7 +2595,7 @@ control.prototype._resize_statusBar = function (obj) {
} }
else { else {
statusBar.style.width = obj.BAR_WIDTH * core.domStyle.scale + "px"; statusBar.style.width = obj.BAR_WIDTH * core.domStyle.scale + "px";
statusBar.style.height = obj.outerSize - 3 + "px"; statusBar.style.height = obj.outerSize + "px";
statusBar.style.background = obj.globalAttribute.statusLeftBackground; statusBar.style.background = obj.globalAttribute.statusLeftBackground;
// --- 计算文字大小 // --- 计算文字大小
statusBar.style.fontSize = 16 * Math.min(1, (core.__HALF_SIZE__ + 3) / obj.count) * core.domStyle.scale + "px"; statusBar.style.fontSize = 16 * Math.min(1, (core.__HALF_SIZE__ + 3) / obj.count) * core.domStyle.scale + "px";
@ -2596,6 +2603,7 @@ control.prototype._resize_statusBar = function (obj) {
statusBar.style.display = 'block'; statusBar.style.display = 'block';
statusBar.style.borderTop = statusBar.style.borderLeft = obj.border; statusBar.style.borderTop = statusBar.style.borderLeft = obj.border;
statusBar.style.borderRight = core.domStyle.isVertical ? obj.border : ''; statusBar.style.borderRight = core.domStyle.isVertical ? obj.border : '';
statusBar.style.borderBottom = core.domStyle.isVertical ? '' : obj.border;
// 自绘状态栏 // 自绘状态栏
if (core.domStyle.isVertical) { if (core.domStyle.isVertical) {
core.dom.statusCanvas.style.width = obj.outerSize - 6 + "px"; core.dom.statusCanvas.style.width = obj.outerSize - 6 + "px";
@ -2651,8 +2659,8 @@ control.prototype._resize_toolBar = function (obj) {
toolBar.style.background = 'transparent'; toolBar.style.background = 'transparent';
} }
toolBar.style.display = 'block'; toolBar.style.display = 'block';
toolBar.style.borderLeft = toolBar.style.borderBottom = obj.border; toolBar.style.borderLeft = obj.border;
toolBar.style.borderRight = core.domStyle.isVertical ? obj.border : ''; toolBar.style.borderRight = toolBar.style.borderBottom = core.domStyle.isVertical ? obj.border : '';
toolBar.style.fontSize = 16 * core.domStyle.scale + "px"; toolBar.style.fontSize = 16 * core.domStyle.scale + "px";
} }

View File

@ -1660,7 +1660,7 @@ maps.prototype.__generateJumpInfo = function (sx, sy, ex, ey, time) {
return { return {
x: sx, y: sy, ex: ex, ey: ey, px: 32 * sx, py: 32 * sy, opacity: 1, x: sx, y: sy, ex: ex, ey: ey, px: 32 * sx, py: 32 * sy, opacity: 1,
jump_peak: jump_peak, jump_count: jump_count, jump_peak: jump_peak, jump_count: jump_count,
step: 0, per_time: time / 16 / core.status.replay.speed step: 0, per_time: time / jump_count
}; };
} }