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

Messages - Hronom

#1
Help requests / Re: [SOLVED] sf::View and TGUI
18 September 2013, 19:42:58
Big thanks, now my code looks like:
    if(m_window->isOpen())
    {
        m_gui->draw(true);
        // end the current frame
        m_window->display();
    }
#2
Feature requests / Re: Logo for TGUI=)
07 September 2013, 15:27:29
Please can you describe in words with what you associate TGUI. So people what read this topic can create logo and show this logo here. My friend can try create logo on volunteers beginning.
#3
Feature requests / Logo for TGUI=)
07 September 2013, 13:32:48
It would be nice, if someone draw logo for TGUI, so game that uses TGUI can populate them by showing logos of technologies that they use)))
#4
Help requests / Re: sf::View and TGUI
04 September 2013, 16:45:34
Sorry for bad english its not my native language.
I mean it would be good if method tgui::Gui::draw make draw widgets with offset of current sf::View.

So if i do this steps:
sf::View currentView;
currentView.setCenter(100, 100);
m_window->setView(currentView);

// Draw my SFML objects
m_gui->draw(); // Draw GUI

m_window->display();

GUI elements must recalculates them positions with current sf::View.

But now i need to do magic like this:
sf::View currentView;
currentView.setCenter(100, 100);
m_window->setView(currentView);

// Draw my SFML objects
m_window->setView(m_window->getDefaultView());
m_gui->draw(); // Draw GUI

m_window->display();

To display widgets in my view.

And thanks for fast replies it's awesome!
#5
Help requests / Re: sf::View and TGUI
04 September 2013, 15:50:13
In the end of my frame update logic i make this and looks like it work:
if(m_window->isOpen())
    {
    sf::View currentView;
    currentView = m_window->getView();

    m_window->setView(m_window->getDefaultView());
    m_gui->draw();

    m_window->setView(currentView);

    // end the current frame
    m_window->display();
}


But i didn't understand what is happens...

And for me it will be good if, then i make gui->draw its draw elements in sf::View rectangle.
#6
Help requests / Re: sf::View and TGUI
04 September 2013, 15:41:02
Thanks for reply.
So i need this do this steps:
m_window->setView(m_window->getDefaultView());
m_gui->draw();

m_window->setView(my_view);
// render some other stuff
m_window->display();


But i think i didn't understand, maybe some code example helps me.
#7
Help requests / [SOLVED] sf::View and TGUI
04 September 2013, 15:24:08
Than sf::View in my game follow the object gui is steel remain on its world position. So then i move sf:View i need to move all gui elements manualy? Or its bug?