EDIT: Yeah i got it o how i want it to look but the damn thing wont scroll
it just stays there
is there a parameter i could use for it to scroll (if you have more than 48 achievements)
and the 2nd problem is the images wont appear fully if i have less achievements
from what i figured out after hours of playing with it
I am actually learning the scripting code thanks to this btw.
Here is the edited code:
#===============================================================================
# Window_QuickAwards
#===============================================================================
class Window_QuickAwards < Window_Selectable
def initialize
# super(64, 128 + 64, 512, 320 - 64)
super(64, 192, 512, 273)
@column_max = 9
self.z = 500
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 = []
$game_system.awards.each {|i|
@data.push([Awards::Award[i], i])}
if Awards::Show_All
@data = []
@locked = []
@unlocked = []
Awards::Award.each_index {|i|
if Awards::Award[i] != nil
if $game_system.awards.include?(i)
@unlocked.push([Awards::Award[i], i])
else
@locked.push([Awards::Award[i], i])
end
end}
@unlocked.each {|i| @data.push(i)}
@locked.each {|i| @data.push(i)}
end
@item_max = @data.size
if @item_max > 0
self.contents = Bitmap.new(width - 48, row_max * 96)
for i in 0...@item_max
draw_item(i)
end
end
end
def draw_item(index)
item = @data[index]
x = 2 + index % @column_max * (52)
y = index / @column_max * 52
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
if $game_system.awards.include?(item[1])
bitmap = RPG::Cache.icon(item[0][2])
else
bitmap = RPG::Cache.icon(Awards::Locked_Icon)
end
self.contents.blt(x, y + 2, bitmap, Rect.new(0, 0, 48, 48))
end
def update_help
@help_window.set_award(self.item)
end
def update_cursor_rect
if @index < 0
self.cursor_rect.empty
return
end
row = @index / @column_max
if row < self.top_row
self.top_row = row
end
if row > self.top_row + (self.page_row_max - 1)
self.top_row = row - (self.page_row_max - 1)
end
cursor_width = 52
x = @index % @column_max * (cursor_width + 0)
y = @index / @column_max * 52 - self.oy
self.cursor_rect.set(x, y, cursor_width, 52)
end
end
also these appear to do nothing pretty much
rect = Rect.new(x, y, self.width / @column_max - 32, 32)
self.contents = Bitmap.new(width - 48, row_max * 96) (row_max has something to do with if its below a certain number the pictures dont appear
but awesome script
i use QScene_Awards as i mention so this is the part that changes for me
heres a pic to better understand what i mean