Ok, I feel a bit silly here but I'm confused and I'm looking for a bit of help.
So I have a class where one of the data items is a chatbox
Now in the class constructor, I want to set the chatbox container so that it is in the gui, i.e. like below.
Now obviously if I do this in the class definition, it does not compile. So I'm assuming there is a method that I call call in the Test class constructor but I cannot for the life figure out which method to call.
So I have a class where one of the data items is a chatbox
Code Select
class Test
{
public:
Test();
sf::RenderWindow gameWindow;
tgui::Gui gui;
tgui::ChatBox::Ptr chatbox;
};
Now in the class constructor, I want to set the chatbox container so that it is in the gui, i.e. like below.
Code Select
tgui::ChatBox::Ptr chatbox(gui);
Now obviously if I do this in the class definition, it does not compile. So I'm assuming there is a method that I call call in the Test class constructor but I cannot for the life figure out which method to call.
I really do appreciate you continued assistance and patience with my constant questions.