class Scene_Fux2 def main @help_window = Window_Help.new @item_window = Window_Fux2.new @item_window.help_window = @help_window Graphics.transition loop do Graphics.update Input.update update if $scene != self break end end Graphics.freeze @help_window.dispose @item_window.dispose end def update @help_window.update @item_window.update if @item_window.active update_item return end end def update_item if Input.trigger?(Input::B) $game_system.se_play($data_system.cancel_se) $scene = Scene_Map.new return end end end########################################################class Window_Fux2 < Window_Selectable FUX_BLOCK = [["任务1","杀死所有敌人"],["任务2","喵喵"]] def initialize super(0, 64, 640, 416) @column_max = 1 refresh self.index = 0 end def item return @data[self.index] end def refresh if self.contents != nil self.contents.dispose self.contents = nil end @data = [] for i in 0...$game_variables[100] @data.push i end @item_max = @data.size if @item_max > 0 self.contents = Bitmap.new(width - 32, row_max * 32) for i in 0...@item_max draw_item(i) end end end def draw_item(index) item = @data[index] @data[index] == @data.size ? self.contents.font.color = Color.new(255, 255, 0, 255) : self.contents.font.color = normal_color x = 12 y = index * 32 rect = Rect.new(x, y, self.width - 32, 32) self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) opacity = self.contents.font.color == normal_color ? 255 : 128 self.contents.draw_text(x + 28, y, 212, 32, FUX_BLOCK[index][0], 0) end def update_help @help_window.set_text(self.item == nil ? "" : FUX_BLOCK[self.index][1]) end end########################################class Scene_Map alias:fuxupdate:update def update unless moving? or $game_system.map_interpreter.running? or @move_route_forcing or $game_temp.message_window_showing if Input.trigger?(Input::A) $scene = Scene_Fux2.new end fuxupdate end endend复制代码