| Class | Joyau::MsgConfig |
| In: |
Drawable.cpp
|
| Parent: | Object |
MsgConfig is used with MsgSelecter, which use them in order
Returns the message’s background.
/*
Returns the message's background.
*/
VALUE MsgConfig_bg(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
if (ref.bg)
return ref.bg->toRuby();
return Qnil;
}
Sets the background’s picture.
/*
call-seq: bg=(val)
Sets the background's picture.
*/
VALUE MsgConfig_setBg(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.bg = getPtr<Sprite>(val);
return val;
}
Returns the background’s color.
/*
Returns the background's color.
*/
VALUE MsgConfig_bgColor(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return col2hash(ref.bgColor);
}
Sets the background’s color.
/*
call-seq: bgColor=(val)
Sets the background's color.
*/
VALUE MsgConfig_setBgColor(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.bgColor = hash2col(val);
return val;
}
Returns the border’s color.
/*
Returns the border's color.
*/
VALUE MsgConfig_borderColor(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return col2hash(ref.borderColor);
}
Sets the border’s color.
/*
call-seq: borderColor=(val)
Sets the border's color.
*/
VALUE MsgConfig_setBorderColor(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.borderColor = hash2col(val);
return val;
}
Returns the image shown beside the text.
/*
Returns the image shown beside the text.
*/
VALUE MsgConfig_image(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
if (ref.image)
return ref.image->toRuby();
return Qnil;
}
Sets the sprite drawn beside the text.
/*
call-seq: image=(sprite)
Sets the sprite drawn beside the text.
*/
VALUE MsgConfig_setImage(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.image = getPtr<Sprite>(val);
return val;
}
Returns the text’s color.
/*
Returns the text's color.
*/
VALUE MsgConfig_textColor(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return col2hash(ref.textColor);
}
Sets the text’s color.
/*
call-seq: text=(val)
Sets the text's color.
*/
VALUE MsgConfig_setTextColor(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.textColor = hash2col(val);
return val;
}
Returns the text’s font.
/*
Returns the text's font.
*/
VALUE MsgConfig_textFont(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return rb_str_new2(ref.textFont.c_str());
}
Sets the text’s font.
/*
call-seq: textFont=(val)
Sets the text's font.
*/
VALUE MsgConfig_setTextFont(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.textFont = StringValuePtr(val);
return val;
}
Returns the title’s color.
/*
Returns the title's color.
*/
VALUE MsgConfig_titleColor(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return col2hash(ref.titleColor);
}
Sets the title’s color.
/*
call-seq: titleColor=(val)
Sets the title's color.
*/
VALUE MsgConfig_setTitleColor(VALUE self, VALUE val)
{
MsgConfig &ref = getRef<MsgConfig>(self);
ref.titleColor = hash2col(val);
return val;
}
Returns the title’s font.
/*
Returns the title's font.
*/
VALUE MsgConfig_titleFont(VALUE self)
{
MsgConfig &ref = getRef<MsgConfig>(self);
return rb_str_new2(ref.titleFont.c_str());
}