# ▽△▽ XRXSv10. MeLT-VX.MC1. コマンドストリーム ▽△▽ # # publish 2010/ 3/ 7 # update - /27 # #============================================================================== # メニューコマンド #============================================================================== class Window_SlideCommand < Window_Command # # 縁取り色 # HEMCOLOR = Color.new(0, 48, 64, 255) #-------------------------------------------------------------------------- # 初期位置 #-------------------------------------------------------------------------- def initialize(width, commands) super self.x = -12 self.y = 72 @clear_style = ((XRXSV10::BG_NAME rescue "").size >= 1) self.opacity = (@clear_style ? 0 : 255) slidein! end #-------------------------------------------------------------------------- # リフレッシュ #-------------------------------------------------------------------------- def refresh self.contents.clear for i in 0...@item_max draw_item(i, enabled?(i)) end contents_split!(false) end #-------------------------------------------------------------------------- # ○ 項目の描画 #-------------------------------------------------------------------------- def draw_item(index, enabled = true) text = @commands[index] y = 1 + WLH * index w = self.contents.width - 4 self.contents.font.color.alpha = enabled ? 255 : 128 self.contents.draw_hemming_text(0, y, w, WLH - 2, text, 1, HEMCOLOR) end end