#==============================================================================
# ** Window_Journal
#------------------------------------------------------------------------------
# This window displays a journal.
# Original Script - Lambchop
# Moved completed quests to end of list & green text - Brew
# Modified 'for' loops & 'journal_height' so you only have to edit the
# data array. - Brew
#==============================================================================
class Window_Journal < Window_Selectable
# ------------------------
def initialize
super(0, 32, 460, 330)
@column_max = 1
refresh
self.index = 0
### to change the windowskin for the journal
# self.windowskin = RPG::Cache.windowskin("RMXP4life_Wood.png")
###
end
#--------------------------------------------------------------------------
# * Draw the contents of the item window
#--------------------------------------------------------------------------
def refresh
if self.contents != nil
self.contents.dispose
self.contents = nil
end
# populate your journal with entries. Each entry must match its switch number!
@data = []
@data[1] = "Help Man"
@data[2] = "Kill Chicken"
@data[3] = "Make cow eat"
@data[4] = "Sniff the Glove"
@data[5] = "Jump off a bridge after your friends"
@data[6] = "Item 6"
@data[7] = "Item 7"
@data[8] = "Item 8"
@data[9] = "Item 9"
@data[10] = "Item 10"
@data[11] = "Item 11"
@data[12] = "Item 12"
@data[13] = "Item 13"
num = @data.size
# variables
@journal_height = (num - 2)*32 # y height of entire journal
@n = 0 # y coord for each entry
@item_max = 0 # max items to display
# draw the bitmap. the text will appear on this bitmap
self.contents = Bitmap.new(width - 32, height+@journal_height)
for i in 1..(num - 1)
if ($game_switches[i + 100] == true) and ($game_switches[i + 200] == false)
draw_item(i)
@item_max += 1
end
end
for i in 1..(num - 1)
if ($game_switches[i + 200] == true)
draw_item_complete(i)
@item_max += 1
end
end
end
#--------------------------------------------------------------------------
# * Draw an individual item in the window
# index : Index of the item to be drawn
#--------------------------------------------------------------------------
def draw_item(index)
item = @data[index]
rect = Rect.new(10, @n, 640, 32)
self.contents.fill_rect(rect, Color.new(0,0,0,0))
self.contents.font.color.set(256,256,128,256)
self.contents.draw_text(10, @n, 640, 32, "â—