| 赞 | 0  | 
 
| VIP | 155 | 
 
| 好人卡 | 9 | 
 
| 积分 | 3 | 
 
| 经验 | 15635 | 
 
| 最后登录 | 2023-11-3 | 
 
| 在线时间 | 412 小时 | 
 
 
 
 
 
Lv2.观梦者 永遠神剣 
	- 梦石
 - 0 
 
        - 星屑
 - 334 
 
        - 在线时间
 - 412 小时
 
        - 注册时间
 - 2009-8-16
 
        - 帖子
 - 1797
 
 
  
 
 | 
	
稍微改了下 .分别定义选择项目的颜色成功了. 
如果你是所有选择项目都一样颜色的话 用上面的就行了.如果眼分别定义每个选择项目的颜色.用下面的脚本- #==============================================================================
 
 - # ■ Window_ShopCommand
 
 - #------------------------------------------------------------------------------
 
 - #  商店画面、选择要做的事的窗口
 
 - #==============================================================================
 
  
- class Window_ShopCommand < Window_Selectable
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 初始化对像
 
 -   #--------------------------------------------------------------------------
 
 -   def initialize
 
 -     super(0, 64, 480, 64)
 
 -     self.contents = Bitmap.new(width - 32, height - 32)
 
 -     @item_max = 3
 
 -     @column_max = 3
 
 -     @commands = ["买", "卖", "取消"]
 
 -     refresh
 
 -     self.index = 0
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 刷新
 
 -   #--------------------------------------------------------------------------
 
 -   def refresh
 
 -     self.contents.clear
 
 -     for i in 0...@item_max
 
 -       draw_item(i)
 
 -     end
 
 -   end
 
 -   #--------------------------------------------------------------------------
 
 -   # ● 描绘项目
 
 -   #     index : 项目编号
 
 -   #--------------------------------------------------------------------------
 
 -   def draw_item(index)
 
 -     x = 4 + index * 160
 
 -     for i in 0..index
 
 -       # 买的字体颜色
 
 -     if i == 0 
 
 -       self.contents.font.color = Color.new(255,0,0)
 
 -       # 卖的字体颜色
 
 -     elsif i == 1
 
 -       self.contents.font.color = Color.new(0,255,0)
 
 -       # 取消的字体颜色
 
 -     elsif i == 2
 
 -       self.contents.font.color = Color.new(0,0,255)
 
 -     end
 
 -     self.contents.draw_text(x, 0, 128, 32, @commands[index])
 
 -     end
 
 -   end
 
 - end
 
 
  复制代码 |   
 
 
 
 |