Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [SOLVED] Text blurred on some positions  (Read 6960 times)

0 Members and 1 Guest are viewing this topic.

Anrock

  • Newbie
  • *
  • Posts: 25
    • View Profile
    • Email
Re: Text blurred on some positions
« Reply #15 on: April 14, 2014, 01:43:22 pm »
Woah, guys, i made it. Such a trivial edit, lol.
upperPanel.setViewport({0,              0,              0.75f, 0.025f}); //Set panels ratios.
mainPanel.setViewport ({0,              0.025f, 0.75f, 0.975f});
rightPanel.setViewport({0.75f0,              0.25f, 1});

Method for setting size of panel (view). Fix is to std::floor calculation result
void OperatingSystem::adjustPanel(const sf::RenderWindow& win, sf::View& view)
{
        view.reset({0.f, 0.f,
                        std::floor(win.getSize().x * view.getViewport().width), //std::floor it!
                        std::floor(win.getSize().y * view.getViewport().height)}); //this too
}

 

anything