Window_ShopCommand

Publié le par chindan

#============================================
# ¡ Window_ShopCommand
#----------------------------------------------
# @ƒVƒ‡ƒbƒv‰æ–ʂŁA—pŒ‚ð‘I‘ð‚·‚éƒEƒBƒ“ƒhƒE‚Å‚·B
#============================================

class Window_ShopCommand < Window_Selectable
#------------------------------------------
# œ ƒIƒuƒWƒFƒNƒg‰Šú‰»
#------------------------------------------
def initialize
super(0, 64, 480, 64)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.name = $fontface
self.contents.font.size = $fontsize
@item_max = 3
@column_max = 3
@commands = ["Acheter", "Vendre", "Annuler"]
refresh
self.index = 0
end
#------------------------------------------
# œ ƒŠƒtƒŒƒbƒVƒ…
#------------------------------------------
def refresh
self.contents.clear
for i in 0...@item_max
draw_item(i)
end
end
#------------------------------------------
# œ €–Ú‚Ì•`‰æ
# index : €–ڔԍ†
#------------------------------------------
def draw_item(index)
x = 4 + index * 160
self.contents.draw_text(x, 0, 128, 32, @commands[index])
end
end
Publicité

Publié dans poubelle

Pour être informé des derniers articles, inscrivez vous :
Commenter cet article