Main Menu
Menu

Show posts

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 Menu

Topics - robvleugel

#1
Feature requests / Callback
25 July 2013, 16:39:36
Question/suggestion, why two separate functions for binding and setting the callback id?
Why not button->bindCallback(tgui::Button::LeftMouseClicked, 1);
Is there ever a need for separate functions?

Imo the function could even return the callback as integer and make the second parameter (ID) optional, assigning a new unique number if not entered.

Even better would be if the button could somehow be used in the way below


//Handle callbacks
    while (m_gui.pollCallback(m_callback))
{
if (quitbutton.state == tgui::Button::LeftMouseClicked)
{
Shutdown();
}
}
#2
Help requests / Regular / bold text
25 July 2013, 16:16:02


As you can see the right text appears bold while the left text is not, any idea what might be causing this?


    m_gui.setGlobalFont("Fonts\\Cousine-Regular-Latin.ttf");

    //buttonQuit
    m_buttonQuit.init(m_gui);
    m_buttonQuit->load(m_config.guiTheme);
    m_buttonQuit->setSize(100, 30);
    m_buttonQuit->setPosition(900, 730);
    m_buttonQuit->setText("Quit");

    //buttonMenu
    m_buttonMenu.init(m_gui);
    m_buttonMenu->load(m_config.guiTheme);
    m_buttonMenu->setSize(100, 30);
    m_buttonMenu->setPosition(24, 730);
    m_buttonMenu->setText("Menu");


#3
Unhandled exception at at 0x767CC41F in myprogram.exe: Microsoft C++ exception: std::length_error at memory location 0x0021F38C.

I get this runtime error whenever the button-->load line is reached.
Any ideas what might be causing this?
I downloaded the lastest TGUI version according to the TGUI download page
("Download the latest development snapshot from github" --> https://github.com/texus/TGUI/archive)/master.zip)


...
    tgui::Gui gui;
    tgui::Button::Ptr button(gui);
    button->load("TGUI/widgets/Button/BabyBlue");
    button->setSize(260, 60);
    button->setPosition(270, 440);
    button->setText("Login");
...