]> git.jsancho.org Git - guile-irrlicht.git/blobdiff - src/gui-toolbar.cpp
Use SCM_UNDEFINED for undefined arguments
[guile-irrlicht.git] / src / gui-toolbar.cpp
index cc571e8ffb0fac2a51bbcb6ffe55a5676addab40..eec05c71a3714c4fbaa93fb93440ab2dc35c2ef2 100644 (file)
@@ -45,10 +45,10 @@ extern "C" {
                                  SCM rest)
   {
     SCM id = scm_from_int32 (-1);
-    SCM text = SCM_BOOL_F;
-    SCM tooltiptext = SCM_BOOL_F;
-    SCM img = SCM_BOOL_F;
-    SCM pressedimg = SCM_BOOL_F;
+    SCM text = SCM_UNDEFINED;
+    SCM tooltiptext = SCM_UNDEFINED;
+    SCM img = SCM_UNDEFINED;
+    SCM pressedimg = SCM_UNDEFINED;
     SCM is_push_button = SCM_BOOL_F;
     SCM use_alpha_channel = SCM_BOOL_F;
 
@@ -65,10 +65,10 @@ extern "C" {
     irr::gui::IGUIToolBar* toolbar = unwrap_gui_toolbar (wrapped_gui_toolbar);
     irr::gui::IGUIButton* button =
       toolbar->addButton (scm_to_int32 (id),
-                          scm_is_false (text) ? 0 : scm_to_wide_char_string (text),
-                          scm_is_false (tooltiptext) ? 0 : scm_to_wide_char_string (tooltiptext),
-                          scm_is_false (img) ? 0 : unwrap_texture (img),
-                          scm_is_false (pressedimg) ? 0 : unwrap_texture (pressedimg),
+                          text == SCM_UNDEFINED ? 0 : scm_to_wide_char_string (text),
+                          tooltiptext == SCM_UNDEFINED ? 0 : scm_to_wide_char_string (tooltiptext),
+                          img == SCM_UNDEFINED ? 0 : unwrap_texture (img),
+                          pressedimg == SCM_UNDEFINED ? 0 : unwrap_texture (pressedimg),
                           scm_to_bool (is_push_button),
                           scm_to_bool (use_alpha_channel));
     return wrap_gui_button (button);