| 赞 | 4 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-9-1 |
| 在线时间 | 2276 小时 |
路人党员
- 梦石
- 0
- 星屑
- 52
- 在线时间
- 2276 小时
- 注册时间
- 2010-12-30
- 回帖
- 3011
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 英顺的马甲 于 2015-10-26 16:21 编辑
请自行定义gamefont.css里的@font-face,不会css的就自个儿学。
[pre lang="javascript" file="Fonts.js"]//=============================================================================
// Fonts.js
//=============================================================================
/*:
* @plugindesc Change game default fonts and waiting fonts to load
* @author 0nepeop1e
*
* @param Bitmap Font
* @desc Default font face used for bitmap in game.
* @default GameFont
*
* @param Window Font
* @desc Default font face used for window in game.
* @default GameFont
*
* @param Fonts
* @desc List of font face definded in gamefont.css, seperate with ';'
* @default GameFont
*/
(function(pm){
ft = {};
ft.bitmapFont = pm.parameters('Fonts')["Bitmap Font"] || "GameFont";
ft.windowFont = pm.parameters('Fonts')["Window Font"] || "GameFont";
ft.fontsList = (pm.parameters('Fonts')["Fonts"] || "GameFont").split(";");
Scene_Boot.prototype.isGameFontLoaded = function() {
var loaded = Graphics.isFontLoaded(ft.fontsList[0]);
for(var i = 1; i < ft.fontsList.length; i++)
loaded = loaded && Graphics.isFontLoaded(ft.fontsList);
if (loaded) {
return true;
} else {
var elapsed = Date.now() - this._startDate;
if (elapsed >= (20000 * ft.fontsList.length)) {
throw new Error('Failed to load Fonts');
}
}
};
ft._initBitmap = Bitmap.prototype.initialize;
Bitmap.prototype.initialize = function(){
ft._initBitmap.apply(this, arguments);
this.fontFace = ft.bitmapFont;
};
Window_Base.prototype.standardFontFace = function() {
return ft.windowFont;
};
})(PluginManager);[/pre] |
评分
-
查看全部评分
|