| 赞 | 0  | 
 
| VIP | 0 | 
 
| 好人卡 | 0 | 
 
| 积分 | 1 | 
 
| 经验 | 0 | 
 
| 最后登录 | 2021-6-10 | 
 
| 在线时间 | 42 小时 | 
 
 
 
 
 
Lv1.梦旅人 
	- 梦石
 - 0 
 
        - 星屑
 - 99 
 
        - 在线时间
 - 42 小时
 
        - 注册时间
 - 2021-5-14
 
        - 帖子
 - 34
 
 
 
 | 
	
9楼
 
 
 楼主 |
发表于 2021-6-2 17:10:34
|
只看该作者
 
 
 
 
感谢您的回复,那如果给图标加一个边框该怎么实现呢,我做的是那种网游式ui,只有图标,没有名称和消耗。 
,现在不知道怎么现实,把选中的图标标识出来 
/*:============================================================================= 
* @plugindesc v1.0 技能图标 
* @author Ek.MoMo 
=============================================================================*/ 
//要使用技能图标的话在技能备注里写<icon:filename>(如<icon:06>表示使用img/skills/06.png作为技能图),不备注默认使用系统图标。 
var Yanfly = Yanfly || {}; 
Yanfly.MoMo = Yanfly.MoMo || {}; 
Yanfly.MoMo.Scene_Battle_start = Scene_Battle.prototype.start; 
Scene_Battle.prototype.start = function() { 
        Yanfly.MoMo.Scene_Battle_start.call(this); 
        $gameParty.battleMembers().forEach(function(actor){ 
                actor._skills.forEach(function(id){ 
                        var icon = $dataSkills[id].meta.icon; 
                        if (icon){ 
                                var bitmap = ImageManager.loadNormalBitmap('img/skills/' + icon + ".png", 0); 
                        } 
                }); 
        }); 
}; 
 
Window_BattleSkill.prototype.drawItemName = function(item, x, y, width) { 
    width = 96; 
    if (item) { 
        var iconBoxWidth = Window_Base._iconWidth + 4; 
        this.resetTextColor(); 
                if (item.meta.icon){ 
                this.drawIconEx(item.meta.icon, x , y ); 
                }else{ 
        this.drawIcon(item.iconIndex, x , y ); 
                } 
                //选项内的内容字体为18,居中 
                //this.contents.fontSize = 18; 
                //this.drawText( x, y + 64, width, 'center'); 
    } 
        //         this.drawText(item.name, x, y + 64, width, 'center'); 
    // } 
}; 
Window_BattleSkill.prototype.drawIconEx = function(icon, x, y) { 
    var bitmap = ImageManager.loadNormalBitmap('img/skills/' + icon + ".png", 0); 
        var width = bitmap.width; 
        var height = bitmap.height; 
        //修改图标的大小 
    this.contents.bltImage(bitmap, 0, 0, width, height, x, y, 48, 48,); 
}; 
Window_BattleSkill.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, 48, 48,); 
}; 
Window_BattleSkill.prototype.itemWidth = function() { 
         
        return 52; 
}; 
Window_BattleSkill.prototype.itemHeight = function(x, y,) { 
        return 52; 
}; 
Window_BattleSkill.prototype.maxCols = function() { 
        return 6; 
}; 
Window_BattleSkill.prototype.spacing = function() { 
        return 1; 
}; 
Window_BattleSkill.prototype.itemRect = function(index) { 
        var rect = Window_Selectable.prototype.itemRect.call(this, index); 
        rect.x += 8; 
        rect.y += 24; 
        return rect; 
}; |   
 
 
 
 |