Core, MRI: Don't expose RGSS3 functionality in 2

This commit is contained in:
Jonas Kulla 2014-09-06 02:01:20 +02:00
parent bca95adc0e
commit 6bc3460294
2 changed files with 20 additions and 11 deletions

View File

@ -53,9 +53,11 @@ RB_METHOD(windowVXInitialize)
w->initDynAttribs();
wrapProperty(self, w->getTone(), "tone", ToneType);
wrapProperty(self, w->getCursorRect(), "cursor_rect", RectType);
if (rgssVer >= 3)
wrapProperty(self, w->getTone(), "tone", ToneType);
Bitmap *contents = new Bitmap(1, 1);
VALUE contentsObj = wrapObject(contents, BitmapType);
bitmapInitProps(contents, contentsObj);
@ -138,17 +140,12 @@ windowVXBindingInit()
viewportElementBindingInit<WindowVX>(klass);
_rb_define_method(klass, "initialize", windowVXInitialize);
_rb_define_method(klass, "update", windowVXUpdate);
_rb_define_method(klass, "move", windowVXMove);
_rb_define_method(klass, "open?", windowVXIsOpen);
_rb_define_method(klass, "close?", windowVXIsClosed);
INIT_PROP_BIND( WindowVX, Windowskin, "windowskin" );
INIT_PROP_BIND( WindowVX, Contents, "contents" );
INIT_PROP_BIND( WindowVX, CursorRect, "cursor_rect" );
INIT_PROP_BIND( WindowVX, Active, "active" );
INIT_PROP_BIND( WindowVX, ArrowsVisible, "arrows_visible" );
INIT_PROP_BIND( WindowVX, Pause, "pause" );
INIT_PROP_BIND( WindowVX, X, "x" );
INIT_PROP_BIND( WindowVX, Y, "y" );
@ -156,11 +153,20 @@ windowVXBindingInit()
INIT_PROP_BIND( WindowVX, Height, "height" );
INIT_PROP_BIND( WindowVX, OX, "ox" );
INIT_PROP_BIND( WindowVX, OY, "oy" );
INIT_PROP_BIND( WindowVX, Padding, "padding" );
INIT_PROP_BIND( WindowVX, PaddingBottom, "padding_bottom" );
INIT_PROP_BIND( WindowVX, Opacity, "opacity" );
INIT_PROP_BIND( WindowVX, BackOpacity, "back_opacity" );
INIT_PROP_BIND( WindowVX, ContentsOpacity, "contents_opacity" );
INIT_PROP_BIND( WindowVX, Openness, "openness" );
if (rgssVer >= 3)
{
_rb_define_method(klass, "move", windowVXMove);
_rb_define_method(klass, "open?", windowVXIsOpen);
_rb_define_method(klass, "close?", windowVXIsClosed);
INIT_PROP_BIND( WindowVX, ArrowsVisible, "arrows_visible" );
INIT_PROP_BIND( WindowVX, Padding, "padding" );
INIT_PROP_BIND( WindowVX, PaddingBottom, "padding_bottom" );
INIT_PROP_BIND( WindowVX, Tone, "tone" );
}
}

View File

@ -1044,10 +1044,13 @@ void WindowVX::setOpenness(int value)
void WindowVX::initDynAttribs()
{
p->cursorRect = new Rect;
p->tone = new Tone;
p->refreshCursorRectCon();
p->refreshToneCon();
if (rgssVer >= 3)
{
p->tone = new Tone;
p->refreshToneCon();
}
}
void WindowVX::draw()