x
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts MenuQuotebClickMe->setPosition("50%", 100);This code only works in tgui 0.8-dev. In tgui 0.7 the "50%" gets evaluated as "50 mod 0", which is NaN.bClickMe->setPosition("parent.width/2", 100);bClickMe->setPosition("&.w/2", 100);
tgui::Gui menu{app_win};
tgui::Gui over{app_win};Quotewell in the end I moved them to bin folderWhy would you have to move them? Is there a reason you need them in a bin folder?
Quotealso why is the signal result (checked or unchecked ) is in string style ??What exactly are you referring to? I didn't understand what you meant with this.
Quote"sfml" from pacman is version 2.4.2, and "sfml-git" is 2.4.0.This is not correct. The sfml-git package (just like tgui-git) always builds the latest version, sfml-git is thus newer than sfml 2.4.2. The version number displayed on the AUR is confusingly the version of the last update to the PKGBUILD script. For instance, tgui-git used to still show version 0.7-alpha2 while it was already building tgui 0.7.3. But any package with "-git" at the end should build the very latest version, no matter what the version number on the AUR says.
theme->load("Invalid");menuBar->connect("MouseLeft", [=](){ menuBar->mouseNoLongerDown(); });menuBar->connect("MouseLeft", [=](){ menuBar->closeMenu(); });
int main()
{
App app;
app.run();
}class App
{
private:
sf::RenderWindow mWindow;
tgui::Gui mGui;
Sidebar mSidebar;
public:
App();
void run();
...
}App::App() :
mWindow{{1280, 720}, "Study Buddy"},
mGui{mWindow},
mSidebar{mGui}
{
// If you don't understand what the lines above are, look up "member initializer list"
}void App::render()
{
mWindow.clear();
mGui.draw();
mWindow.display();
}Sidebar::Sidebar(tgui::Gui& gui) // Passing by reference is important, we don't want to create a copy
{
tgui::Button::Ptr button = homeButton();
gui.add(button, "homeButton");
}std::shared_ptr<tgui::Button> Sidebar::homeButton()
{
auto button = tgui::Button::create("Home");
button->setPosition(600, 600);
button->setSize(200, 200);
button->setText("test");
button->setTextSize(20);
return button;
}