Page 1 of 1

[Solved] CEGUI 0.8.4 No CheckBox Class in C++

Posted: Fri Jul 03, 2015 14:21
by pentium166
Hi,
I'm using CEGUI 0.8.4 in VS2012 with dynamic library and OpenGL3Renderer. Most of things going fine, put some labels, some combo boxes, buttons, and all is fine so far!
I've used the CEED to make a CheckBox and it's renders fine, but when I got to C++ to bind it to some function I got the following error:
Error 1 error C2039: 'Checkbox' : is not a member of 'CEGUI'

I've looked up for something like "CheckBox.h" in the CEGUI's include folder but I could not found it!

Here is the class I'm using:
OptionsGUI.h

Code: Select all

class OptionsGUI :
   public BaseGUI
{
protected:
   CEGUI::Window *sheet;
   CEGUI::Combobox *cboRes, *cboAnim, *cboAnisotropic, *cboMultisample, *cboAmbient;
   CEGUI::Checkbox *chkFullScreen;//ERROR HERE!!!!!
   CEGUI::PushButton *btnExit,*btnSave;
public:
   OptionsGUI(void);
   ~OptionsGUI(void);
   virtual const char* getLayout(){return "OptionsGUI.layout";}

   virtual void showGUI();

   virtual void Initialize();
   void update(float delta);
   void exit();
};


And here is my initialize functuion:

Code: Select all

       if(!sheet)
   {
      if(!getRoot())
         InitializeRoot();
      sheet = CEGUI::WindowManager::getSingleton().loadLayoutFromFile((CEGUI::utf8*)"data/gui/OptionsGUI.layout");
      
      btnExit = (CEGUI::PushButton*)sheet->getChild("btnExit");
      if(btnExit)
      {
         printf("btnExitOK!\n");
      }
      btnSave = (CEGUI::PushButton*)sheet->getChild("btnSave");
      if(btnSave)
      {
         printf("btnSave OK!\n");
      }
      cboRes = (CEGUI::Combobox*)sheet->getChild("cboRes");
      if(cboRes)
      {
         printf("cboRes OK!\n");
      }
      cboAnim = (CEGUI::Combobox*)sheet->getChild("cboAnim");
      if(cboAnim)
      {
         printf("cboAnim OK!\n");
      }
      cboAnisotropic = (CEGUI::Combobox*)sheet->getChild("cboAnisotropic");
      if(cboAnisotropic)
      {
         printf("cboAnisotropic OK!\n");
      }
      cboAmbient = (CEGUI::Combobox*)sheet->getChild("cboAmbient");
      if(cboAmbient)
      {         
         printf("cboAmbient OK!\n");
      }

      chkFullScreen = (CEGUI::Checkbox*)sheet->getChild("chkFullscreen");//ERROR HERE!!!!!
      if(chkFullScreen)
      {
         printf("chkFullScreen OK!\n");
      }
   }



So...any ideias?

Re: CEGUI 0.8.4 No CheckBox Class in C++

Posted: Sat Jul 04, 2015 23:53
by Ident
Checkbox is called ToggleButton since 0.8.X. You can see this definition of a widget's class in the respective scheme files, look for the "targetType".

Re: [Solved] CEGUI 0.8.4 No CheckBox Class in C++

Posted: Sun Jul 05, 2015 01:26
by pentium166
Ok...thank you...
I realized that I've reading the 0.7.9 documentation

Once again...thanks!