Class | Joyau::CircleMenu |
In: |
Drawable.cpp
|
Parent: | Joyau::Drawable |
Displays a menu as a Circle. Its picture has to dispose the icons vertically.
RIGHT | = | INT2FIX(0) |
LEFT | = | INT2FIX(1) |
Returns the menu’s alpha value.
/* Returns the menu's alpha value. */ VALUE CircleMenu_alpha(VALUE self) { CircleMenu &ref = getRef<CircleMenu>(self); return INT2FIX(ref.getAlpha()); }
Returns the menu’s angle.
/* Returns the menu's angle. */ VALUE CircleMenu_angle(VALUE self) { CircleMenu &ref = getRef<CircleMenu>(self); return INT2FIX(ref.getAngle()); }
Changes the selected item. 0 for the right, 1 for the left.
/* call-seq: changeSelection(dir) Changes the selected item. 0 for the right, 1 for the left. */ VALUE CircleMenu_changeSelection(VALUE self, VALUE dir) { CircleMenu &ref = getRef<CircleMenu>(self); int _dir = FIX2INT(dir); ref.changeSelection(_dir); return Qnil; }
Returns the menu’s distance
/* Returns the menu's distance */ VALUE CircleMenu_dist(VALUE self) { CircleMenu &ref = getRef<CircleMenu>(self); return INT2FIX(ref.getDist()); }
Returns the menu’s index.
/* Returns the menu's index. */ VALUE CircleMenu_getIndex(VALUE self) { CircleMenu &ref = getRef<CircleMenu>(self); int ret = ref.getIndex(); return INT2FIX(ret); }
Loads the menu.
/* call-seq: load(filename, nb_icons, dist, w, h, x, y, icon_width, icon_height) Loads the menu. */ VALUE CircleMenu_load(VALUE self, VALUE str, VALUE nbIcons, VALUE dist, VALUE w, VALUE h, VALUE x, VALUE y, VALUE iconW, VALUE iconH) { CircleMenu &ref = getRef<CircleMenu>(self); char *_str = StringValuePtr(str); int _nbIcons = FIX2INT(nbIcons); int _dist = FIX2INT(dist); int _w = FIX2INT(w); int _h = FIX2INT(h); int _x = FIX2INT(x); int _y = FIX2INT(y); int _iconW = FIX2INT(iconW); int _iconH = FIX2INT(iconH); ref.load(_str, _nbIcons, _dist, _w, _h, _x, _y, _iconW, _iconH); return Qnil; }
Sets the menu’s alpha value.
/* call-seq: alpha=(alpha) Sets the menu's alpha value. */ VALUE CircleMenu_setAlpha(VALUE self, VALUE alpha) { CircleMenu &ref = getRef<CircleMenu>(self); int _alpha = FIX2INT(alpha); ref.setAlpha(_alpha); return alpha; }
Sets the menu’s angle.
/* call-seq: angle=(angle) Sets the menu's angle. */ VALUE CircleMenu_setAngle(VALUE self, VALUE angle) { CircleMenu &ref = getRef<CircleMenu>(self); int _angle = FIX2INT(angle); ref.setDist(_angle); return angle; }