也是醉了,我居然为了这么简单的问题折腾了几个小时,原来问题出在窗口更新方式上
#======================================================== # * 任务界面左边的纵向选项区域 #======================================================== class Window_TaskLeft < Window_Selectable attr_reader :finished def initialize super(0,48,200,Graphics.height - 48) create_contents @finished = false @index = 0 refresh deactivate end def set_finish(finish) @finished = finish set_item_max end def item_max return @item_max != nil ? @item_max : 0 end def set_item_max if @finished @item_max = $game_party.finished_tasks.size else @item_max = $game_party.unfinished_tasks.size end end def refresh set_item_max create_contents draw_all_items end
#========================================================
# * 任务界面左边的纵向选项区域
#========================================================
class Window_TaskLeft < Window_Selectable
attr_reader :finished
def initialize
super(0,48,200,Graphics.height - 48)
create_contents
@finished = false
@index = 0
refresh
deactivate
end
def set_finish(finish)
@finished = finish
set_item_max
end
def item_max
return @item_max != nil ? @item_max : 0
end
def set_item_max
if @finished
@item_max = $game_party.finished_tasks.size
else
@item_max = $game_party.unfinished_tasks.size
end
end
def refresh
set_item_max
create_contents
draw_all_items
end
注意最后的refresh,把它覆盖掉就可以了 |