diff --git a/binding-mri/windowvx-binding.cpp b/binding-mri/windowvx-binding.cpp index 49372b9..0bf06df 100644 --- a/binding-mri/windowvx-binding.cpp +++ b/binding-mri/windowvx-binding.cpp @@ -24,8 +24,12 @@ #include "viewportelement-binding.h" #include "binding-util.h" +#include "bitmap.h" + DEF_TYPE(WindowVX); +void bitmapInitProps(Bitmap *b, VALUE self); + RB_METHOD(windowVXInitialize) { int x, y, width, height; @@ -41,10 +45,16 @@ RB_METHOD(windowVXInitialize) w->setCursorRect(new Rect); w->setTone(new Tone); wrapNilProperty(self, "windowskin"); - wrapNilProperty(self, "contents"); wrapProperty(self, w->getTone(), "tone", ToneType); wrapProperty(self, w->getCursorRect(), "cursor_rect", RectType); +#ifdef RGSS2 + Bitmap *contents = new Bitmap(1, 1); + VALUE contentsObj = wrapObject(contents, BitmapType); + bitmapInitProps(contents, contentsObj); + rb_iv_set(self, "contents", contentsObj); +#endif + return self; }