Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- =begin
- Auteur: Zouzaka
- Description: Permet d'avoir un sac plus stylé =)
- =end
- class Window_ItemList < Window_Selectable
- def col_max ; return 14 ; end
- def draw_item(index)
- item = @data[index]
- if item
- rect = item_rect(index)
- draw_icon(item.icon_index, rect.x, rect.y, enable?(item))
- rect.x += 3
- rect.y += 3
- draw_item_number(rect, item)
- end
- end
- def item_rect(index)
- rect = Rect.new
- rect.width = 26
- rect.height = 26
- rect.x = index % col_max * (5 + spacing)
- rect.y = index / col_max * (5 + spacing)
- rect
- end
- def draw_item_number(rect, item)
- draw_text(rect, sprintf("%2d", $game_party.item_number(item)), 2)
- end
- def cursor_right(wrap = false)
- (index < item_max - 1) ? select(index+1) : select(0)
- end
- def cursor_left(wrap = false)
- (index > 0) ? select(index-1) : select(item_max-1)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement