Exemple #1
0
    void GuiTheme::renderConsoleLine(
        ConsoleLine & line, Console & console,
        int index, sf::RenderWindow & screen)
    {
        if(!console.getTextBar().isFocused())
            return;

        Vector2i barSize = console.getTextBar().getSize();
        Vector2i ipos = console.getPositionAbsolute();

        Vector2f A(ipos.x, ipos.y);
        A.y -= (index + 1) * (barSize.y - 6) + 6;

        Vector2f B = A;
        B.x += barSize.x;
        B.y += barSize.y - 6;

        screen.Draw(sf::Shape::Rectangle(A, B, sf::Color(0,0,0,128)));

        line.getRenderText().SetPosition(A);
        screen.Draw(line.getRenderText());
    }