| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 56 |
| 经验 | |
| 最后登录 | 2026-4-17 |
| 在线时间 | 177 小时 |
- 梦石
- 0
- 星屑
- 5626
- 在线时间
- 177 小时
- 注册时间
- 2011-6-3
- 回帖
- 29
|
发表于 2022-10-5 01:33:56
|
显示全部楼层
本帖最后由 lqi991 于 2022-10-5 15:10 编辑
# 如果图标图片没问题,那么可能 this.drawIcon 的原对象被修改了.
可以试试添加以下代码.
方法1:
[pre lang="javascript"]Window_Custom.prototype.drawIcon = function(iconIndex, x, y) {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
this.contents.blt(bitmap, sx, sy, pw, ph, x, y);
};[/pre]
方法2:
[pre lang="javascript"]Window_Custom.prototype.drawIcon = function(iconIndex, x, y) {
var bitmap = ImageManager.loadSystem('IconSet');
var pw = Window_Base._iconWidth;
var ph = Window_Base._iconHeight;
var sx = iconIndex % 16 * pw;
var sy = Math.floor(iconIndex / 16) * ph;
bitmap.addLoadListener(function(){ this.contents.blt(bitmap, sx, sy, pw, ph, x, y);}.bind(this));
};[/pre] |
|