# ▽△▽ XRXSv27. MeLT_File.DF2. スロットインフォ ▽△▽ # # publish 2010/ 3/22 # update - 11/ 1/ 6 # #============================================================================== # データファイルリストウィンドウ #============================================================================== class Window_DataFiles < Window_Selectable WLH = 24 def create_width return 128 end def draw_item_to(bitmap, y, index) gamedata = @data[index] rect = item_rect(index) h = rect.height if gamedata != nil and gamedata.file_exist bitmap.font.color = normal_color else bitmap.font.color = normal_color bitmap.font.color.alpha = 128 end bitmap.font.size = 16 if gamedata == nil bitmap.draw_text(20, y, 72, h, "Loading.") else bitmap.draw_text(20, y, 24, h, "No.") bitmap.font.size = 20 bitmap.draw_text(44, y, 32, h, (index + 1).to_s, 2) end end end #============================================================================== # データインフォメーションウィンドウ #============================================================================== class Window_DataInfomation < Window_Base def initialize super(288, 76, 256, 272) end def refresh self.contents.clear return if @gamedata == nil if @gamedata.file_exist self.contents.font.color = normal_color else self.contents.font.color = normal_color self.contents.font.color.alpha = 160 end self.contents.font.size = 16 self.contents.draw_text(20, 0, 24, WLH, "No.") self.contents.font.size = 22 self.contents.draw_text(44, 0, 24, WLH, (@gamedata.file_index+1).to_s, 2) self.contents.font.size = 20 if @gamedata.file_exist self.contents.draw_text(16, WLH*1, 192, WLH, @gamedata.game_map.name) rescue nil max = (Game_Party::MAX_MEMBERS) backs = (Game_Party::BACKWARD_MEMBERS rescue (max - 4)) fronts = [max - backs, 6].min for i in 0...@gamedata.game_party.members.size actor = @gamedata.game_party.members[i] x = (i % fronts) * 32 + 16 + 16 n = (i < fronts ? 0 : (i < fronts + 6 ? 1 : 2)) y = n * 32 + 64 + 32 draw_actor_graphic(actor, x, y) end base_actor = @gamedata.game_party.members[0] if base_actor != nil actor = @gamedata.game_actors[base_actor.id] draw_actor_name(actor, 16, 136) if @gamedata.game_party.members.size <= 12 draw_actor_level(actor, 128, 136) if @gamedata.game_party.members.size <= 15 end draw_currency_value(@gamedata.game_party.gold, 48, 172, 160) draw_playtime(@gamedata.total_sec, 16, 208, 192) label = @gamedata.game_system.savelabel.to_s if true if label.size >= 1 bitmap = Cache.savelabel self.contents.blt(80, 0, bitmap, bitmap.rect) self.contents.font.color = XRXSV27::LabalFontColor self.contents.font.shadow = false self.contents.draw_text(88, 0, 126, WLH, label) self.contents.font.color = normal_color self.contents.font.shadow = true end end else self.contents.draw_text(20, 48, 82, 24, "Empty") end end #-------------------------------------------------------------------------- # プレイ時間の描画 #-------------------------------------------------------------------------- def draw_playtime(total_sec, x, y, width) hour = total_sec / 60 / 60 min = total_sec / 60 % 60 time_string = sprintf("%02d:%02d", hour, min) self.contents.draw_text(x, y, width, WLH, time_string, 2) end end