设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 9667|回复: 16
打印 上一主题 下一主题

[有事请教] mv求教,如何实现,列表中未选中的图标为灰色

[复制链接]

Lv1.梦旅人

梦石
0
星屑
99
在线时间
42 小时
注册时间
2021-5-14
帖子
34
跳转到指定楼层
1
发表于 2021-6-2 15:26:18 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式
50星屑

最佳答案

查看完整内容

逻辑不太一样 sprite.alpha = 1 显示 sprite.alpha = 0 隐藏

Lv3.寻梦者

梦石
0
星屑
4692
在线时间
654 小时
注册时间
2021-3-24
帖子
517
2
发表于 2021-6-2 15:26:19 | 只看该作者
  1.     /**显示卡牌*/
  2.     Window_Limpid_MarketCardanime.prototype.printcard = function (i) {
  3.         var card = LIM.CardData.data_Cardmap.get(this._trum[this._cardind][i])
  4.         var color = LIM.CardTool.getcard_color(card.id)
  5.         var cost = LIM.CardTool.getcard_cost(card.num)
  6.         var mold = LIM.CardTool.getcard_mold(card.type)

  7.         var index = this._trumnum - i - 1

  8.         this.limpidsprite.box[index].bitmap = ImageManager.loadCard("ui/card_" + LIM.CardTool.box_mold(mold) + "_" + LIM.CardTool.box_color(color))
  9.         this.limpidsprite.box[index]._colorTone = [0, 0, 0, 255];
  10.         this.limpidsprite.box[index]._refresh()


  11.         this.limpidsprite.picture[index].bitmap = ImageManager.loadCard("port/card_000")
  12.         this.limpidsprite.picture[index]._blendColor = [0, 0, 0, 255]
  13.         this.limpidsprite.picture[index].alpha = 1
  14.         this.limpidsprite.picture[index]._refresh()

  15.         this.limpidsprite.name[index].x = 200 * parseInt(index % 5) + ((10 - card.name.length) * 4.25) + 60
  16.         this.limpidsprite.name[index].bitmap.drawText(card.name, 0, 0, 120, 20, "left");

  17.         this.limpidsprite.cost[index].bitmap.drawText(cost, 0, 0, 40, 40, "center");
  18.         if (color < 3) {
  19.             this.limpidsprite.light[index].bitmap = ImageManager.loadCard("special/flashlight")
  20.             this.limpidsprite.light[index].alpha = 1
  21.             this.gold.push(index)
  22.         }
  23.         if (color < 2) {
  24.             this.limpidsprite.ring[index].bitmap = ImageManager.loadCard("special/ring")
  25.             this.limpidsprite.ring[index].alpha = 1
  26.             this.legend.push(index)
  27.         }

  28.         if (10 % mold == 0) {
  29.             this.limpidsprite.atk[index].bitmap.drawText(LIM.CardTool.getcard_atk(card.num), 0, 0, 50, 25, "center");
  30.             this.limpidsprite.hp[index].bitmap.drawText(LIM.CardTool.getcard_hp(card.num), 0, 0, 50, 25, "center");
  31.         }
  32.     };
复制代码

逻辑不太一样  
   sprite.alpha = 1
显示
    sprite.alpha = 0
隐藏

评分

参与人数 1+1 收起 理由
岸波白野 + 1 我很赞同

查看全部评分

全家活光光~
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9308
在线时间
1840 小时
注册时间
2020-1-2
帖子
1082
3
发表于 2021-6-2 15:37:04 | 只看该作者
没看懂你的问题  什么列表
B站没人气的夏目漠漠,直播间:5378938实用插件教程点击红字传送
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
99
在线时间
42 小时
注册时间
2021-5-14
帖子
34
4
 楼主| 发表于 2021-6-2 15:45:10 | 只看该作者
xiamumomo 发表于 2021-6-2 15:37
没看懂你的问题  什么列表

技能列表,主要是想实现
在战斗中,在技能列表中选择技能的时候,被选中的技能的图标有我自己设计的边框
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9308
在线时间
1840 小时
注册时间
2020-1-2
帖子
1082
5
发表于 2021-6-2 16:06:43 | 只看该作者
如果是这个样子MOG战斗UI-角色窗口插件论坛搜应该是这个

QQ图片20210602155941.png (351.29 KB, 下载次数: 9)

QQ图片20210602155941.png

点评

小爱丽丝依旧可爱  发表于 2021-6-2 17:37
B站没人气的夏目漠漠,直播间:5378938实用插件教程点击红字传送
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
99
在线时间
42 小时
注册时间
2021-5-14
帖子
34
6
 楼主| 发表于 2021-6-2 16:19:29 | 只看该作者
xiamumomo 发表于 2021-6-2 16:06
如果是这个样子MOG战斗UI-角色窗口插件论坛搜应该是这个

很感谢您的耐心回复。
我是想知道如果自己写插件该怎么实现。
回复

使用道具 举报

Lv4.逐梦者

梦石
0
星屑
9308
在线时间
1840 小时
注册时间
2020-1-2
帖子
1082
7
发表于 2021-6-2 16:42:15 | 只看该作者
岸波白野 发表于 2021-6-2 16:19
很感谢您的耐心回复。
我是想知道如果自己写插件该怎么实现。

不好意思似乎是  主菜单选项外框插件  至于你要自己写  我无能为力  你可以参考一下他的插件
B站没人气的夏目漠漠,直播间:5378938实用插件教程点击红字传送
回复

使用道具 举报

Lv3.寻梦者

梦石
0
星屑
4692
在线时间
654 小时
注册时间
2021-3-24
帖子
517
8
发表于 2021-6-2 16:53:11 | 只看该作者
Sprite和Bitmap都有透明度和颜色   
调一下 变灰是color =#555
具体怎么加看你菜单怎么写的
全家活光光~
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
99
在线时间
42 小时
注册时间
2021-5-14
帖子
34
9
 楼主| 发表于 2021-6-2 17:10:34 | 只看该作者
清澈淌漾 发表于 2021-6-2 16:53
Sprite和Bitmap都有透明度和颜色   
调一下 变灰是color =#555
具体怎么加看你菜单怎么写的 ...

感谢您的回复,那如果给图标加一个边框该怎么实现呢,我做的是那种网游式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;
};
回复

使用道具 举报

Lv1.梦旅人

梦石
0
星屑
99
在线时间
42 小时
注册时间
2021-5-14
帖子
34
10
 楼主| 发表于 2021-6-2 17:11:07 | 只看该作者
xiamumomo 发表于 2021-6-2 16:42
不好意思似乎是  主菜单选项外框插件  至于你要自己写  我无能为力  你可以参考一下他的插件 ...

非常感谢!,我去查一下相关的东西
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-5-10 20:31

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表