european_son
Member
I'm creating a one-scene menu for a single character. Its almost working as I planned, but since I'm a new scripter, there's some stuff I haven't figured out yet.
The main issue now is how to make a window that shows the equipped items as pictures. Let me illustrate:
http://img204.imageshack.us/img204/4329/shotdr4.th.png[/img]
I guess the code should be something like this:
...or something. I couldn' get anything to work correctly, so could someone give me a hint how to proceed? Thank in advance!
The main issue now is how to make a window that shows the equipped items as pictures. Let me illustrate:
http://img204.imageshack.us/img204/4329/shotdr4.th.png[/img]
I guess the code should be something like this:
Code:
# WINDOW_EQUIP =================================================================
class Window_Equip < Window_Base
# Object Initialization ------------------------------------------------------
# actor : actor
def initialize(actor)
super(480, 64, 160, 352)
self.contents = Bitmap.new(width - 32, height - 32)
@actor = actor
refresh
end
# Refresh --------------------------------------------------------------------
def refresh
self.contents.clear
# Get weapon ID
case $data_weapons[@actor.weapon_id]
# Draw weapon pictures
when 0
bitmap = RPG::Cache.picture("noweapon")
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 64, 192))
when 1
bitmap = RPG::Cache.picture("weapon_id1")
self.contents.blt(0, 0, bitmap, Rect.new(0, 0, 64, 192))
end
...or something. I couldn' get anything to work correctly, so could someone give me a hint how to proceed? Thank in advance!