X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fcursor-control.cpp;h=c4893461281fd7ee61e12246b3df1a791e1e0f21;hb=79e12d94cc21232477796a4e76fc2ddb5d88f9dc;hp=55f6622e8997350ebfd0d0ef5f5911acc084bfe8;hpb=41a6ad96e81a8d8153c54877c4c12f61100677a9;p=guile-irrlicht.git diff --git a/src/cursor-control.cpp b/src/cursor-control.cpp index 55f6622..c489346 100644 --- a/src/cursor-control.cpp +++ b/src/cursor-control.cpp @@ -24,6 +24,7 @@ #include "cursor-control.h" #include "gsubr.h" #include "position2d.h" +#include "wrapped.h" using namespace irr; @@ -31,21 +32,31 @@ SCM ICursorControl_getPosition (SCM cursor_control) { return scm_from_position2d_s32 - (((gui::ICursorControl*)scm_to_pointer (cursor_control))->getPosition ()); + (((gui::ICursorControl*)scm_to_irr_pointer (cursor_control))->getPosition ()); } SCM ICursorControl_setPosition (SCM cursor_control, SCM position) { - ((gui::ICursorControl*)scm_to_pointer (cursor_control))-> + ((gui::ICursorControl*)scm_to_irr_pointer (cursor_control))-> setPosition (scm_to_position2d_s32 (position)); return SCM_UNSPECIFIED; } +SCM +ICursorControl_setVisible (SCM cursor_control, + SCM visible) +{ + ((gui::ICursorControl*)scm_to_irr_pointer (cursor_control))-> + setVisible (scm_to_bool (visible)); + return SCM_UNSPECIFIED; +} + void init_cursor_control (void) { DEFINE_GSUBR ("ICursorControl_getPosition", 1, 0, 0, ICursorControl_getPosition); DEFINE_GSUBR ("ICursorControl_setPosition", 2, 0, 0, ICursorControl_setPosition); + DEFINE_GSUBR ("ICursorControl_setVisible", 2, 0, 0, ICursorControl_setVisible); }