X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=src%2Fgui-toolbar.cpp;h=134081691d57de16018e74b3a994383a82ca624e;hb=79e12d94cc21232477796a4e76fc2ddb5d88f9dc;hp=ace658cf6ca423f20bca76d3294b83081da18caf;hpb=c4d9e46f268b4f7f738dd77685c632991125cec9;p=guile-irrlicht.git diff --git a/src/gui-toolbar.cpp b/src/gui-toolbar.cpp index ace658c..1340816 100644 --- a/src/gui-toolbar.cpp +++ b/src/gui-toolbar.cpp @@ -23,7 +23,6 @@ #include #include "gsubr.h" #include "gui-toolbar.h" -#include "wchar.h" #include "wrapped.h" using namespace irr; @@ -39,15 +38,21 @@ IGUIToolBar_addButton (SCM gui_toolbar, SCM use_alpha_channel) { gui::IGUIToolBar* toolbar = (gui::IGUIToolBar*) scm_to_irr_pointer (gui_toolbar); + wchar_t* wtext = (wchar_t*) scm_to_utf32_string (text); + wchar_t* wtooltiptext = (wchar_t*) scm_to_utf32_string (tooltiptext); + gui::IGUIButton* button = toolbar->addButton (scm_to_int32 (id), - scm_to_wide_char_string (text), - scm_to_wide_char_string (tooltiptext), + wtext, + wtooltiptext, (video::ITexture*) scm_to_irr_pointer (img), (video::ITexture*) scm_to_irr_pointer (pressedimg), scm_to_bool (is_push_button), scm_to_bool (use_alpha_channel)); - return scm_from_pointer ((void*) button, NULL); + + free (wtext); + free (wtooltiptext); + return scm_from_irr_pointer ("", (void*) button); } void