MRI-Binding: WindowVX: Since RGSS2 'contents' has a 1x1 dummy bitmap
This commit is contained in:
parent
169f9e9285
commit
d075bd255c
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue