font bold
This commit is contained in:
parent
26ce1f9048
commit
3dd292e853
@ -394,12 +394,12 @@ core.updateViewport()
|
||||
根据大地图的偏移量来更新窗口的视野范围。
|
||||
|
||||
|
||||
core.nextX(n) / core.nextY(m)
|
||||
core.nextX(n) / core.nextY(n)
|
||||
获得勇士面对的第n个位置的横纵坐标。n可不填,默认为1。
|
||||
|
||||
|
||||
core.nearHero(x, y)
|
||||
判定某个点是否和勇士的距离不大于1。
|
||||
core.nearHero(x, y, n)
|
||||
判定某个点是否和勇士的距离不大于n。n可不填,默认为1。
|
||||
|
||||
|
||||
core.gatherFollowers()
|
||||
|
||||
@ -856,17 +856,20 @@ control.prototype.updateViewport = function() {
|
||||
|
||||
////// 获得勇士面对位置的x坐标 //////
|
||||
control.prototype.nextX = function(n) {
|
||||
return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*(n||1);
|
||||
if (n == null) n = 1;
|
||||
return core.getHeroLoc('x')+core.utils.scan[core.getHeroLoc('direction')].x*n;
|
||||
}
|
||||
|
||||
////// 获得勇士面对位置的y坐标 //////
|
||||
control.prototype.nextY = function (n) {
|
||||
return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*(n||1);
|
||||
if (n == null) n = 1;
|
||||
return core.getHeroLoc('y')+core.utils.scan[core.getHeroLoc('direction')].y*n;
|
||||
}
|
||||
|
||||
////// 某个点是否在勇士旁边 //////
|
||||
control.prototype.nearHero = function (x, y) {
|
||||
return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=1;
|
||||
control.prototype.nearHero = function (x, y, n) {
|
||||
if (n == null) n = 1;
|
||||
return Math.abs(x-core.getHeroLoc('x'))+Math.abs(y-core.getHeroLoc('y'))<=n;
|
||||
}
|
||||
|
||||
////// 聚集跟随者 //////
|
||||
|
||||
@ -431,6 +431,7 @@ events.prototype._sys_getItem = function (data, callback) {
|
||||
|
||||
////// 获得某个物品 //////
|
||||
events.prototype.getItem = function (id, num, x, y, callback) {
|
||||
if (num == null) num = 1;
|
||||
num = num || 1;
|
||||
var itemCls = core.material.items[id].cls;
|
||||
core.items.getItemEffect(id, num);
|
||||
|
||||
11
libs/ui.js
11
libs/ui.js
@ -588,14 +588,15 @@ ui.prototype.drawTextContent = function (ctx, content, config) {
|
||||
ctx = core.getContextByName(ctx);
|
||||
if (!ctx) return;
|
||||
// 设置默认配置项
|
||||
var textAttribute = core.status.textAttribute || core.initStatus.textAttribute;
|
||||
config = core.clone(config || {});
|
||||
config.left = config.left || 0;
|
||||
config.right = config.left + (config.maxWidth == null ? ctx.canvas.width : config.maxWidth);
|
||||
config.top = config.top || 0;
|
||||
config.color = config.color || core.arrayToRGBA(core.status.textAttribute.text);
|
||||
config.bold = config.bold || false;
|
||||
config.align = config.align || core.status.textAttribute.align || "left";
|
||||
config.fontSize = config.fontSize || core.status.textAttribute.textfont;
|
||||
config.color = config.color || core.arrayToRGBA(textAttribute.text);
|
||||
if (config.bold == null) config.bold = textAttribute.bold;
|
||||
config.align = config.align || textAttribute.align || "left";
|
||||
config.fontSize = config.fontSize || textAttribute.textfont;
|
||||
config.lineHeight = config.lineHeight || (config.fontSize * 1.3);
|
||||
config.time = config.time || 0;
|
||||
|
||||
@ -783,7 +784,7 @@ ui.prototype.drawTextBox = function(content, showAll) {
|
||||
var isWindowSkin = this.drawBackground(hPos.left, vPos.top, hPos.right, vPos.bottom, pInfo);
|
||||
var alpha = isWindowSkin ? 0.85 : textAttribute.background[3];
|
||||
|
||||
// Step 4: 绘制标题、头像、
|
||||
// Step 4: 绘制标题、头像、动画
|
||||
var content_top = this._drawTextBox_drawTitleAndIcon(titleInfo, hPos, vPos, alpha);
|
||||
|
||||
// Step 5: 绘制正文
|
||||
|
||||
Loading…
Reference in New Issue
Block a user