Window: rename m_chars_per_line -> m_columns

This commit is contained in:
josh committed 2016-07-29 21:06:28 -04:00
1 parent dc71520a88
commit 862b414c1d
2 files changed
+5 -5

No files matched your search

+4 -4
View File
@@ -253,9 +253,9 @@ void Window::resize()
glViewport(0, 0, m_width, m_height);
m_programs.text->use();
m_programs.text->set_viewport_size(m_width, m_height);
m_chars_per_line = m_width / m_font.get_advance();
if (m_chars_per_line < 1)
m_chars_per_line = 1;
m_columns = m_width / m_font.get_advance();
if (m_columns < 1)
m_columns = 1;
}
void Window::redraw()
@@ -279,7 +279,7 @@ void Window::redraw()
auto g = m_font.get_glyph(c);
m_programs.text->set_position(x, y);
g->render();
if ((i + 1) % m_chars_per_line == 0)
if ((i + 1) % m_columns == 0)
{
y -= line_height;
x = 0;
+1 -1
View File
@@ -30,7 +30,7 @@ protected:
} m_programs;
Font m_font;
int m_chars_per_line;
int m_columns;
std::shared_ptr<Buffer> m_buffer;