From d2e93235b9ccd37bf8c8fb7c4376ab1911c83639 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sun, 11 May 2008 15:16:25 +0000 Subject: console font --- src/client/chat.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/client/chat.cc') diff --git a/src/client/chat.cc b/src/client/chat.cc index 4d2f759..0d1def6 100644 --- a/src/client/chat.cc +++ b/src/client/chat.cc @@ -74,24 +74,24 @@ void draw() if (console::visible() || !visible()) return; - size_t width = (size_t) (video::width / CHARWIDTH) - 7; + size_t width = (size_t) (video::width / Text::fontwidth()) - 7; size_t draw_pos = 0; while (input_pos - draw_pos > width) draw_pos += 2; // draw the console input gl::color(1.0f, 1.0f, 1.0f, 1.0f); - draw_text(CHARWIDTH , 4 + CHARHEIGHT * (MAXNOTIFYLINES+1), "say"); + Text::draw(4 , 5 + Text::fontheight() * (MAXNOTIFYLINES+1), "say"); gl::color(0.0f, 1.0f, .0f, 1.0f); - draw_text(CHARWIDTH*4 , 4 + CHARHEIGHT * (MAXNOTIFYLINES+1), ":"); + Text::draw(4+Text::fontwidth()*3 , 5 + Text::fontheight() * (MAXNOTIFYLINES+1), ":"); gl::color(1.0f, 1.0f, 1.0f, 1.0f); - draw_text(CHARWIDTH*6, 4 + CHARHEIGHT * (MAXNOTIFYLINES+1), (*history_pos).substr(draw_pos, width)); + Text::draw(4+Text::fontwidth()*5, 5 + Text::fontheight() * (MAXNOTIFYLINES+1), (*history_pos).substr(draw_pos, width)); // draw cursor if ((core::application()->time() - ::floorf(core::application()->time())) < 0.5f) { std::string cursor("_"); - draw_text(CHARWIDTH*(input_pos - draw_pos+6), 4 + CHARHEIGHT * (MAXNOTIFYLINES+1) , cursor); + Text::draw(4+Text::fontwidth()*(input_pos - draw_pos+5), 5 + Text::fontheight() * (MAXNOTIFYLINES+1) , cursor); } } -- cgit v1.2.3