font bold
This commit is contained in:
1 parent
26ce1f9048
commit
3dd292e853
4 files changed
+17
-12
No files matched your search
+7
-4
@@ -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);
|
||||
|
||||
+6
-5
@@ -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: 绘制正文
|
||||
|
||||
Reference in new issue
Block a user